fix(followup): route CLI runtime drains through CLI runner (#82847)#82857
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection on current main gives a high-confidence path: configure a queued followup model whose runtime resolves to claude-cli or another CLI backend, and the followup runner still reaches runEmbeddedPiAgent instead of the CLI runner. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow followup-runner CLI routing fix after real queued-followup CLI proof or an explicit maintainer proof waiver, while leaving broader helper-path work to #72499. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main gives a high-confidence path: configure a queued followup model whose runtime resolves to claude-cli or another CLI backend, and the followup runner still reaches runEmbeddedPiAgent instead of the CLI runner. Is this the best way to solve the issue? Yes for the code shape. The PR applies the existing primary-reply CLI dispatch contract to queued followups and keeps embedded fallback behavior, but merge should wait for real behavior proof or an explicit maintainer waiver. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ee10fe17f063. |
29ce366 to
d986dfa
Compare
|
Verification for the maintainer fixup on this PR: Behavior addressed: queued followup turns now route CLI runtime selections ( |
d986dfa to
0cc4d88
Compare
|
Verification update for latest SHA Behavior addressed: queued followup turns now use the selected CLI runtime backend, so
|
66fe61e to
d2a5a32
Compare
|
Verification update for latest SHA Behavior addressed: queued followup turns now use the selected CLI runtime backend, so
|
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…82847) (openclaw#82857) * fix(followup): route CLI runtime drains through CLI runner * fix(followup): route queued CLI runtimes --------- Co-authored-by: hclsys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Summary
Fixes #82847.
Queued followup drains now mirror the primary reply path's runtime split:
runCliAgentrunEmbeddedPiAgentpath for embedded/runtime-default attemptsWhy
The followup queue previously always called
runEmbeddedPiAgent. For sessions whose selected model maps to a CLI runtime such asclaude-cli, that can pass the CLI runtime id into embedded harness selection and fail withRequested agent harness "claude-cli" is not registered.Real behavior proof
agentRuntime.id = "claude-cli"must dispatch to the CLI backend instead of the embedded Pi harness selector.29ce366db53fd0714a2d29c07a1469677a3bf128on Linux, Node runtime from the repo toolchain, using the real runtime-selection helpers imported throughtsx.The focused followup-runner regression then exercises that same selected CLI provider through a queued followup and asserts
runCliAgentis called whilerunEmbeddedPiAgentis not called.anthropic/claude-opus-4-7selection toclaude-cli, and the regression test confirms the followup runner now dispatches that case throughrunCliAgentinstead of embedded harness selection.Audits
resolveCliRuntimeExecutionProvider,isCliProvider,runCliAgent, andgetCliSessionBinding; no new runtime abstraction.Tests
Note: a full
tsc --noEmit --project tsconfig.json --incremental falseOOMed locally even with--max-old-space-size=8192;pnpm check:changedcompleted the relevant core/core-test typechecks through the repo'stsgolane.