Repository navigation
fix(plan): keep read-only Git tools for planning children - #621
Merged
Merged
Conversation
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
Relates to #27.
Plan Mode permits
git_show,git_diff, andgit_login the parent read-only surface, and the child-session boundary already classifies them as child-safe. However,PLAN_MODE_CHILD_TOOLSomitted all three. A planning child therefore lost read-only Git inspection even when using a built-in plan-compatible investigator role.Value
Planning children can inspect revisions, diffs, and history without leaving the enforced read-only Plan Mode boundary. This keeps parent and child investigation capabilities consistent while retaining the existing fail-closed restrictions.
Approach
PLAN_MODE_CHILD_TOOLS.write,edit,bash, spawning, unknown tools, and all unlisted capabilities remain unavailable.No new tool, configuration, model behavior, or lifecycle is introduced.
Validation
bun test tests/extensions/plan-mode/index.test.ts- 16 passed.bun test tests/extensions/shared/child-session.test.ts- 19 passed.bun run check- passed.git diff --check- passed.bun run test- started and ran through the suite, but the existingtests/extensions/post-edit/lifecycle.test.tsworker remained hung in this Windows environment. The same extension was outside this change and the run was stopped after confirming its process lineage; this PR does not claim the full suite passed.Reproduced before the fix on
origin/main@43cd2e94cc584f81cc1f27512ae99c9a4099b231:planModeChildTools(undefined)omitted exactlygit_show,git_diff, andgit_logfrom the existing read-only agent tool set.Impact