Allow read-only subagents during plan mode - #82
Open
ralphschuler wants to merge 3 commits into
Open
Conversation
ralphschuler
marked this pull request as ready for review
May 12, 2026 15:19
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.
Summary
Allow subagents during
/planwhile enforcing read-only child-agent execution before plan approval.Changes
/planworkflow.subagent action=create,subagent action=delete, and subagentoutputfile writes while planning is active because they write/remove local files.subagent list,run, andparallelduring planning, with read-only execution constraints for child runs.--tools read,grep,find,ls.Validation
Result: all passed.
Skipped/blocked:
npm run docs:build # mkdocs: not foundRisks/Rollback
Risk: read-only child enforcement depends on child Pi honoring
--tools read,grep,find,ls. The parent/planguard also blocks custom agent creation/deletion and subagent output writes before approval to close hidden write paths.Rollback: revert this PR to restore previous subagent execution behavior during
/plan.Related Issues
Closes #58
Conversation Context
Selected issue #58 as the highest-priority actionable security issue after issue #68 was merged. Implementation followed behavior-first vertical slices: plan-mode subagent action gating, read-only child process command construction, prompt constraints, tests, then docs. Follow-up review found
subagent action=createwas a hidden pre-approval write path, so this PR now blocks it during/planto preserve the read-only safety contract.