Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ab75d0b. Configure here.
- require a persisted scope-root sessionFile before sending scoped-create metadata - drop parentActiveSessionId from scoped-create metadata so parent closure does not cascade to ctrl+n-created agents - keep kernel-managed subagent mocks classified via rlmChildId in the ENG-4601 regression tests
- await the daemon hello before evaluating the scoped_session_create capability so scoped metadata is not silently dropped - honor the worker-assigned root active session id for subagent-kind root creates so supervisor-mode scoped creation no longer fails
# Conflicts: # packages/coding-agent/CHANGELOG.md # packages/coding-agent/src/modes/daemon/daemon-protocol.ts
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.

Fixes ENG-5106.
What this does
When you are looking at the subagents of a particular agent and press ctrl+n, the new agent is now created under that agent, at that level — instead of always being created as a new top-level agent.
Why
Pressing ctrl+n inside a drilled-in view clearly signals "give me a new agent here". Creating it at the top level instead was surprising and meant extra steps to get the agent where you wanted it.
How it works
Changes
agents-view-mode.ts: send the parent info when the view is scoped (+15 lines).daemon-mode.ts: create the session under the given parent (+20/−1 lines).daemon-protocol.ts: advertise the new capability (+5/−1 lines).Lines changed: source +40/−2, tests +179/−0, changelog +1/−0.
Checks
npm run checkclean.Note
Medium Risk
Touches daemon session creation and parent/child tree linkage, which can misplace agents if wrong. Mitigated by capability gating and solid test coverage.
Overview
Ctrl+N in a scoped agents view now creates the new agent under that scope root, instead of always at the top level.
When the view is drilled into a parent, create sends
runtimeMetadatawith parent linkage. The daemon writesparentSessionandrlmDepthinto the new session header so it appears at the correct tree depth. Gated on the newscoped_session_createcapability; older daemons keep the previous top-level behavior.Also treats user-created scoped drafts (no
rlmChildId) as discardable like top-level drafts, while kernel children stay non-discardable. Worker restore IDs now apply to scoped creates as well as top-level ones.Reviewed by Cursor Bugbot for commit 232768c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Create new agents at the current scope depth with Ctrl+N in agents view
scoped_session_createcapability, the new session is created as a subagent anchored to the scope root's parent session file and depth, rather than at the top level.AgentsViewMode.createNewSessioncallsclient.waitForHello()and checks for the capability before includingruntimeMetadatain the create request; falls back to top-level creation if the daemon lacks the capability or the scope root has no session file.createRuntimehandler usesruntimeMetadata.parentSessionFileto setparentSessionandrlmDepthheaders on the new session.rlmChildId) are now treated as discardable when empty and idle; kernel-spawned child drafts remain protected.AgentDaemon.addRuntimenow consumes the storedrestoreActiveSessionIdregardless of runtime metadata kind, clearing it after use.Macroscope summarized 232768c.