Repository navigation
fix(acp): honor agent thinkingDefault for ACP bindings instead of forcing adaptive - #129260
ayeshafayyaz-pixel wants to merge 1 commit into
Conversation
…cing adaptive ACP bindings resolved the owner agent's model but not its thinking policy, so runtimeOptions.thinking was never set and the agent fell back to the runtime's adaptive level. That broke ACP runs on models without adaptive support (e.g. ollama-cloud). Resolve the owner agent's thinking policy at bind time and thread it through the binding spec/record into runtimeOptions.thinking, mirroring the gateway's resolution (explicit thinkingDefault wins, else the model-family default, which still yields adaptive for models that support it). Thinking flows via the existing config-option channel; no acpx adapter change and no new setting.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 7:57 AM ET / 11:57 UTC. ClawSweeper reviewWhat this changesThe PR carries an agent’s resolved thinking policy through configured ACP binding records into ACP session runtime options. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 8 items remain Keep open: ready ACP bindings return after reconciling only model, so they retain the old adaptive thinking setting. The earlier P1 finding remains unresolved, and the PR has mock-only proof. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherConfigured channel bindings map a conversation to an agent-owned ACP session. The persistent binding record supplies runtime options, which OpenClaw sends to the ACP runtime before a turn. flowchart LR
A[Channel conversation] --> B[Configured ACP binding]
B --> C[Agent policy resolution]
C --> D[Persistent binding record]
D --> E[ACP session lifecycle]
E --> F[Runtime configuration]
F --> G[ACP runtime]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +31, Tests +33. Total +64 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Extend the existing ready-session runtime-option update to reconcile thinking, add a lifecycle regression for a pre-existing session, and then show a redacted ACP trace for the affected configuration path. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: a structurally matching ready session updates only model and returns, so the newly initialized-only thinking value never reaches an existing binding. Is this the best way to solve the issue? No. The existing runtime configuration channel is the right boundary, but the patch must reconcile thinking through the ready-session path as it already does for model. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2e54fe711630. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Consolidated and landed in #128169, commit 8d8736d. Thank you @ayeshafayyaz-pixel; your contribution is preserved in the co-author trailers and PR acknowledgments alongside @chelsealong. The canonical repair carries configured thinking through the binding record and also handles already-ready sessions, explicit agent/per-model/global precedence, omission retention, and ACP spawn defaults. Supported live controls are applied before persistence; Codex's unsupported live Paired native Codex proof and the final Ollama three-turn |
What Problem This Solves
Closes #128145.
ACP bindings resolve the owner agent's model but never resolve the owner agent's thinking policy, so
runtimeOptions.thinkingis never populated. The agent then falls back to the runtime'sadaptivethinking level, which breaks ACP runs on models that don't support adaptive thinking:An agent configured with
thinkingDefault: 'off'is ignored on the ACP path even though the gateway session path already honors it.Why This Change Was Made
The fix resolves the owner agent's thinking policy alongside its model at bind time and threads it through the existing binding spec → record →
runtimeOptions.thinking, reusing OpenClaw's existing config-option delivery channel. It mirrors the gateway's own resolution (resolveGatewaySessionThinkingDefault): an explicit per-agentthinkingDefaultwins, otherwise the model-family default (resolveThinkingDefault) applies — which still yieldsadaptivefor models that support it, preserving current behavior.No new plugin/ACPX setting is added, and the acpx adapter is untouched:
[email protected]'sSessionAgentOptionshas nothinkingfield, so thinking correctly flows via the already-wiredsession/set_config_optionpath (buildRuntimeConfigOptionPairs→applyManagerRuntimeControls), not via session options.User Impact
ACP agents now honor their configured
thinkingDefault(e.g.off), so ACP runs on models without adaptive-thinking support (Ollama Cloud, etc.) no longer error out. Models that supportadaptiveare unaffected.Files changed
src/channels/plugins/acp-configured-binding-consumer.ts— resolve owner thinking policy at bind time and pass it into the spec.src/acp/persistent-bindings.types.ts— carrythinkingon the binding spec and round-trip it through the persisted record.src/acp/persistent-bindings.lifecycle.ts— includethinkingin the ACP sessionruntimeOptions.src/channels/plugins/acp-bindings.test.ts— regression coverage.Evidence
acp-bindings.test.ts:thinkingDefault: 'off'reaches the ACP binding record (metadata.thinking === 'off');vitest run src/channels/plugins/acp-bindings.test.ts→ 9/9 pass.src/acp/persistent-bindings.test.ts+src/channels/**→ 1068/1068 pass.oxfmtclean;git diff --checkclean.This change was prepared with AI assistance (Claude Code).