{"version":"2.1.213","anchor":"sessionstart-hook-fork-source-value","canonical_anchor":"sessionstart-hook-fork-source-value","heading":"SessionStart Hook: fork Source Value","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.213\/e\/sessionstart-hook-fork-source-value","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.213","markdown":"### SessionStart Hook: `fork` Source Value\n\n**What**\n\nThe `source` field on `SessionStart` hook events now accepts a new `\"fork\"` value, in addition to the existing `\"startup\"`, `\"resume\"`, `\"clear\"`, and `\"compact\"`.\n\n**Details**\n\n- Fires when a session is loaded with `forkSession: true` \u2014 the code path activated when a skill carries `context: \"fork\"` or when the fork-subagent experiment (`tengu_copper_fox` \/ `tengu_fork_subagent_enabled`) spawns a subagent by resuming an existing conversation under a new session ID\n- The hook JSON payload is `{ hook_event_name: \"SessionStart\", source: \"fork\", agent_type: <string>, model: <string>, session_title: <string> }` \u2014 same fields as `\"resume\"` events\n- Unlike `\"clear\"` and `\"compact\"`, a `\"fork\"` event does propagate the session title returned by the hook (same behaviour as `\"startup\"` and `\"resume\"`): the title is stored so the forked session can be labelled distinctly\n- The new session ID passed in the hook is the forked child's fresh ID (not the parent's); the hook fires after the fork's conversation history is loaded but before the first turn runs\n- Skills with `context: \"fork\"` are excluded from being re-dispatched inside the fork they created, preventing recursive expansion\n- Hook output (additional context messages, `reloadSkills`, `watchPaths`) works identically to other `SessionStart` sources \u2014 hooks can inject context or block the fork by returning a blocking error\n\n**Evidence**\n\nSchema enum (search for `\"fork\"` in SessionStart hook schema alongside `\"startup\", \"resume\", \"clear\", \"compact\"`); fork dispatch (search for `forkSession`, `x$e(\"fork\"`, `\"fork\" : \"resume\"`, `aye = \"fork\"`, `tengu_copper_fox`)\n\n- Flag `tengu_copper_fox`: Off in both readings (read for one account on one subscription tier against v2.1.213; this account: off, anonymous baseline: off, compiled default: not a boolean we can read) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}