fix(subagents): align investigator role wording - #523
Open
bkyssn wants to merge 1 commit into
Open
Conversation
tt-a1i
approved these changes
Sep 9, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed at exact head cd359f2. Standards and Spec both pass with no actionable findings. The revised investigator wording now matches the runtime-enforced inherited-tool contract, while explicit allowlists and Plan Mode remain the real read-only boundaries. Focused contract tests and hosted CI are green.
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
Built-in
explorer,reviewer, andadvisorinherit the active parent child-tool surface in ordinary mode, but their role descriptions and child system-prompt addenda described them as read-only. This made the model-visible role purpose conflict with the[inherited-tools]capability class and the effective tools reported after spawn. Fixes #514.Value
Parents can select investigator roles from wording that matches the capability boundary actually enforced by Pi and OpenPI. Explicit role allowlists and Plan Mode remain the places that create a read-only child boundary.
Approach
capabilityClass()through the public roster, derives effective child tools with the existing helpers, and confirms spawn reporting excludes parent-only tools. It also keepsREAD_ONLY_AGENT_TOOLSclassified asread-onlyfor explicitly bounded roles.Validation
node --test --experimental-strip-types tests/extensions/subagents/prompt.test.ts— 14 passed.node --test --experimental-strip-types tests/extensions/subagents/agent-types.test.ts— 22 passed.node --test --experimental-strip-types tests/extensions/shared/child-session.test.ts tests/extensions/workflows/execute.e2e.test.ts— 42 passed.bun run check— passed.bun run test— failed in two pre-existing, independently reproducible Plan Mode renderer cases:tests/extensions/plan-mode/result-rendering.test.tsleaves OSC 8 terminal-link escapes in rendered text. This diff does not touch Plan Mode or rendering code.Impact
implementer, custom roles that omittools, explicit allowlists, parent-only exclusions, and Plan Mode restrictions retain their existing behavior.