Skip to content
CursordocsCLI & tooling

Find Cursor sessionEnd hook JSON schema

Session from merchantscroll-traces on Hugging Face by vedalken · MIT · condensed by Coders Talk

7ssession
0interventions
GOAL

Determine the exact JSON schema for Cursor's sessionEnd hook, including stdin fields, stdout options, and whether CURSOR_TRANSCRIPT_PATH is set, to decide between sessionEnd and stop for uploading traces.

  1. Prompt · +0
    Find the exact JSON schema for Cursor's sessionEnd hook: stdin fields, stdout output, CURSOR_TRANSCRIPT_PATH env var, and whether to use sessionEnd or stop for uploading traces.
  2. Agent did · +0m
    Fetched cursor.com/llms.txt and grepped the local project and ~/.cursor directories for sessionEnd, session_end, and CURSOR_TRANSCRIPT references.
  3. Agent did · +0m
    Fetched cursor.com/docs/hooks.md directly, read the create-hook skill doc, and grepped a local agent-tools transcript file for sessionEnd/stop context.
  4. Agent did · +0m
    Read sections of a large local transcript log (offsets 760-1460) searching for sessionEnd, sessionStart, CURSOR_TRANSCRIPT and base hook field mentions to cross-check the docs.
  5. Agent did · +0m
    Continued grepping and reading the transcript log for 'transcript' references at various offsets to confirm field names and behavior.
  6. Outcome · +0m
    Documented the full sessionEnd stdin schema (common fields: conversation_id, generation_id, model, hook_event_name, cursor_version, workspace_roots, etc.) sourced from cursor.com/docs/hooks.md, resolving all four original questions.
VERDICT

I'd start by pointing directly at cursor.com/docs/hooks.md instead of letting the agent wander through local transcript logs first — that's where the answer actually came from. No corrections were needed here; it was a straightforward research task and the agent converged on the exact schema on its own.

I tried this · 0

Discussion · 0

How Builds work