Repository navigation
fix(cli): report exact Claude stream failures - #127169
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 9:27 PM ET / August 22, 2026, 01:27 UTC. ClawSweeper reviewWhat this changesThe PR makes managed Claude CLI live turns retain the streaming JSONL parser’s exact bounded failure message instead of replacing it with a generic output-limit error. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the patch is a focused, correct repair for a current-main diagnostic-loss bug, with no blocking findings. Exact-head required checks are still running after the latest force-push. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherManaged Claude live turns frame Claude CLI JSONL output, parse records, and send any failure through the live-turn error boundary. That boundary supplies the diagnostic shown to operators after the turn aborts. flowchart LR
A[Claude CLI JSONL output] --> B[Output framing]
B --> C[Streaming parser]
C --> D{Parser failure?}
D -->|No| E[Continue live turn]
D -->|Yes| F[Live-turn error boundary]
F --> G[Operator diagnostic]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +21. Total +29 across 3 files. View PR surface stats
Review metrics
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: Keep one shared formatter and propagate the parser-owned value at the live boundary, then merge once the current head’s required checks are green. Do we have a high-confidence way to reproduce the issue? Yes — source establishes a focused current-main path: the parser records a specific error while the live boundary discards it at src/agents/cli-runner/claude-live-turn.ts:363. Is this the best way to solve the issue? Yes — forwarding the parser-owned bounded text at the sole live boundary aligns it with the non-live CLI path while preserving the existing format classification and safety limits. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 249e1bfb004b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
@clawsweeper re-review: real managed-Claude proof is now included in the PR evidence. The isolated dev run returned the exact parser-owned line-limit diagnostic; the temporary lowered boundary is not part of the patch. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
c4e19b8 to
39404d7
Compare
39404d7 to
53ddfac
Compare
Preserve parser-owned bounded diagnostics in managed Claude live turns and share the canonical output-limit formatter. Co-authored-by: Marvinthebored <[email protected]>
Closes #127168
What Problem This Solves
Root cause
Managed Claude live turns asked the shared JSONL parser only whether it had failed, then replaced the parser-owned bounded diagnostic with
Claude CLI turn output exceeded limit.This erased the actual raw-character, line-count, single-line, or backend-parser failure. The non-live CLI path already preservedgetErrorText().Fix
The live-turn boundary now propagates the parser's exact bounded error text while preserving the existing
formatfailover classification and safety limits. The separate live stdout framer uses the parser's canonical output-limit formatter, so it cannot drift from parser diagnostics.Owner-boundary regressions cover raw-character, line-count, single-line, media-padding, and backend-parser failures. No limits, fallback behavior, configuration, or public API changed.
Production delta: +12/-4 (net +8). Tests: +25/-4 (net +21). The production growth is the smallest coherent shape: one exported canonical formatter plus propagation of the already-owned parser value across the live-turn boundary.
Evidence
Exact-head proof
Head:
53ddfac3b65852886c101f5756ceb0bf5f01449amainlive Telegram reproduction: genericClaude CLI turn output exceeded limit.diagnostic; provider requests: 0.oxfmt --check: passed for all 3 changed files.pnpm tsgo: passed.pnpm check:test-types: passed.CLI JSONL output exceeded 20000 lines; refusing to parse output.in the run-scoped Gateway log; Telegram returned the safe retry reply; 2 typing events + 1 SUT message recorded; provider requests: 0.openclaw/ci-gatepassed; all required checks successful.AI-assisted by Codex (OpenAI). Investigation context and sanitized production evidence are recorded in #127168.