Repository navigation
Track desktop conversations vibetime never saw start, including every Cursor Agent conversation - #146
Merged
Merged
Conversation
…e installed Its first prompt or tool call after install opens the session, with the baseline taken then, so only work from that point counts.
Claude Code and Codex send a subagent's events under the parent's session id. Cursor's docs don't say, and a subagent opened as its own session would take the parent's commits, so Cursor waits until that is checked.
Cursor 3.20 sends no sessionStart for an Agent conversation, so every event after it was dropped: production shows Cursor sessions falling to one a week. Opening a session from the first event it sees now covers Cursor too, and a session opened that way runs the start housekeeping (install repair, tunables, reap) that only sessionStart used to run, once rather than per event. A subagent's start and stop arrive under the parent's conversation id, and a subagent id is not a uuid, so it never opens a session of its own.
Cursor runs two copies of every hook at once. Both opened the session in their own eyes, so both ran the repair and the tunables fetch on the first prompt. addSession now says whether it inserted. The adoption tests also point VIBE_API at a local stub instead of the real API.
This was referenced Oct 29, 2026
Merged
Merged
This was referenced Oct 29, 2026
Merged
Merged
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.
Desktop hooks only opened a session on
SessionStart, and every later event for an unknown session id was dropped. Two kinds of conversation never get aSessionStartthat vibetime sees:sessionStartfor an Agent conversation. Its own hooks log from 2026-10-29 showsworkspaceOpen, thenbeforeSubmitPrompt,postToolUse,subagentStart/Stopandstop, with the hooks loaded and nosessionStartstep. Across every Cursor log on the maintainer's machine,sessionStartfired once, on Sep 14. Production shows the result: Cursor sessions went 36, 14, 7, 14, 6, 1 over the last six weeks.Change
An activity event (prompt, tool call, stop) for a session id we have never seen now opens the session, as
SessionStartwould:SessionStart. Without it, Cursor-only users would never get any of them. It runs once per opened session, never per event, and never in a folder with no repo.SessionEndfor an unseen id (opens nothing), and tool tagging (imported Claude hooks inside Cursor are still taggedcursor).Subagents
A subagent must not open a session of its own. The newest open session in a checkout gets its commits, so it would take them from the parent.
claude -prun. Every event inside anAgentsubagent carried the parent'ssession_id, and the subagent was identified only byagent_id.subagentStart/subagentStopcarry the parent'sconversation_id, and the subagent is identified bysubagent_id, which looks likecall-<uuid>-2\nfc_<uuid>_0. That isn't a uuid, so it fails the session-id check even if it ever arrived as the id. The subagent itself didn't run a tool, because its model was unavailable on a Free plan, so a tool call from inside a Cursor subagent wasn't observed directly.Verified
test/hook-adopt.test.mjsreplays the payload Cursor actually sent (prompt and email removed), firing it twice at once, as Cursor runs both its own and the imported Claude hooks:cursorand later counts a commit;{}, exits 0 and records one Cursor session.Changes from release QA
addSessionnow returns whether it inserted the row, and only that process does the housekeeping. The test runs two real processes released at one instant: it fails 3/3 without the change (two settings fetches) and passes 3/3 with it. An in-process version passed either way, so it was replaced.VIBE_API_URL, which the CLI doesn't read; the variable isVIBE_API. Their settings fetch went to the real API, a read-only GET.SessionStartalready does. That's the settings fetch, capped at 1.2 s and skipped while the cached settings are fresh, plus reaping. It happens once per session.