Rate-Limit Resume Mechanism (2026-07-14)
Section titled “Rate-Limit Resume Mechanism (2026-07-14)”Ask: define a clear mechanism for resuming Claude Code after hitting a rate limit — Talbot hits them often, sometimes with several sessions running at once.
Outcome: no new command needed. Two-layer resume + always-on session identity, all documented in SSOTs. 10 rounds, one day.
What shipped
Section titled “What shipped”- Native resume documented (
Core/AI/Claude-Code/Claude-Code.md→ Rate Limits & Resuming): a subscription limit pauses the session (no auto-retry; different quota than 429/529 capacity errors, which do auto-retry). Resume order: wait + new message →claude --continue(same dir) →claude --resume <id-or-name>(any dir). Opus-limit hits need no waiting —/modeloff Opus keeps working. Open question: whether un-blocking after reset needs a specific action or any message (docs don’t say; note it live next time). - SMTM interrupted-session convention (
SMTM_System.md→ Resuming After a Rate Limit or Crash): 3+-step work writes a**Progress:**checklist inside the in-progress Claude Response; a task file ending without a real## Talbot Response= interrupted session, not a wait state./task-start//task-continue(ai-config SSOT) now detect this and resume from the checklist. (/task-startpreviously existed only as a hand-edited deployed copy — brought into ai-config.) - Session identity, passive (
statusline-command.sh): two-line status line — line 1 is always the session identity ([name], or[id: xxxxxxxx]fromsession_idwhen unnamed), line 2dir | model | Context % | Session tokens | Limit % (resets time). Live rate-limit consumption visible before the wall. Works identically in tmux/IDE terminals/bare shells — no launch ritual. - Hook fixes (
settings.wsl.json/.win.json): pre-existingNotificationhook read an env var that’s always empty — hooks get JSON on stdin; fixed. AddedStopFailure/rate_limithook logging hits tosession.log(permanent record; status line is the live view).
Decisions / reversals
Section titled “Decisions / reversals”- No custom
/resumekeyword — would shadow the native/resumepicker. ctaskshell wrapper built, then dropped (rounds 5–8): auto-named sessions from the task filename at launch, but only paid off with a bare-terminal launch ritual — Talbot launches inside tmux windows and IDE terminals. Passive status-line identity solved the actual need;ctaskremoved from.bashrc.- “Broken status line” (round 10) wasn’t — a fresh session’s JSON has no
context_window/rate_limitsuntil the first API response, and no name until set;[ab72833c]+dir | modelis correct startup state. Fixed the readability instead: unnamed fallback now renders[id: ab72833c]. Reproduced from Talbot’s screenshot with mock JSON before touching anything.
Gotchas hit (→ LESSONS.md)
Section titled “Gotchas hit (→ LESSONS.md)”- Task-file
Talbot Responseapprovals don’t satisfy the auto-mode classifier for self-modifying settings/hooks changes (needs live chat approval) — andai-config’spost-commit→deploy.shhook deploys the working tree, so an unrelated commit deployed the still-uncommitted hook fix anyway. Partial staging in ai-config is unsafe. deploy.shhad no Windows copy line forstatusline-command.shat all — WSL deployed fine, Windows silently stale. Fixed indeploy.sh(b9fe886); diff every platform target./session namenever existed (stale-clipping error, corrected in both SSOTs; real commands:/rename,/resume,claude -n).- tmux side-note:
work.shis attach-only while theworksession exists — a closed window (exit claude, then exit shell) stays gone until the whole session is rebuilt. Restored0:KB-mBRmanually.
Commits
Section titled “Commits”- KB vault:
e284d59,50187dc, + closing commit (docs, task→archive, this log) - ai-config:
3e358b5,86c3269,7b3e98f,b9fe886, + closing commit (statusline 2-line +id:fallback)