Playbook
Every AI coder knows the moment. You're forty minutes into a gnarly refactor, the agent finally understands the shape of the problem, the tests are two fixes from green — and the wall arrives. "You've reached your session limit." Or the context window quietly fills and the model starts forgetting decisions it made an hour ago. Or the weekly cap you forgot existed lands on a Thursday afternoon with a feature half-wired.
We hit these walls constantly, because we vibe code daily across multiple providers and every one of them has a meter somewhere. Subscription session caps, weekly usage ceilings, per-tool session limits, context windows that fill faster than the docs imply — the specific wall varies, but the failure mode is identical: the state of your work lives in a chat you're about to lose.
The fix isn't a bigger plan. The fix is treating session death as a certainty and engineering for it. Here's the playbook we actually use.
The six tactics, in the order they save you
1. The HANDOFF.md ritual
This is the single highest-leverage habit on this list. About ten minutes before you expect the wall — when you sense the session getting long, when the responses slow down, when you know the cap is near — stop feature work and have the agent write a handoff file to disk. Not a summary in chat. A file. HANDOFF.md in the repo root, or on your desktop if the repo isn't the right place.
The handoff must contain five things:
- The goal — what were we actually trying to accomplish, in one paragraph.
- Decisions made — architecture choices, rejected approaches, and why they were rejected (this is the part a fresh session can never reconstruct).
- Current diff state — which files were touched, what's committed vs. uncommitted, what compiles and what doesn't.
- Exact next steps — numbered, specific enough that a stranger could execute step one without asking a question.
- Gotchas discovered — the flaky test, the misleading function name, the config that has to be set. The landmines you already stepped on.
Here's the prompt we paste, verbatim. Steal it:
Stop what you're doing. Write a file called HANDOFF.md in the repo root
for a fresh agent who has ZERO context on this session. Include:
1. GOAL: what we are building and why, one paragraph.
2. DECISIONS: every architectural/design decision made this session,
each with the reason, plus approaches we rejected and why.
3. STATE: files modified, what's committed vs uncommitted, current
build/test status. Run git status and git diff --stat and include
the real output.
4. NEXT STEPS: numbered, concrete, in order. Step 1 must be executable
without asking me anything.
5. GOTCHAS: everything surprising you learned — flaky tests, misleading
names, env vars, ordering issues.
Be exhaustive on decisions and gotchas. Assume the next agent is
competent but knows nothing about this session.
The principle underneath: put down your session where you can pick it up — on disk, not in their cloud. A conversation trapped in a provider's history page is worth almost nothing at 9am tomorrow. A file in the repo is worth everything, to any model, from any lab, forever.
2. Durable memory lives in the repo, never only in chat
HANDOFF.md is the emergency version. The everyday version is keeping standing project knowledge in files the agent reads at session start: CLAUDE.md, AGENTS.md, or a plain notes/ directory — whatever your tools respect.
The rule of thumb: if you'd be annoyed to explain it twice, it goes in a file. Build commands, test invocations, deployment quirks, "we use repository pattern here, don't inline queries," the reason module X looks weird. Every time you catch yourself re-teaching a fresh session something you taught the last one, that's a bug in your setup — fix it by writing it down once.
We keep a notes/decisions.md that agents append to as they work. It costs one sentence per decision and it means session #47 knows why session #3 chose SQLite.
3. Compact early, compact deliberately
Most tools now auto-compact the conversation when the context window fills. Do not rely on it. Auto-compaction fires at the worst possible moment — mid-thought, mid-edit — and the summarizer decides what to keep, not you. We've watched an auto-compact drop the one constraint that mattered and then spent twenty minutes wondering why the agent regressed.
Instead, compact on your schedule, at natural seams: after a feature lands, after tests go green, after a decision gets made. The move is summarize-and-restart: ask the agent to write the compact summary (or a mini-HANDOFF), then start a fresh session that reads it. You get a clean context window with only the load-bearing facts in it, and you chose which facts those were. A deliberate restart at a green checkpoint beats an automatic one at a red mid-thought every single time.
4. Split work so any chunk is thirty-minutes losable
Structure the work itself around session mortality. Before starting anything big, break it into chunks where losing any single chunk costs you at most thirty minutes of rework. Each chunk ends at a committable state: tests pass, or at minimum the code compiles and the commit message explains what's half-done.
In practice: git commit far more often than feels dignified. Checkpoint commits are free; lost sessions are not. If a chunk can't be described in one sentence and finished inside a session, it's two chunks. This discipline also makes every other tactic on this list cheaper — a handoff written at a green checkpoint is half the length of one written mid-catastrophe.
5. The multi-provider hedge
Here's the tactic that turns limits from a stop sign into a lane change: when one lab's cap hits, hand your HANDOFF.md to a different model and keep moving. Claude's session cap arrives? The handoff file plus the repo is everything a Codex or Gemini session needs to continue. The caps don't synchronize across labs — so a well-written handoff means you effectively don't have caps, you have shift changes.
This is exactly why we built The Vibe Father model-agnostic: switching a workload to another provider's CLI is one click instead of a copy-paste scramble, and the app exports full conversations — every prompt, every response — which most tools deliberately don't let you do. We've written about why that export gap exists, and it's not an accident. But the tactic works with nothing more than a text file and two terminal tabs. The handoff file is the hedge; the tooling just lowers the friction.
6. Know your reset clocks
Every provider's limits reset on a schedule — session windows, daily quotas, weekly caps. Learn yours. Check your usage page, note when the meters actually reset, and write it down somewhere you'll see it.
Then schedule around it: heavy multi-hour agent sessions right after a reset, light review-and-planning work when you're near a cap. Ending a cap period with 40% unused while you got throttled mid-week is a scheduling failure, not a pricing problem. If you run multiple subscriptions, stagger the heavy work so you're never leaning on a provider that's about to cut you off.
The pre-wall checklist
Tape this next to your monitor. When you feel a session getting long:
- Commit whatever is committable, now.
- Run the HANDOFF.md prompt before the wall, not after.
- Move anything you re-taught this session into
CLAUDE.md/AGENTS.md/notes/. - If you're at a green checkpoint, summarize-and-restart instead of pushing your luck.
- If the cap hits anyway: open a different provider, feed it the handoff, keep shipping.
None of this requires any particular tool. It requires accepting one uncomfortable fact — the session was never yours to keep — and moving everything that matters somewhere that is.