fix: preserve config-selected subagent model overrides#92573
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 12, 2026, 10:07 PM ET / 02:07 UTC. Summary PR surface: Source +28, Tests +49. Total +77 across 4 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against ded3a9305876. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +28, Tests +49. Total +77 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
04a5c3b to
f5539a9
Compare
|
Land-ready verification for
This patch changes only subagent model-selection provenance. It does not change provider transports, request payloads, tool schemas, or OpenAI/Anthropic tool-call handling. No Anthropic live call was run for that reason. |
Summary
Verification
node scripts/run-vitest.mjs src/agents/openclaw-tools.subagents.sessions-spawn.model.test.ts src/agents/subagent-spawn.model-session.test.ts src/agents/agent-scope.test.ts src/agents/subagent-spawn.test.ts src/agents/agent-command.live-model-switch.test.ts src/agents/model-selection.test.ts(265 tests passed)node scripts/run-oxlint.mjs src/agents/subagent-spawn-plan.ts src/agents/subagent-spawn.ts src/agents/openclaw-tools.subagents.sessions-spawn.model.test.ts src/agents/subagent-spawn.model-session.test.tspnpm exec oxfmt --write --threads=1 src/agents/subagent-spawn-plan.ts src/agents/subagent-spawn.ts src/agents/openclaw-tools.subagents.sessions-spawn.model.test.ts src/agents/subagent-spawn.model-session.test.tsgit diff --checkReal behavior proof
Behavior addressed: A subagent model selected from configuration was persisted as an automatic override without origin metadata, then discarded before child execution as if it were a legacy fallback.
Real environment tested: Live OpenClaw gateway and real OpenAI API. Parent model
openai/gpt-5.5; configured child modelsopenai/gpt-5.4and baregpt-5.4.Exact steps or command run after this patch: Ran targeted temporary live Vitest probes through
OPENCLAW_LIVE_TEST=1 node scripts/run-vitest.mjs, starting the real gateway, having GPT-5.5 invokesessions_spawnwithout a model argument, waiting for the child run, then reading the child registry and assistant transcript. Repeated with bare configured modelgpt-5.4and target default provideropenai.Evidence after fix: Copied live output from the real gateway runs:
Observed result after fix: The parent made a real
sessions_spawntool call, and both child executions used GPT-5.4 exactly as configured. The qualified-model scenario passed in 48.69 seconds; the bare-model scenario passed in 39.10 seconds.What was not tested: No Anthropic live call was needed because this change does not alter provider transports, request payloads, tool schemas, or OpenAI/Anthropic tool-call handling. The exercised OpenAI path confirms the existing official tool-call flow remains functional.
Closes #92486