Skip to content

Start one session in a profile and report a folder's profile at session start #16432

Description

@kyle-sexton

Parent

Refs #16428: Ship the plugin-profiles plugin and remove the core bundle

Depends on

Outcome

A user starts one session in a profile from a generated settings file, sets the initial profile every folder starts from, and sees at session start and from status which profile a folder carries, what differs from it, what was installed since, and which surface the session runs on; surfaces where profiles cannot apply say so and write nothing.

Demo: claude --settings <generated file> starts a session in build with every settings file unchanged; status in a drifted folder lists each differing entry; the session-start notice appears without starting a nested claude.

Decisions

  • Q59: the generated one-session file also sets env.PLUGIN_PROFILES_SESSION to the profile name.
  • Q69: status and setup name the surface; a one-session apply on a surface with no flag path refuses and offers the folder level; cloud and Desktop WSL sessions report that profiles do not apply and write nothing.
  • D4: the session-start notice builds its inventory from installed-plugin records and settings files, never claude plugin list.
  • The session-start notice prints nothing in a folder with no applied profile.

Key interfaces

CLI apply --for session|initial, status [--json] [--session-start]; a SessionStart command hook launched with node. Surface detection reads CLAUDE_CODE_ENTRYPOINT and CLAUDE_CODE_REMOTE (documented for cloud sessions), confirmed by the build probes. Conventions: hook exec form with node, hook observability rules for text a hook adds.

Review criterion (owner): "Make sure we're applying solid principles: Single Responsibility Principle, DRY, Single Source of Truth principle, so no duplication. Make sure we're adhering to general good practice, best practice, and software engineering principles: low coupling, high cohesion; things that change together live together; feature vertical slice architecture."

Done when

  • AC2: a CLI test starts from a generated one-session file and every settings file is byte-identical afterwards.
  • AC12: status names the folder's profile and lists every differing entry in a test.
  • AC22: a plugin installed after the apply is named by status and by the session-start notice.
  • A --session-start test fails if the stub claude is called.
  • AC7 (process criterion of this container): the container's PR also removes core.

Out of scope

  • The in-session switch and the guided setup: their own items.

Activity

  1. added
    agent-ready
    on Nov 15, 2026
  2. added
    needs-triage
    on Nov 15, 2026
  3. self-assigned this
    on Nov 15, 2026
  4. github-actions commented on Nov 15, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: #16429

    Understood: add apply --for session|initial and status [--json] [--session-start] to plugin-profiles. A user starts one session in a profile from a generated settings file. status and a SessionStart hook report the folder's profile, any drift, plugins installed since the apply, and the surface. Surfaces where profiles can't apply say so and write nothing. The outcome, decisions and done-when items are specific enough to triage without questions.

    It depends on #16429 (apply a profile to a folder from the command line), which is still open. It is a child of #16428. No duplicate or already-merged fix was found.

    Automated triage. A maintainer reviews it.

  5. removed
    needs-triage
    on Nov 15, 2026
  6. melodic-automation-lanes commented on Nov 15, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: blocker #16429 is not closed by a listed human or a merge.

  7. added
    host-run
    on Nov 16, 2026
  8. removed
    host-run
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-ready

Fields

Work status

ready

Priority

medium

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions