Repository navigation
fix(anthropic): report owner loss after a broken CLI input pipe - #198778
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets Claude CLI input-failure settlement finish when its process owner disappears without reporting an exit. Example: Claude CLI initialization encounters write EPIPE, then the process owner reports cleanup identity loss without an exit event.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a focused repair for a current-main failure path, and no introduced correctness or security defect was found. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Anthropic plugin translates Gateway turns into Claude Code stream-json requests; its transport sends input, reports process failures, and joins authoritative process cleanup before releasing the session. flowchart LR
A[Gateway turn] --> B[Anthropic CLI runtime]
B --> C[CLI transport]
C --> D[Owned process]
D --> E[Claude Code]
D --> F[Extinction outcome]
F --> C
C --> G[Turn failure and cleanup]
Technical reviewBest possible solution: Retain the minimal transport repair and existing independent cleanup join, with broader conversation recovery tracked separately. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the EPIPE-first deadlock, and the author reports a regression that fails on the base and passes with the repair; this read-only review executed no target code. Is this the best way to solve the issue? The smallest complete fix is to let the existing process owner's extinction outcome release input-failure settlement while preserving ordinary exit handling and the separate cleanup join. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 07e049f8d440. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +16. Total +17 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 4:19 AM ET / 09:19 UTC. |
|
Merged via squash auto-merge.
|
* commit 'e741fd0d21ff7f9857a9c49f91d95166beaae83f': feat: invite members as existing people on a claw (#198773) fix(anthropic): report owner loss after a broken CLI input pipe (#198778) feat(browser): support experimental Kitesurf browsing (#198833) fix(bench): require the state-reader task counter (#198912)
Related: #195082
What Problem This Solves
A Claude CLI conversation can hang when its stdin pipe breaks before the process owner is lost, leaving startup and error reporting waiting for an exit event that never arrives.
User Impact
The conversation reports the failure instead of remaining pending. Unconfirmed process cleanup still returns the existing actionable error.
Why This Change Was Made
Let the existing process owner's extinction outcome release stdin failure settlement while preserving the normal exit path, diagnostics, cancellation precedence, and independent cleanup join. No new lifecycle state, public API, or dependencies.
Evidence
08ae8c62b83ede02db3a8d2bc3ce36206008d253: the new stdin/owner-loss case timed out after 120 seconds; the two existing cases passed. With the repair, all three passed and the formerly hanging case settled in 3 ms.08ae8c62b83ede02db3a8d2bc3ce36206008d253..170dba8a5b98f8ff500008aed51b52e8db5df830: no introduced correctness or security findings. Its requested native owner-loss proof is now covered below; the review itself did not execute that probe.EPIPE. The base leaves initialization pending with zero caller errors; the fix rejects initialization and reports exactly one error. Neither run receives an exit event. Cleanup uncertainty remains an error, and both fixture command and anchor were verified gone.