Repository navigation
Description
Goal
Sessions that share one folder each get their own plugin profile: every launch site starts the session with its profile through claude --settings <file>. A phase change is a relaunch. The in-session /plugin-profile switch stays for folders with one session.
Owner decisions (2026-11-16, "Go with recommendations.")
- A phase change is a relaunch. Handoff resume prompts, background-session launch and lane launchers pass the profile.
- The one-session settings file is one per folder and profile.
- A launcher passes an explicit profile name that defaults to the launching session's own profile, plus a per-lane setting for lanes.
- Launchers always pass
--settingswhen there is a profile, and clear thePLUGIN_PROFILES_SESSIONmarker when there is none. - The in-session folder switch warns inside its existing confirmation, naming the other live sessions in the folder. It does not refuse.
- An unattended launch whose profile needs a missing required tool stops and reports.
Probe results (Claude Code 2.1.325, interactive sessions)
- A
claude --bgstarted from the Bash tool of a--settingssession does not inheritPLUGIN_PROFILES_SESSION: the background supervisor spawns it. A direct child (claude,claude -p) started from that Bash tool does. claudeaccepts two--settingsflags; the last one wins wholly and the earlier file is dropped. A lane's own settings and a profile need one merged file.
Work
- One command in
plugin-profilesthat, given a profile and a folder, writes or reuses the session file (one per folder and profile) and prints its path and the launch command. Every launch site calls it.statusprints the launch command too. - Launch sites: session-flow continue-in-background (
--bgcarries--settings;--cloudcannot and the report says so), session-flow handoff (the resume line carries--settings; a phase change says exit, relaunch, paste), the lane launcher and restart consumer (a per-lane profile merged with the lane's own settings), work-items work-loop, fleet reach and its relay, machine-health setup. Each falls back to today's behavior whenplugin-profilesis not enabled. - A lane's own settings merge into the profile through an optional input of the same command, which owns the merged file and its cleanup.
- Defects: the handoff reference asks for a restore entry
statusdoes not print; worktree creation copies.claude/settings.local.jsonprofile entries without the profile record; the marker leak, cleared in the one shared launch path. - The folder-switch warning and the unattended stop above.
Acceptance
- Each launch site starts a session with its profile, or the pull request says why a site is left alone.
- Tests ship with each change.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Work status
needs-owner-decision
Priority
medium
Activity
github-actions commentedon Nov 16, 2026
Size: Large
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: each session sharing a folder should launch with its own plugin profile through
claude --settings <file>. A singleplugin-profilescommand would write or reuse the per-folder, per-profile session file and print its path and the launch command. Each launch site (session-flow background and handoff, lane launcher and restart consumer, work-items work-loop, fleet reach and relay, machine-health setup) would call it. The issue also lists three defects, the in-session folder-switch warning, and the unattended stop on a missing required tool.The outcome and acceptance are specific enough to proceed. The work spans many plugins, so it likely needs splitting into parts. I found no open duplicate. Related open issues are #16428 and #16433, which the issue already references. The owner decisions are quoted in the issue body, not in a recorded decision comment. I treated them as the issue's own spec, not as a settled decision.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 16, 2026
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 16, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Add a launch-command subcommand to plugin-profiles (one session file per folder and profile, optional merged lane settings), then have each launch site call it, fix the three defects, and add the folder-switch warning and unattended stop; most likely delivered as several linked parts.
Dependencies
Related work
Open questions
**Decision recorded.**comment. Should an unattended run treat them as settled?RECOMMENDED: Yes. Have the owner post them as a Decision recorded comment, or confirm the body is the spec. Basis: judgment
RECOMMENDED: Split into: (1) the plugin-profiles launch command with the merged lane-settings input, marker clearing and
statusprinting the launch command; (2) session-flow background and handoff, plus the handoff restore-entry defect; (3) lane launcher and restart consumer; (4) work-items work-loop, fleet reach and relay, and machine-health setup; (5) worktree profile-record defect, folder-switch warning and unattended stop. Basis: judgmentRECOMMENDED: The owner names the files and the setting key, or part 3 begins by locating them. Basis: judgment
apply <name> --for sessionalready prints aclaude --settingsline, so the new one could extend it or be separate.RECOMMENDED: Add a separate subcommand, for example
launch <profile> <folder> \[--merge <file>\]. It reuses the session-file generator inplugins/plugin-profiles/scripts/profiles.mjs. Basis: plugins/plugin-profiles/scripts/profiles.mjs:346RECOMMENDED: Key the file by a hash of the folder plus the profile name. The command owns the cleanup of the merged file, which is regenerated when the lane settings change. Basis: judgment
Sources read
sessiontarget writes a generated file forclaude --settings <file>and setsPLUGIN_PROFILES_SESSION; a resumed session needs--settingsagain.--settingsagain on resume.claude --settingsstart command.claude -p --settingswith inline JSON and no profile today.To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.feat(plugin-profiles): warn of other sessions in the folder and adopt…
feat(work-items): start the work loop in its plugin profile
feat(session-flow): start background and resumed sessions in their pl…
feat(harness-ops): start each lane in its configured plugin profile
fix(plugin-profiles): answer the review of the launch command
fix(plugin-profiles): clear the inherited session file variable on la…
style(plugin-profiles): split two joined lines in profiles.mjs
fix(plugin-profiles): answer the pr-verify notes on launch