Repository navigation
fix(engine): show the full command in system temp-scope approval asks - #2263
Merged
Merged
Conversation
The approval for a Shell call with temp_scope "system" carried only the first two words of the command as command_summary. It now carries the command, timeout_ms, background, and temp_scope as Shell decodes them, so duplicate or case-variant keys show the value that runs. Runner-owned temporary paths and environment values never enter the call and still never appear. Subagent consumers of the ask args follow: isolation auto-approve no longer clears a system temp-scope ask, a surfaced child ask names the scope, and the headless ask reviewer is told about host-shared temporary storage. The TUI pretty view annotates background and temp_scope. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 11, 2026
peppescg
added a commit
that referenced
this pull request
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
JAORMX
approved these changes
Oct 13, 2026
peppescg
added a commit
that referenced
this pull request
Oct 13, 2026
…e tool executes Permission evaluation, approval display and tool execution now read a tool call's arguments through one decode, governance.DecodeToolArgs, which session.ParseArgs and the policy extractors share. governance.CheckToolArgs refuses argument objects that repeat a key, have top-level keys equal under Unicode case folding, or spell a policy-read argument in another case. Engine.permissionDecision applies it before policy evaluation, so such calls are rejected with a tool error before any rule, guardrail, approval, hook or tool sees them. The evaluator and ParseArgs apply the same check. The tests that pinned the old case-insensitive, last-key-wins reading now assert rejection, including the ambiguous cases added by #2263. Closes #2264 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Merged
2 tasks
peppescg
added a commit
that referenced
this pull request
Oct 14, 2026
…e tool executes Permission evaluation, approval display and tool execution now read a tool call's arguments through one decode, governance.DecodeToolArgs, which session.ParseArgs and the policy extractors share. governance.CheckToolArgs refuses argument objects that repeat a key, have top-level keys equal under Unicode case folding, or spell a policy-read argument in another case. Engine.permissionDecision applies it before policy evaluation, so such calls are rejected with a tool error before any rule, guardrail, approval, hook or tool sees them. The evaluator and ParseArgs apply the same check. The tests that pinned the old case-insensitive, last-key-wins reading now assert rejection, including the ambiguous cases added by #2263. Closes #2264 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
peppescg
added a commit
that referenced
this pull request
Oct 15, 2026
…e tool executes Permission evaluation, approval display and tool execution now read a tool call's arguments through one decode, governance.DecodeToolArgs, which session.ParseArgs and the policy extractors share. governance.CheckToolArgs refuses argument objects that repeat a key, have top-level keys equal under Unicode case folding, or spell a policy-read argument in another case. Engine.permissionDecision applies it before policy evaluation, so such calls are rejected with a tool error before any rule, guardrail, approval, hook or tool sees them. The evaluator and ParseArgs apply the same check. The tests that pinned the old case-insensitive, last-key-wins reading now assert rejection, including the ambiguous cases added by #2263. Closes #2264 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This branch was successfully deployed
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
A Shell call with
temp_scope: "system"needs the independentShellSystemTempapproval. That approval's args held onlytemp_scopeand acommand_summarywith the first two whitespace-separated words of the command, so approvers in Studio, the TUI, and ACP clients did not see the full command that would run.The approval now shows the full command, without host paths:
{"command", "timeout_ms", "background", "temp_scope"}, re-encoded from the call as Shell decodes it. Duplicate or case-variant keys therefore show the value that runs.timeout_msandbackgroundappear only when set.&,<, and>stay literal.TestSystemTempApprovalDoesNotLeakPathstill checks this).command_summaryis removed. No client in the repo reads it.Related consumers of the ask args:
[temp_scope: system], and the headless ask reviewer gets a trusted line saying the command requests host-shared temporary storage.background: trueandtemp_scope: …lines next to the existingtimeout_msline.Tests
TestSystemTempApprovalShowsFullCommand: compound command, timeout and background, duplicate key, case-variant keys (exact projected bytes).TestSystemTempApprovalMatchesExecutedCommand: approves the ask and checks the command shown is the one the runner received.TestSystemTempApprovalDoesNotLeakPath: now also requires the full command.TestIsolatedSubagentSystemScopeAskIsNotAutoApproved,TestAskReviewPromptNamesSystemTempScope,TestSurfacedCommandPreviewNamesSystemTempScope,TestPermissionModalShellPrettyAnnotatesScopeAndBackground.Docs:
user-docs/features/sessions/tools.mdandengine/CHANGELOG.md.Screenshot
The mecatui permission request for a Shell call with
temp_scope: system, before (main) and after this PR. In both cases the command that runs isgit status && echo done.The argument text comes from mecatui's own
askArgsContent, fed the payload each engine version sends. The surrounding frame is drawn to match the TUI.🤖 Generated with Claude Code