fix(acp): use tool id as permission cache key instead of command string#990
Merged
fix(acp): use tool id as permission cache key instead of command string#990
Conversation
Previously the ToolCallUpdateFields title was set to the full command
string (e.g. "gh api repos/.../contents/docs --jq '...'"), making the
permission cache key unique per invocation. This caused Allow always to
have no effect — every distinct command bypassed the cache and prompted
the user again.
Fix: set title to the stable tool id ("bash") and move the full command
to raw_input for display in the IDE's "View Raw Input" panel. A single
Allow always for bash now covers all shell invocations.
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
Allow alwaysfor bash tool calls had no effect — every distinct commandtriggered a new permission prompt regardless of prior decisions.
Root Cause
terminal.rssetToolCallUpdateFields::titleto the full command string(
gh api repos/.../contents/docs --jq '...'). The permission cache inAcpPermissionGatekeys ontitle, so each unique command was a separatecache entry. Selecting
Allow alwayssaved one specific command string butnever matched subsequent calls.
Fix
titleis now set to the stable tool id ("bash")raw_inputand remains visible in the IDE's"View Raw Input" panel
Allow alwaysforbashnow covers all shell invocationsTest plan
cargo clippy -p zeph-acp -- -D warningspasseszeph-acppass