fix(launch-subagent): inherit parent session group by default#1213
Open
petitcl wants to merge 1 commit into
Open
fix(launch-subagent): inherit parent session group by default#1213petitcl wants to merge 1 commit into
petitcl wants to merge 1 commit into
Conversation
When a sub-agent is spawned from a session that belongs to a specific group, the new session would land in the default group instead, making it hard to find alongside its parent in the TUI. The script already reads the current session via `agent-deck session current --json`, which includes the group field. This change extracts that group and passes it to `agent-deck launch` with `-g`, so sub-agents are co-located with their parent by default.
📝 WalkthroughWalkthroughThe ChangesSub-agent group context
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Actionable comments posted: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a sub-agent is spawned via
launch-subagent.shfrom a session that belongs to a specific group, the new session lands in the default group instead. This makes it hard to find the sub-agent alongside its parent in the TUI — they end up in different groups.Example: parent session is in group
"Others", spawned sub-agent lands in"clement.petit"(the profile default).Root cause
The script already calls
agent-deck session current --json, which includes thegroupfield. It readssession,profile, andpathfrom that JSON, but never readsgroup, so-gis never passed toagent-deck launch.Fix
Extract the parent session's group from the existing JSON call and pass it to
agent-deck launchwith-gwhen present.The
// emptyguard means sessions with no group set are unaffected.Test plan
Example of a sub-agent launched from the group "Others" and configured to keep the parent group, vs another agent also launched from "Others", but which doesn't respect the parent group.
Summary by CodeRabbit