fix(adapter/claude-local): warn when adapterConfig.command is ignored by the ACP lane - #298
Open
claudegoogl-sudo wants to merge 2 commits into
Open
fix(adapter/claude-local): warn when adapterConfig.command is ignored by the ACP lane#298claudegoogl-sudo wants to merge 2 commits into
claudegoogl-sudo wants to merge 2 commits into
Conversation
… by the ACP lane A containment wrapper wired through adapterConfig.command is honored only by the CLI lane; the ACP lane resolves its server command from agentCommand/acpAgentCommand alone, so such a wrapper silently left the ACP spawn path while runs kept starting. Detect the dead override at the lane boundary and warn on the server log, the run log, and the ACP Test surface without changing resolution precedence. The warning stays silent when an explicit ACP command (agentCommand/acpAgentCommand) is set and for the CLI engine, which still honors the field. Co-Authored-By: Paperclip <noreply@paperclip.ing>
…P server command hint The ACP server command hint now states that the CLI-only command field is ignored by the engine and that a run warns when it is set. Applied to the server config schema and the matching UI field so operators see the trap at the place they configure the adapter. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Owner
Author
|
Pinged for the required pre-merge security review on the board (reviewer: SecurityEngineer, who authored this remediation spec). Review focus: (1) warning placement at the lane boundary vs inside the resolvers, (2) suppression when an explicit ACP command is already set, (3) echo of the ignored operator-set value in the warning text. CI is running on this PR; the policy gate is green and the paths-filtered Storybook/review checks are skipped (measured, not assumed). I will treat any red check as P0 and fix before merge. |
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.
Thinking Path
Linked Issues or Issue Description
No public issue exists for this change. Description below follows the bug report fields:
What happened?
resolveClaudeAcpCommand()inpackages/adapters/claude-local/src/server/acp.tsreads onlyagentCommand/acpAgentCommandand then falls back to binary discovery. A non-emptyadapterConfig.commandis never consulted and never reported on the ACP lane. The CLI lane still honorsadapterConfig.command(seeexecute.ts), so acommandvalue that points at a containment wrapper works until the engine resolves toacp. Then the wrapper silently leaves the spawn path while runs keep starting.Expected behavior
The adapter warns loudly when
adapterConfig.commandis set and the ACP lane ignores it. Resolution precedence stays unchanged.Steps to reproduce
Set
adapterConfig.command = "/x/wrapper.sh"on aclaude_localagent withengine=acp, run the agent, and open the adapter Test surface. Before this change: no warning anywhere. After this change: one warning in the server log and the run log, plus oneclaude_acp_command_override_ignoredwarn check on the Test surface.Agent adapter(s) involved
claude_local, ACP lane only. The CLI lane is unchanged.What Changed
findIgnoredClaudeAcpCommandOverride(), a detection-only helper. It reports the deadcommandvalue only when no explicit ACP command (agentCommand/acpAgentCommand) is set. It never changes resolution.formatIgnoredClaudeAcpCommandOverrideWarning(), one shared searchable warning line:adapterConfig.command is set but ignored in engine=acp; use agentCommand/acpAgentCommand — if this pointed at a wrapper, that wrapper is OFF the ACP spawn path (ignored value: ...).createClaudeAcpExecutor): the warning goes to the server log (console.warn) and the run log (onLog("stderr", ...)), exactly once per run. The warning lives at the lane boundary because the command resolvers stay pure, and one run consults them several times. An engine gate keeps the CLI engine silent even if the closure is reached withengine=cli.testClaudeAcpEnvironment): a new warn checkclaude_acp_command_override_ignored, plus the same server-log line.agentCommandfield hint in the config schema and the matching UI field: the CLI-onlycommandfield is ignored by this engine, and a run warns when it is set.Verification
pnpm exec vitest run packages/adapters/claude-local/src/server/acp.test.ts— 27 passed (21 tests before this change).acp.tssource. 3 tests failed withexpected [] to have a length of 1 but got +0on both warning-present cases, plus the helper unit test. With the fix applied, all 27 pass.pnpm --filter @paperclipai/adapter-claude-local typecheck— clean.node scripts/check-no-internal-ids.mjsagainst the base — clean.exitCode === 0) withcommandset, which proves the detection changed no resolution precedence.Risks
commandvalue, or when the ACP Test surface runs. No log noise, no loops.commandvalue back. That value is operator-set adapter config — the same trust level the existing "Claude ACP server command is executable" check already renders.Model Used
GLM via the prime_local runtime (local Paperclip adapter driving an event-stream agent CLI), extended reasoning + tool use + code execution, operating as agent "Coder" under the Paperclip runtime.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template#NNN/github.com/paperclipai/paperclipURLs)docs/...,fix/...) and contains no internal Paperclip ticket id or instance-derived detailsgh pr checksoutputFollows
CONTRIBUTING.mdPR template — sections present: Thinking Path, Linked Issues or Issue Description, What Changed, Verification, Risks, Model Used, Checklist.