Repository navigation
fix: prefer one-time ACP permission approvals - #31687
Draft
dylanhuff-at-coder wants to merge 1 commit into
Draft
dylanhuff-at-coder wants to merge 1 commit into
dylanhuff-at-coder wants to merge 1 commit into
Conversation
The agent-local ACP client auto-approves permission requests and preferred "always" options. Harnesses can attach durable side effects to those options: Claude Code's adapter saves allow rules to its settings files, and its plan-exit "always" options clear the session context and switch to auto or bypassPermissions mode. Select the one-time approval when one is offered and fall back to an "always" option only when no one-time option exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
The agent-local ACP client (
agent/x/agentacp/client.go) answers everysession/request_permissionautomatically and preferredallow_alwaysoptions overallow_once. Harnesses can attach durable side effects to "always" options:claude-agent-acp) turns "always" approvals into allow rules saved touserSettings,projectSettings, orlocalSettings. These rules persist in the workspace after the ACP session ends and also affect interactive use of the harness.ExitPlanMode, the adapter's firstallow_alwaysoption is "Yes, clear context and use auto mode" (or bypass permissions). Coder picked it, so a subagent that planned first lost its context and escalated its permission mode. Theallow_onceoption on the same prompt is "Yes, manually approve edits".This change selects
allow_oncewhen the harness offers it and falls back toallow_alwaysonly when no one-time option exists. The documented auto-approve behavior is unchanged. The ACP subagents page now says Coder prefers one-time approvals.This PR does not change whether ACP permission requests are approved automatically. That is the larger question: harness gates such as Pi extension
confirm/selectprompts (mapped to ACP permission requests bypi-acp) are still answered without the chat owner, and harness tool calls don't pass throughpre_tool_uselifecycle hooks. That needs a product decision and is tracked separately.🤖 Generated with Claude Code