Skip to content

fix(T13890): no warning when session end finds no session (exit 24/31) - #2367

Merged
kryptobaseddev merged 1 commit into
mainfrom
fix/T13890-benign-session-end-exit
Oct 18, 2026
Merged

kryptobaseddev merged 1 commit into
mainfrom
fix/T13890-benign-session-end-exit

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Follow-up to #2363, for review-hotfix's LOW finding there.

When a Stop has no bound session, cleo session end exits with E_SESSION_UNBOUND (24) or E_SESSION_NOT_FOUND (31). The Stop dispatcher was printing "session end failed … (exit 24)" for that expected case.

  • runBounded(..., benignExits = []): a non-zero exit listed in benignExits prints no warning. Every other non-zero exit, a signal, a spawn error and an overrun still print one line.
  • The new exported SESSION_END_BENIGN_EXITS is [ExitCode.SESSION_UNBOUND, ExitCode.SESSION_NOT_FOUND], using the named constants from @cleocode/contracts/exit-codes.js. The dispatcher's session end passes it.
  • Test, added to the existing real-child test: processes exiting 24 and 31 produce no warning, and exit 3 is still reported.

Verification

CI only, per the no-local-heavy-runs directive.

  • Biome format and lint are clean on both files.
  • Gates 25, 40 and 32 (--base origin/main) pass.

🤖 Generated with Claude Code

runBounded takes benign exit codes; the Stop dispatcher's session end
passes SESSION_END_BENIGN_EXITS (ExitCode.SESSION_UNBOUND,
ExitCode.SESSION_NOT_FOUND), so a Stop with no bound session prints
nothing. Other non-zero exits still warn once. Follow-up to #2363
(review-hotfix LOW).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kryptobaseddev
kryptobaseddev merged commit 3209c64 into main Oct 18, 2026
41 checks passed
@kryptobaseddev
kryptobaseddev deleted the fix/T13890-benign-session-end-exit branch October 18, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant