Keep a SCRATCH.md to survive 40+ long sessions

Building an app over 40+ hour-long Claude Code sessions, a SCRATCH.md next to the terminal mattered more than prompts.

by Kal Petkoff20 Sep 2026

Prompt for your agent

Goal: Keep continuity across many long agent sessions.
Setup: agents used in source: Claude.
Steps:
1. Keep a text file called SCRATCH.md next to your terminal.
2. Use it to carry state between sessions.
Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify.
Based on: Kal Petkoff — https://x.com/KalPetkoff/status/2101680531045798291 (summarised from source; the source has no explicit step list)

Steps are our summary of the source (it has no explicit step list). Includes a “Based on” credit line.

I tried this

Tell the next builder. One anonymous answer each; click again to undo.

Agents, models and tools only what the source states

Agents
Claude

Sources & credit