Allow read-only shell during Plan mode after ask_user_question - #90
Closed
mingminghome wants to merge 1 commit into
Closed
Allow read-only shell during Plan mode after ask_user_question#90mingminghome wants to merge 1 commit into
mingminghome wants to merge 1 commit into
Conversation
Plan mode was auto-rejecting every execute permission, so after the user answered a question card the agent’s next inspect shell (file/sips/ls) failed with a misleading “approve the plan first” notice. Align the permission gate with the terminal allowlist, clarify the notice, and treat sips -g plus null redirects as safe explore.
Author
|
Test recommandation: 1. Force the question popupThe “You answered” UI only appears when the agent calls Direct:
2. expected resultWith the fix: a read-only shell like
Still blocked (expected): |
Author
|
Thank you for solving this issue 😃 |
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
Fixes the Plan-mode UX where, after the user answers an
ask_user_questioncard, the agent continues exploring but the next read-only shell (file/sips -g/ls, etc.) is auto-rejected with a misleading notice:Answering questions is not plan approval. While planning, inspection should keep working; only real mutations stay blocked until the plan review card is approved.
Closes #89
What changed
executeis auto-allowed whenisReadOnlyCommand(command);edit/ write / mutating execute still auto-reject.sips -g/--getProperty(macOS image inspect), strip harmless2>/dev/null/2>&1before unsafe checks; keep real redirects blocked.test/plan-gate.test.ts.Test plan
npm test(full suite green locally)