Repository navigation
Restore saves one at a time; input heard at once; hook events with matchers - #182
Merged
Merged
Conversation
saveRestore reads and rewrites the session's restore state (the agent seen running again, the plan, the sequence number) without a lock, safe only while the restore ticker is its one caller. A lock around the whole save keeps that true for any caller added later: two saves can no longer interleave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A person's last input reached the session record only at the next throttled flush, so a list could show a session idle for seconds after someone came back to it. The first input after a two-second pause now asks for a flush at once; the rest of a burst still waits for the usual one. A click or key in a mirrored window is a person at work too, as typing in the terminal is: it now stamps the session's last input the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Antigravity CLI names the conversation conversationId in its hook payload, a key convFromPayload did not look under, so a restart of an Antigravity session could not resume the conversation it was in. The key is now read with the others, through the same id-shape check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hook table's entries were positional {event, state} pairs, and
hookEntry took only the state. Each entry is now {Event, State, Matcher}
by name and hookEntry takes the whole event, so an entry can narrow a
tool event to the tools it names. None does: every entry's matcher is
empty, and an empty matcher writes no matcher key at all.
The generated configs are unchanged byte for byte: every harness's hooks
file, written fresh and over a person's existing file, re-run, and
removed, for a plain and a spaced reminal path, dumps identically before
and after. A test pins that no table entry writes a matcher, and that one
naming tools is written with them and replaced, not repeated, on a
re-run.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Four small fixes to shared code:
saveRestorecan be asked for from more than its own loop, so two saves could interleave their reads and writes of the restore state. It now runs underrestoreMu.markinput_test.go.conversationId). Test case added.hookEvent{Event, State, Matcher}; a matcher is written only when set (none are today). Generated configs for all four hook harnesses (fresh file, existing file, re-run, removal) are byte-identical before and after. Test:TestHookEntryMatcher.Gates (Docker, temp HOME): gofmt clean, go vet, go test ./..., -race on internal/client and cmd/reminal, six-target cross-compile.
🤖 Generated with Claude Code