Skip to content

fix: Claude CLI shutdown can falsely fail process cleanup - #171969

Merged
RomneyDa merged 1 commit into
mainfrom
fix/process-stdin-ci-20261014
Oct 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/process-stdin-ci-20261014

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Claude CLI shutdown can falsely report service child cleanup identity lost: write EPIPE when the process has already closed stdin.

User Impact

Closed CLI sessions can finish cleanup and allow a fresh session. Real delivery and descendant-cleanup failures still surface; there are no configuration or schema changes.

Why This Change Was Made

Make the existing managed stdin close operation idempotent. Root-exit and remote-pipe-close receipts already destroy stdin; a later graceful-shutdown call must not send another EOF over the closing control channel. The existing ownership receipts, descendant-extinction checks, deadlines, and error handling are unchanged.

Evidence

  • A new relay-host regression fails on unchanged main 1cbebe1a2596 with the same EPIPE call stack as the failing provider job, then passes with the fix. It exercises the production control sender and cleanup join with fixed external I/O; it does not certify native descendants by itself.
  • Final relay-host file: 34 passed, 23.36 s wrapper wall time. Managed stdin file: four passed, 1.84 s wrapper wall time. Test execution itself is below one second per file; most relay-file wall time is source transformation.
  • Original 67-file provider group on the actual tested merge 839c50c3 plus this production patch: 812 passed, one skipped, including all 51 Claude native-stdio cases. Linux amd64 is emulated; Node 24.19.0, pnpm 12.9.0, locked dependencies, two CPUs, and an 8 GiB memory limit. Vitest 224.14 s; test wrapper 228.98 s. This is the original failed group, not a full-product suite.
  • Production core types, the affected services-test type graph, focused lint, formatting, and whitespace checks pass. Fresh independent Codex P2 review is scoped-clean.

The original hosted interleaving is only partially reproduced: unchanged isolated and full Claude controls passed before this repair. The regression proves the redundant-EOF failure mechanism, not that every possible control-channel EPIPE is harmless. Hosted CI remains the exact-head qualification.

Related: #171524

@RomneyDa
RomneyDa marked this pull request as ready for review October 14, 2026 08:28
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@RomneyDa
RomneyDa enabled auto-merge (squash) October 14, 2026 08:37
@RomneyDa
RomneyDa merged commit 3a1232d into main Oct 14, 2026
184 checks passed
@RomneyDa
RomneyDa deleted the fix/process-stdin-ci-20261014 branch October 14, 2026 08:44
@RomneyDa

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Oct 14, 2026
…/plugin-memory-addon-presentation-20261014

* commit 'a8da8c92e3dbb21dd1441a30eb842fcd942e82b6': (52 commits)
  test(ui): await terminal reconnect fixture readiness (#171945)
  perf(gateway): retain only the requested ordered session page (#171968)
  test(gateway): cover automation run-alias placement lifecycle (#139313)
  fix(ci): retry FRV job listings with smaller pages after GitHub 5xx (#171952)
  fix(process): prevent false cleanup failures after CLI stdin closes (#171969)
  test(doctor): cover released updater advisory warnings (#157086)
  fix(ci): skip Testbox builds for known prose files (#171946)
  perf(sessions): remove redundant snapshot walks (#171964)
  fix(ci): skip plugin scaffold build for SDK instructions (#171944)
  fix(infra): preserve scheduler scope abort state after retirement
  fix: setup diagnostics can repair state without approval (#171960)
  perf(usage): avoid per-session admission churn during inventory (#171868)
  fix(ci): exclude documentation from extension lint scope (#171909)
  test(gateway): keep runtime-only compat flags out of live gateway config (#171953)
  docs: document ClawHub install telemetry opt-out (#114376)
  fix: recover completed chat replies after missed publication (#171766)
  refactor(ui): decouple session controller types from Lit (#171559)
  fix(gateway): settle worker reconciliation during busy shutdowns (#171843)
  fix(ci): ignore protocol prose in bundled check selection (#171908)
  fix(ui): align replacement lines and highlight inline diff edits (#171935)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant