Skip to content

P205: start an idle Claude turn through its registered input frame - #1954

Closed
trissim wants to merge 19 commits into
mainfrom
fix/p205-claude-idle-turn
Closed

trissim wants to merge 19 commits into
mainfrom
fix/p205-claude-idle-turn

Conversation

@trissim

@trissim trissim commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

P205 checkpoint — not merge-ready

Current pushed head: 2e82c0959. Includes installed main b793c7325 by normal merge; published history was not rewritten.

Working path

  • SessionStart owns the daemon, registration, inbox subscription and canonical transcript publication. Managed Run only owns real Claude stdin/output.
  • The registered IncomingFrame.turn_start capability selects the existing reader variant. InputReader acknowledges only Claude's replayed UUID, not a pipe flush. Monitor retains its challenge and bounded window.
  • Typed frozen SDK ingress extends existing OpenWire: unrelated SDK records remain visible but cannot acknowledge input. This fixed a real command_lifecycle failure; that failed session and its uncertain input are preserved, never replayed.
  • Session startup uses socket notifications, not sleep/polling. Watch state variants own enrollment/start/end decisions. Managed input holds the existing reader lock.

Actual Claude Code 2.1.303 / configured claude-opus-5-5 acceptance: fresh session 9242e154-b222-456c-871e-dff3ec12ab25, no bootstrap prompt. Bus inputs 3c31b1a33c89 and 37f94195537f produced P205 answer: 999 and P205 second answer: 51; both answers were read from Core's retained external history before shutdown. Reader lock observed held; frontend, Claude and daemon stopped. Raw evidence: /home/ts/.cache/agent-scratch/pi-toad-queue/p205-reader-family-3/. Later changes moved only compaction observer wiring, restored unchanged formatting and integrated main; this is not a fresh installed-main acceptance claim.

Checks and remaining gap

  • Source ratchet at d7dbb9555 against main 6a0f5e931: exit 0, no positive keys or introduced sites. Tools comparison retained at that head is also clean; the later restart interrupted its enclosing command, so no stronger exit receipt is claimed.
  • All four touched hook modules passed mypy; no automated tests run. Pyright is not installed in the authorized shared interpreter.
  • This integration declares Src-Budget: 1188; it does not satisfy P233's NEW no-source-budget order. P233 owner pi-bridge-compact is replacing its baseline. No rewritten base has been taken, and this PR must not be merged as if that dependency were finished.
  • Latest-main ratchets remain pending. Main's new checker requires the pinned audit submodule, uninitialized locally; the exact pinned initialized QA dependency is available from its owner, not installed here.

Source ownership evidence

NRA parsed both source roots with no omissions before integration: /home/ts/.cache/agent-scratch/pi-toad-queue/p205-repair-source-before.txt; complete earlier owner census: p205-source-owners-complete.txt. Payload identity belongs to the input frame; registration retains its capability; the reader state owns readiness and delivery; the session daemon alone owns endpoint/history lifetime. External Claude dispatch is dynamic and is established by the real run, not AST evidence.

Assumed: managed input remains opt-in; native provider/auth/model configuration is retained; verification uses fresh private sessions with tools/MCP disabled, not original user sessions. No installation was changed. P233 retains shared-lifecycle ownership; I retain managed-input integration after that replacement is published.

Agent-Comms-Order: aa96f89f9e55

Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trissim
trissim marked this pull request as draft October 19, 2026 18:37
Integrates the source of pi-bridge-compact checkpoint d9e6dae without importing its malformed prose budget trailer. No published branch is rewritten. Registered input invokes frame behavior; ready reader variants own submission and acknowledgment. External stdout PIPE validation belongs to StreamingChildStdio, which declares that pipe.
Only native replayed user UUIDs acknowledge managed input. Other SDK output uses the existing OpenWire foreign case and remains visible. Watch states own enrollment and session hook decisions; startup waits on the socket watcher without sleeps. Managed input holds the existing reader lock, so WatchGuard no longer falsely reports a missing Monitor.
Compaction supplies its registry observer to the existing watch-state capability, preserving the stdlib-only prompt/tool hook path without function-local imports. The integrated SessionStart daemon, typed transport protocol, admission, owner lifetime and reader-state family add 1188 measured Core source lines relative to current main. Formatting and retained hook source are visible in the same PR; no baseline or checker is edited.

Src-Budget: 1188
Drop formatter-only edits on three pre-existing absence sites. This does not introduce or redesign their existing semantics; the changed implementation remains typed and state-owned.
@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing stale draft: no commit since yesterday and nobody has mentioned it on either commander's bus since midnight. Branch kept; reopen with a current owner if the work is still wanted.

@trissim trissim closed this Oct 20, 2026
@trissim
trissim deleted the fix/p205-claude-idle-turn branch October 20, 2026 14:30
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.

2 participants