Repository navigation
Claude session owns bridge lifetime; Monitor is a replaceable reader - #1950
Merged
Merged
Conversation
This was referenced Oct 19, 2026
trissim
force-pushed
the
fix/claude-session-bridge
branch
from
October 19, 2026 21:21
d9e6dae to
92fa315
Compare
trissim
force-pushed
the
fix/claude-session-bridge
branch
from
October 20, 2026 01:50
3a4b556 to
d6e7cd6
Compare
trissim
force-pushed
the
fix/claude-session-bridge
branch
from
October 20, 2026 01:55
c3afa79 to
16a6d2a
Compare
trissim
marked this pull request as ready for review
October 20, 2026 03:08
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
P233 — session-owned Claude bridge
Review head: 2dd8bac.
The Claude process owns the bridge and its registered endpoint. Monitor processes are replaceable readers. Killing a reader during
/compactno longer retires the bridge. Presence remains Connected; this does not add a separate compaction backend, status or UI.Ownership and reconciliation
MonitorServiceowns the session socket and request lifetime through asyncio streams.NoReader,UnreadyReaderandAttachedReaderown detached, unproven and proven delivery behavior;MonitorAttachmentexists only after attachment.d27ff3859, preserving main'sOperation.execute, declaration-driven FieldCodec arguments, TimestampedWire validation, P277 PeerSync hook, P285 directive entry and ClaudeHook warnings.Serve.transcriptuses the existing PathText codec.ParentedProcess.alive()method rather than testing its bound method as a boolean.Verification on this exact head
26 passed, 0 failed, one existing pytest configuration warning. Run in the background under
timeout 300:The source-first census used the existing NRA ModuleSyntaxIndex over 12 related files for the published implementation and current-main reconciliation, with zero parse omissions. It covers the operation, transport, process, hook and reader owners and their consumers. Async callbacks, Pydantic union construction and external hook invocation remain dynamic-resolution limits; the actual application proof below exercises them.
Separate full source/tools ratchets, pinned to comparison main 15ba6ed and this exact head:
Line growth is disclosed, not treated as a defect or hidden with a budget trailer. These are not checks against the subsequently advanced main.
Actual configured Claude proof
Fresh private bus/session, real Claude provider and Monitor tool, real startup/PreCompact/compact/SessionEnd hooks, and actual transcript. Final proof exited 0:
Original sessions and uncertain inputs were not replayed. The proof used a new isolated session and did not modify live installation or global hook settings. All owned proof processes exited.
Receipts under
/home/ts/.cache/agent-scratch/pi-bridge-compact/P233/:final-tests.log,final-ratchet-{src,tools}.log,current-live-02.log,current-live-02/events.jsonl, andcurrent-rebase-{published,current-main}-source.json.Remaining limits and handoff
registration.pyuse ofentry_if_present; its expected-zero result is not claimed. The newer commander instruction (5167) requests marking this PR ready.Assumed:
Agent-Comms-Order: 4da91cc38c5d