fix(cli): accept empty Claude end turns#89029
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the linked wrong-model fallback bug is already fixed on current main and shipped, while the remaining parser-level Claude empty-result work is covered by a newer proof-positive PR with a safer boundary. Canonical path: Keep the shipped silent-empty policy fix and use #90450 as the canonical parser-level review path for Claude empty-result streaming behavior. So I’m closing this here and keeping the remaining discussion on #90450 and #88946. Review detailsBest possible solution: Keep the shipped silent-empty policy fix and use #90450 as the canonical parser-level review path for Claude empty-result streaming behavior. Do we have a high-confidence way to reproduce the issue? No current-main reproduction remains for the linked fallback bug: current main and Is this the best way to solve the issue? No. The current main policy fix plus the newer parser-level PR is a safer solution than this branch's obsolete parser-owned Security review: Security review cleared: The diff is limited to CLI parser/runner/test behavior and does not add dependencies, workflows, package-resolution changes, secrets handling, or new code-execution surfaces. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 231b5a14d5d7; fix evidence: release v2026.6.6, commit 9ead0ae9219e. |
|
Thanks for the review. I cannot honestly provide live Claude CLI thinking-only/end_turn proof from this contributor environment without relying on private local Claude session state or forcing an intermittent production runtime shape I do not control. What I can provide here is the focused regression proof from the PR body: the parser now preserves the structured empty-result signal from the Claude JSONL result shape, So the remaining live proof item should be handled in a maintainer environment that can safely reproduce the real Claude CLI session behavior. I am leaving the patch scoped to the shared parser/runner path covered by the regression test rather than claiming live proof I do not have. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
resultfrom being converted intoempty_responsefailover errors.runPreparedCliAgent, so clean no-reply turns finish without invoking a fallback model.Linked context
Closes #89008.
Real behavior proof (required for external PRs)
result: ""/ thinking-onlyend_turnturns triggeredempty_responseand model fallback.PNPM_CONFIG_OFFLINE=true corepack pnpm test src/agents/cli-runner.reliability.test.ts -- --reporter=dotrunPreparedCliAgentreturns a successful no-payload result withfallbackUsed: falseand does not emit anllm_outputhook for the empty assistant text.resultshape already parsed by OpenClaw.Tests and validation
corepack pnpm exec oxfmt --write --threads=1 src/agents/cli-output.ts src/agents/cli-runner.ts src/agents/cli-runner.reliability.test.tsPNPM_CONFIG_OFFLINE=true corepack pnpm test src/agents/cli-runner.reliability.test.ts -- --reporter=dotgit diff --check -- src/agents/cli-output.ts src/agents/cli-runner.ts src/agents/cli-runner.reliability.test.tsRisk checklist
resultoutputs setallowEmptySuccess; the existing unstructured empty stdout regression still expectsempty_response.Current review state
Ready for review. Waiting on CI and maintainer review; live Claude CLI intermittent reproduction was not run here.