Repository navigation
fix(sessions): ignore headless queued prompts and prefer the live resume binding - #48
Merged
Merged
Conversation
…ume binding Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… entrypoint skip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two session-tracking fixes.
Headless queued prompts no longer count as Slack submissions
After each warm turn, the proofgate Stop hook runs a headless
claude -pin the same folder. That run records the warm session's prompts inqueue-operationrecords, which have noentrypoint, so thesdk-clifilter intranscript_has_submissionmissed them. When the bound transcript lacked a message marker,comms-listen.py:365searched the folder, and could bind to that headless transcript and watch it for the reply.sdk-clirecord. A check for "anysdk-clirecord" could therefore race, so a queued prompt now counts only when the transcript's first entrypoint is interactive.Checked on every real transcript in
~/.claude/projects/-Users-mukuls-dev-assistant, old code against new:The live resume binding wins over the restore record
cmux surface resume showlists arestore_record(sourcesession-snapshot) before theresume_binding(sourceagent-hook, withupdated_at).world-scanner.pyandbuild-ws-context.pytook the first record with a checkpoint id, which is the snapshot. They now tryresume_bindingfirst and fall back to the old search. Today both records agree on every live terminal, so this guards against the snapshot going stale.Validation
🤖 Generated with Claude Code