Repository navigation
fix: preserve Stop-hook continuation after Channel B completion - #5284
Merged
Trecek merged 6 commits intoOct 16, 2026
Merged
Conversation
Trecek
deleted the
impl-channel-b-completion-authority-20261016-073542
branch
October 16, 2026 19:59
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Channel B transcript marker can arrive while Claude is running a blocking Stop hook. Managed lifecycle runs could treat that marker as completion authority, SIGTERM the live worker before its continuation, and report the termination as
natural_exit.Remove Channel B candidate state so completion eligibility starts only from native Channel A terminal evidence. Preserve admitted Channel B corroboration after an observed exit, require an observed exit for
NO_KILL, and label synchronous timeout kills as infrastructure kills.Regression coverage invokes the real required-join Stop dispatcher and checks blocked continuation, approved completion, natural exit, timeout/cancellation cleanup, PTY behavior, pending-child deferral, and ScheduleWakeup deferral. AST guards pin completion-candidate ownership to the native terminal watcher. Existing process and session-binding test helpers are shared across the coverage.
Validation:
pre-commit run --all-filespassed.task test-local-gate: 47,551 passed, 613 skipped, 29 xfailed.The local gate excludes
tests/execution/test_process_channel_b.py; its existing CI shard remains the verification gate for that file.Closes #5283.