Skip to content

fix(mcp): finish detached wake cleanup before CLI escalation - #250

Merged
abruption merged 2 commits into
mainfrom
abruption/v103-issue-231
Oct 5, 2026
Merged

abruption merged 2 commits into
mainfrom
abruption/v103-issue-231

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Give a cancelled/timed-out MCP --wake CLI its bounded native cleanup budget before escalating against the MCP-owned process group. Preserve queued/unknown outcome semantics and resist repeated cancellation.

Closes #231

Type

  • fix

Checklist

  • Generated standalone consistency and scoped tests.
  • Only synthetic, owned subprocess groups used; no live agent turns.
  • No credentials or real session identifiers in the diff.

Verified against

Python 3.13.7, macOS arm64: independently reran nine cleanup/descendant tests (29.3s); worker's expanded focused set passed 28. Tests include TERM-resistant/prompt detached app-server fixtures, timeout, repeated cancellation and normal completion. Independent read-only review completed.

Notes

The longer cancellation grace is deliberate. Fixtures retain an unrelated group and inspect owned descendants; this does not prove cleanup of arbitrary groups created by a real Codex binary, nor remote SSH wake cancellation. No queued message is retracted or automatically resent. Draft only, no merge/release/deployment.

@abruption abruption added this to the v1.0.3 milestone Oct 3, 2026
@abruption
abruption merged commit 82164c8 into main Oct 5, 2026
28 checks passed
@abruption
abruption deleted the abruption/v103-issue-231 branch October 5, 2026 00:17
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.

fix(wake): reap the detached app-server when MCP cancels or times out a wake

1 participant