Claude session rules — the deep home
Hook schema
Every settings.json hook entry uses nested {hooks: [{type, command}]}; one flat entry
disables all hooks. Diagnose with yoke watch doctor -- --only project-hook-config-validity.
Repair the whole schema, not one entry.
Session end and recovery
- A transient SessionEnd (sleep, reload, disconnect) releases no claims, and your next hook event reactivates the session. No manual registration is needed.
- On a
SESSION_ENDEDrefusal, run thesessions begincommand it prints; do not guess the provider or model. If claims were not reacquired, runyoke claims work acquire --item PREFIX-N --reason session-reactivation-recovery. - Physical stop needs authority:
yoke sessions terminate SESSION-ID --reason R(read its--help). Keep a claimless session alive withyoke sessions keepalive hold. - Before reporting a session dead, probe its current process; newer activity overrides a death record.
- Evidence for this episode only:
yoke events query --session SESSION-ID --current-episode. A nonzeroelided_prior_episode_rowsmeans read again without the flag, not absence.
Model and refusals: sessions model.