[BUG] Resume fires two unlinked SessionStart events with no SessionEnd for superseded session

Resolved 💬 3 comments Opened Feb 8, 2026 by brandonrule11 Closed Feb 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When resuming a session, Claude Code fires two SessionStart hook events with no linkage between them:

  1. source=startup with a brand new session ID
  2. source=resume with the original session ID

There is no resumed_from (or similar) field on the startup event, and no SessionEnd event for the session being superseded. The two events can only be correlated by matching PIDs and timestamps, which is fragile.

Additionally, the new startup session's JSONL file contains only a file-history-snapshot entry — no conversation content. The actual conversation history remains in the original session's JSONL file. This makes it impossible for hook consumers to retrieve the first user message or conversation context from the active session ID.

Observed payloads

Startup event (new session):

{
  "session_id": "e3f748aa-5630-4701-a025-99316cc228ea",
  "transcript_path": "...e3f748aa-...jsonl",
  "cwd": "/Users/.../dotfiles",
  "hook_event_name": "SessionStart",
  "source": "startup",
  "model": "claude-opus-4-6"
}

Resume event (original session):

{
  "session_id": "cfacaa7e-a967-4ecc-bc8c-f42e90bf1fc8",
  "transcript_path": "...cfacaa7e-...jsonl",
  "cwd": "/Users/.../dotfiles",
  "hook_event_name": "SessionStart",
  "source": "resume"
}

No field links these two events together.

What Should Happen?

Either:

  1. Resume fires a single SessionStart with source=resume and the original session ID (simplest), or
  2. If a new session ID is needed internally, include a resumed_from field on the startup event pointing to the original session ID, and fire a SessionEnd for the superseded session.

Related Issues

This is related to but distinct from #7911, which reported that the source=resume event had a wrong/random session ID. That appears to have been fixed — the resume event now correctly has the original session ID. This issue is about the two events being unlinked and the new startup session having no conversation content.

Steps to Reproduce

  1. Set up a SessionStart hook that logs the full JSON payload
  2. Start a session: claude
  3. Exit the session
  4. Resume it: claude --resume <session_id>
  5. Observe two SessionStart events in the hook log with different session IDs and no cross-reference

Claude Model

Opus

Is this a regression?

Unknown

Claude Code Version

2.1.37

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Ghostty + tmux

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗