fix: separate Navigator from subagent delegation - #112
Merged
Conversation
- reserve Navigator tools for explicit native session workflows - inherit caller agent and model context for created sessions - reject unknown V2 agents before prompt admission - document and test the updated lifecycle behavior
There was a problem hiding this comment.
★★★★☆
Navigator cleanly separates native-session orchestration from subagent delegation, and the caller-inheritance + V2 agent validation logic is well covered by the new tests. Two medium concerns:
- (inline)
assertKnownV2Agentruns after worktree creation on thenew_worktreepath, so an unknown agent now leaks a worktree with no error context. packages/opencode/navigator.ts:898— V2session_createandsession_sendnow hard-depend onclient.v2.agent.listfor every call that selects an agent (including caller-inherited agents), butgetNavigatorCompatibilityWarningonly verifiesclient.v2.sessionmethods for the V2 path. If a runtime-"compatible" OpenCode version lacksv2.agent.list, every agent-carrying V2 create/send throws an unrelated "OpenCode agent list" failure instead of operating or emitting the Navigator-incompatibility warning. Worth confirming 1.17.12 shipsagent.list, or adding it to the V2hasMethodslist (and degrading gracefully when missing).
Contributor
Author
|
Addressed the |
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.
Ticket
SKIPPED
Description
Reserve Navigator for explicitly requested native-session workflows while directing ordinary delegation to OpenCode's built-in task tool. Created sessions now inherit the caller's agent, model, and variant, and V2 operations reject unknown agent names before prompt admission.
Checklist
Delegation Boundaries
Session Context
Documentation
Validation
bun run compilecompletes successfullybun run typecheckreports no diagnostics