Skip to main content

Module session_start

Module session_start 

Source
Expand description

spool hook session-start — emit a wakeup packet at session start.

§Output contract

  • stdout: a textual prompt block, prefixed by an HTML comment marker so consumers can locate / strip the spool region.
  • exit 0: always (failure is handled by [run_silent] in mod.rs).

§Behavior modes

  • Trellis-aware degraded mode (D6): when <cwd>/.trellis/.developer exists we emit a single-line note pointing to spool memory wakeup instead of the full packet. This avoids two assistants both pushing their own wakeup blob into the system prompt.
  • Empty wakeup: when the project has no wakeup-ready memories, we still emit a minimal block so Claude Code knows the hook is wired (vs silently doing nothing — confusing during onboarding).

§What we deliberately do NOT do here

  • Network calls or sampling. SessionStart must finish in <500ms.
  • Mutating ledger state. SessionStart is read-only.

Structs§

SessionStartArgs
Arguments for the session-start hook.

Functions§

run