Hedgehog Marketing / NHH
Claude Code — context window cheatsheet
1
Start
- Open repo —
CLAUDE.mdloads automatically - Paste your brief — nothing else, no preamble
- Wait for Code to respond before adding anything
2
Watch
Act on any one of these. Don't wait for two.
- References something you didn't say
- "Improves" things you didn't ask about
- Unprompted summary of what it's done
- Gets "earlier discussion" wrong
- Responses noticeably more verbose
- Repeats a fix it already made
3
Compact
- Say: "Update the session state block in CLAUDE.md with where we're up to"
- Confirm the update — check file, function, status, next step
- Run
/compact - After compact — restate file path and function name in your next instruction
Timing: Run at ~60–70% full. Once warning signs appear you're already past the sweet spot — compact immediately.
4
Abandon
- Stop — do not try to course-correct, it makes it worse
- Note where you're up to: file, function, what's done
- Close the session
- Come to Claude.ai — ask for a continuation brief scoped to what's left
- Paste continuation brief into a fresh Code session
When to use: If the session has gone off the rails, don't try to course-correct — it makes it worse.
5
End
- Ask: "What files did you modify this session?" — confirm it matches the brief
- Run the verification steps from the brief
- Commit to branch — never directly to
main
6
State block
Add this to the bottom of each CLAUDE.md
--- ## Current session state _Updated by Code before /compact or at session end._ **Last worked on:** [file + function] **Status:** [what's done / what's not] **Next step:** [exact next instruction] **Open issues:** [anything weird found mid-session]