SLOPSHOPPER

limit-resume

Auto-resumes a turn killed by a rate limit or API error once the limit resets; shows 5h/7d usage and warns at 85%.

commandtoaststatusprompttimer
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · limit-resume
› fix the failing auth test and add an audit log call ⏺ Read(src/auth.ts) ⎿ Read 6 lines ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(bun test) ⎿ 3 pass, 1 fail ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM › /autoresume ⎿ limit-resume: limit-resume is on. ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts ⚠ limit-resume: 5h 31%
README

Tempered Plugins

This repository holds plugins from Tempered Works for AI coding tools. Five plugins are for Claude Code. One plugin is for Codex.

A Claude Code "mod" is a plugin of function hooks. A function hook is code that Claude Code runs when an event occurs, for example when a tool call ends. The five Claude Code plugins here are mods. They run inside Claude Code, in the terminal and in the desktop Code tab.

What is in this repository

FolderToolWhat it does
ship-state/Claude CodeShows the git, pull request, CI and deploy state of the current repo in one line above the prompt. Ends the line with a button to commit or push.
timeline/Claude CodeShows a side pane with what is running now, what is next, and what is blocked. The history of the work is below.
limit-resume/Claude CodeShows your usage limits and continues a turn after a rate limit resets.
followups/Claude CodeShows 4 options for your next prompt above the prompt box after each answer. You press 1 to 4 to put one in the box.
lessons/Claude CodeFinds wins and pitfalls in your prompts. It then asks Claude to run your own win-logger and pitfall-logger skills. The status line shows how many entries you logged.
multi-harness/CodexGives Codex 6 skills to plan large work in waves and to track it to completion.
.claude-plugin/marketplace.jsonClaude CodeLists the 5 Claude Code plugins so that Claude Code can install them from this repository.

Why these plugins exist

ship-state. During a coding session, you often need to know if your work is pushed, if CI passed, and if production has the change. Without this plugin, you ask Claude, and Claude runs git and gh commands to find out. Each check costs a model turn. ship-state shows the answer on screen at all times and makes no model calls. When the tree has uncommitted files, the line ends with a button. One key sends the commit prompt. You do not type it.

timeline. Long work with many steps and many subagents is hard to follow. Without a record, you ask "what is running now?", "what is next?" and "what is blocked?" many times. You also cannot see which model each subagent uses. timeline answers these 3 questions at a glance in a side pane. The history of the work is below the answers. timeline keeps one record per repo across sessions.

limit-resume. When a session hits a usage limit, the work stops until you type "try again". If you are away, the session stays idle after the limit resets. limit-resume continues the work at the reset time. It also shows your usage before you reach the limit.

followups. Claude Code shows one grey suggestion for your next prompt. That suggestion is often the wrong one. followups shows 4 options in 4 directions: continue the plan, verify the work, take the alternative path, and wrap up. These options cover the usual next moves. You choose one and edit it. followups sends nothing until you press Enter.

lessons. The same mistakes happen again, and good patterns get lost. A skill that logs them is useful, but it often does not run at the right moment. lessons makes the skill run. It reads your prompts for praise, frustration, and repeated requests. When it finds one, it tells Claude to run the matching skill after Claude finishes your request. The skill always asks "Log it? y/n" before it writes. You stay in control.

multi-harness. Large product work needs a plan, branch and pull request gates, tracker updates, QA evidence, and a safe closeout. multi-harness gives Codex a repeatable method for these steps. The method is the same for every product.

Requirements

  • Claude Code with support for function-hook plugins. We tested the plugins on Claude Code 2.1.288 on macOS. All Claude Code plugins pass claude plugin validate.
  • git 2.31 or newer.
  • The GitHub CLI gh, signed in. ship-state and timeline use it for pull request, CI and deploy data. Without gh, they show only local git data.
  • Production deploy data comes from GitHub deployment records. Vercel and most hosting services create these records.

How to install the Claude Code plugins

Use one of these 2 methods.

Method 1: install from the marketplace. Run these commands in a Claude Code session:

/plugin marketplace add tyree88/tempered_plugins
/plugin install ship-state@tempered-plugins
/plugin install timeline@tempered-plugins
/plugin install limit-resume@tempered-plugins
/plugin install followups@tempered-plugins
/plugin install lessons@tempered-plugins

Install only the plugins that you want.

Method 2: load the folders directly. Clone this repository. Then add the plugin folders to the env block of ~/.claude/settings.json. Separate the folders with :.

{ "env": { "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/tempered_plugins/ship-state:/path/to/tempered_plugins/timeline:/path/to/tempered_plugins/followups:/path/to/tempered_plugins/lessons" } }

New sessions load the plugins. Sessions that are already open do not.

How to use ship-state

ship-state needs no action. It starts with each session.

  1. Look at the band above the prompt. It shows the current repo and branch.
  2. Read the state from left to right:
app ⎇ feat/waitlist  ·  3 dirty  ·  ↑2 ↓0  ·  PR #312  ·  CI ⏳ 4/5  ·  prod = HEAD ✓ 2h ago  ·  0: commit 3 files
PartMeaning
3 dirty3 files have changes that are not committed.
↑2 ↓02 commits are not pushed. 0 commits are not pulled.
PR #312The branch has open pull request 312.
CI ⏳ 4/54 of 5 CI checks are complete.
prod = HEAD ✓Production runs the current commit.
0: commit 3 filesA button. Press 0 in an empty prompt box, or click it. ship-state sends "Commit the working tree changes with a sensible message." to Claude. After 5 minutes, the button also shows how long the files have waited, for example · 24m ago. The key 0 works only when the prompt box is empty. If you type 0 as the first character of a message, it presses the button and sends the commit prompt. Type a space first to start a message with 0.
  1. After a push or a merge, wait for the toast. ship-state shows "CI ✓", "CI ✗" with the failed check names, or "Live on prod".
  2. When the tree is clean and commits are not pushed, the button reads push ↑2. It has no key. Click it, or press ctrl+x tab to focus the band, press Tab or an arrow key to move to push ↑2, then press Enter. It sends "Push the branch." to Claude. The button does not show while Claude works. After you press it, the button stays hidden until Claude's turn ends, or for 60 seconds at most.

ship-state follows Claude when Claude changes to another repo or worktree. It reads local git data every 20 seconds. It reads GitHub data every 5 minutes. After a push or merge, it reads GitHub data every 20 seconds for 10 minutes.

The band of ship-state stacks with the bands of other plugins, such as followups. followups uses the keys 1 to 4. ship-state uses the key 0 for commit only.

How to use timeline

  1. Type /timeline to open or close the pane.
  2. Wait for the pane to open by itself. It opens once per session, on the first of these events:
  3. Claude logs a task.
  4. Claude has 3 or more open tasks.
  5. Claude starts a subagent.
  6. Read the pane from top to bottom. The table below lists the zones.
  7. Look for ⚠ inherited model on a subagent in NOW. This mark means that no model was set for the subagent, so it uses the model of the main session.
  8. If HISTORY has more than 30 entries, use ◀ older and newer ▶ to move between pages.

The pane uses the text and colors of the app, on the desktop and in the terminal. It fits any width. At 70 columns or more, NEXT and BLOCKED sit side by side. At fewer columns, they stack.

ZoneWhat it shows
HeaderThe repo and the branch.
GOALThe title of the plan while the plan has unticked boxes. Otherwise, the latest active task that Claude logged in the last 24 hours.
PLANA progress bar, the current section of the plan file, and the steps done out of the total. It shows only when at least 1 box in the plan is ticked.
NOWThe tasks that Claude logged as in progress in the last 24 hours, with a progress bar when the task has steps. Then the tasks that Claude has in progress, and the subagents that run now. A subagent shows its title, type, model, elapsed time, tool calls and tokens. It also shows now: (the current tool) and next: (the next step) when they are known. Subagents from another session that started more than 24 hours ago do not show.
NEXTUp to 5 pending tasks that wait on nothing. Then +N more.
BLOCKEDPending tasks that wait on an unfinished task (waits on #N). Also the tasks that Claude logged as blocked in the last 24 hours.
AGENTS · last 15 minOne bar for each subagent run in the last 15 minutes, up to 8. Each bar has the short description of the subagent as its label, not the type. The bar starts when the subagent starts and stops when it ends. The colors are blue for running, green for done, red for failed and gray for status unknown. The terminal draws the bars with block characters. Below the bars are the start time, the middle time and now.
HISTORYOne line for each entry, newest first: the time, a mark, and the text. Each subagent shows below the task that it ran for, on a line that starts with ├ or └. A subagent that ran for no logged task has a line of its own. A subagent line shows the type, the model, the title and the run time. History does not show the results of subagents. Each page has 30 entries, and each entry keeps its subagent lines.

The marks in HISTORY are:

MarkMeaning
💬A request or a decision.
▶Running.
✓Done.
⚠Blocked.
✗Failed.
?Status unknown.
↳A commit, a push, a pull request or a CI result.

timeline reads 4 sources:

  • The task list of Claude (TaskCreate, TaskUpdate, TaskList and TodoWrite).
  • The subagents.
  • The plan file that Claude reads or edits. A plan file is a markdown file with checkboxes. Its name contains "plan", or it has 3 or more boxes.
  • The tool mcp__timeline__log.

How timeline works:

  • The plugin adds a tool, mcp__timeline__log. It also adds an instruction of about 100 tokens that tells Claude when to log. Claude logs once for each change of direction, and once at the start, each step, the end, or a block of each task.
  • Each subagent gets a shorter instruction to log its own progress.
  • The instruction tells Claude to write each title, how and next in Simplified Technical English: one short sentence, active voice, no filler.
  • The log tool needs no permission prompt.
  • timeline stores the history per repo in ~/.claude/timelines/<repo>-<hash>/. Each session writes only its own files. Worktrees of a repo share one timeline.
  • If 2 sessions work in the same repo, each pane shows the entries of the other session within 10 seconds.

Usage cost: each logged entry costs approximately 40 to 80 output tokens. The instruction costs approximately 140 tokens in each session.

Privacy: the timeline files contain Claude's one-line summaries, the first 2000 characters of each subagent prompt, and commit subjects. The files stay on your computer.

How to use followups

followups needs no action. It starts with each session.

  1. Wait for Claude to finish an answer. A few seconds later, 4 options appear in the band above the prompt box. Each option has its own row: 1: … to 4: ….
  2. Read the options. Each option goes in a different direction:
  3. Continue the plan.
  4. Verify or test the work.
  5. Take the alternative path, or ask an open question.
  6. Wrap up or commit.
  7. Press 1 to 4 when the prompt box is empty. You can also click an option. The text of the option goes into the prompt box.
  8. Edit the text, or press Enter to send it. followups never sends anything by itself.
  9. To ignore the options, type your own message.
  10. To turn the plugin off or on, type /followups off or /followups on. Type /followups status to see the current setting and the last error, for example a refused model call.

When the band shows, a digit that you type in an empty prompt box picks an option. To start a message with a digit, type a space first.

The band hides while the prompt box has text, while a turn runs, and while a survey uses the band. It comes back when the prompt box is empty.

followups hides the built-in grey suggestion of Claude Code, but only after its own band has drawn once. In a surface without the band, the built-in suggestion stays.

followups makes no options for subagent turns, interrupted turns, errors, and empty answers. If you send a prompt before Haiku answers, followups drops the old reply. After /clear or a resume, followups removes the old options.

Usage cost: followups makes one Haiku call for each answered turn. A call costs approximately 2,000 input tokens and 150 output tokens. followups adds nothing to the context of the main model.

Privacy: the first 1,500 characters of your last prompt and the last 4,000 characters of the answer go to Haiku. The call uses the API client of Claude Code.

How to use lessons

lessons needs 2 skills of your own. Name them win-logger and pitfall-logger. This repository does not include them. The skills decide where an entry goes, for example a Notion database. Each skill always asks "Log it? y/n" before it writes.

  1. Add the 2 skills to Claude Code. Any skills with these names work.
  2. Work as usual. lessons watches only the prompts that you send yourself: in the terminal, in Remote Control, in your own Slack ping, and in the Claude desktop app. It ignores prompts from plugins, notifications, other sessions, and subagents.
  3. Send a prompt that shows a win or a pitfall. The table below lists the signals.
  4. Claude finishes your request first. Then Claude runs the matching skill. lessons adds a short note to your prompt to cause this. You do not see the note.
  5. Read the draft that the skill shows. Answer y to log it. Answer n to skip it.
  6. Look at the status line. 🌱 2 · ⚠ 1 means 2 wins and 1 pitfall are logged in this session. lessons counts a row when you answer y to a draft. The count resets after /clear or a resume.
  7. To turn the plugin off or on, type /lessons off or /lessons on. Type /lessons status to see the setting, the counts, and where each skill was found.
KindSignals
WinPraise, for example "perfect", "nailed it", "love this", "this is great", "exactly what I wanted". Or an ask: "log this win", "log this as a win", "add this to learnings", "remember this worked".
PitfallFrustration, for example "I already told you", "no, I said", "still wrong", "still failing", "this is the third time", "why did you change…", "not what I asked". Or shouting: several words in all capitals. Or the same request sent again: it has high word overlap with one of your last 10 prompts. Or an ask: "log this", "add this to pitfalls", "remember this lesson".

lessons avoids common false signals. These prompts do not trigger it: "exactly 3 retries", "pixel perfect", "log this error to sentry", "why did you choose zod?", "the second time I click it throws". File names such as README or CHANGELOG do not trigger it. HTTP method names do not trigger it.

lessons adds at most 1 note of each kind for each 5 prompts.

lessons looks for the skills in 2 places:

  • The skills loaded in the session. The name can also be anthropic-skills:<name>.
  • On macOS, the synced-skills folder of the Claude desktop app.

If a skill is missing, lessons shows a toast at most once a day. /lessons status shows "missing" for that skill.

Usage cost: lessons makes no model calls. A note costs approximately 40 tokens. lessons adds a note only to a prompt that matches.

Privacy: your last 10 prompts stay in memory only, for the repeat check. lessons does not write them to disk.

How to use limit-resume

limit-resume needs no action. It starts with each session.

  1. Read the status line below the prompt. It shows your usage, for example 5h 62% · 7d 41%. 5h is the 5-hour window. 7d is the 7-day window.
  2. If the 5-hour usage reaches 85%, a toast tells you. Commit your work at this point.
  3. If a turn stops because of a usage limit, the status line shows when the work continues. At the reset time plus 1 minute, limit-resume sends "Continue from where you left off".
  4. If a turn stops because of a temporary API error, limit-resume tries again after 1, 2, 4, and 8 minutes, then every 15 minutes. It stops after 12 tries.
  5. To cancel a pending continue, type any message.
  6. To turn the plugin off or on, type /autoresume off or /autoresume on. Type /autoresume status to see the current setting.

Claude Code has a built-in setting, autoContinueAtUsageLimit, that also continues after a usage limit. Do not use the built-in setting and limit-resume together for usage limits. If you do, the turn gets 2 "continue" messages.

How to use multi-harness

multi-harness is a Codex plugin. Its manifest is multi-harness/.codex-plugin/plugin.json, and its plugin name is platform-orchestrator. It is not in the Claude Code marketplace file.

  1. Install the multi-harness folder with the Codex plugin installer.
  2. Ask Codex to use Platform Orchestrator on a backlog. For example: "Use Platform Orchestrator to turn this backlog into shippable waves, branch and PR gates, tracker updates, and verification evidence."
  3. Use the templates in multi-harness/assets/templates/ for wave plans, tracker updates, QA evidence, and pull request closeout.

The 6 skills are:

SkillUse
platform-wave-orchestratorDivide a backlog into agent lanes and implementation waves.
platform-agent-patternsChoose how agents work together on a wave.
platform-pr-closeoutGate and close branches and pull requests.
platform-tracker-syncUpdate GitHub and Notion trackers.
platform-qa-evidenceCollect QA evidence for each change.
platform-safety-reviewReview work that touches sensitive data, regulated text, or trust and safety limits.

To check the folder structure, run python3 multi-harness/scripts/check_plugin_structure.py.

Development

Each Claude Code plugin has checks for its logic. Node 23 or newer runs the .ts check files directly.

node limit-resume/check.ts
node ship-state/check.ts
node followups/checks/ask.check.ts
node lessons/checks/detect.check.ts
bash timeline/checks/run.sh

To run the behavior test of ship-state, run claude plugin test ship-state. It runs 16 cases on the terminal and desktop surfaces.

To run the behavior test of timeline, run claude plugin test timeline. It runs 18 cases on the terminal and desktop surfaces.

To run the behavior test of followups, run claude plugin test followups. It runs 8 cases on the terminal and desktop surfaces.

To run the behavior test of lessons, run claude plugin test lessons. It runs 9 cases.

To type-check timeline, do these 2 steps:

  1. In a Claude Code session in this repository, run /plugin-types .claude/types. This command writes the Claude Code type declarations.
  2. Run tsc -p timeline/tsconfig.check.json.

License

MIT. See LICENSE. Copyright 2026 Tempered Works LLC.

Source 1 files
hooks/register.ts 137 lines
1import type { EngineInterface as Engine, Register } from 'claude-code'
2
3type Kind = 'limit' | 'transient' | 'fatal' | null
4type Window = { kind: string; percentUsed: number; resetsAt?: string }
5type Timer = { cancel: () => void }
6
7const MIN = 60_000
8const MAX_TRIES = 12
9const WARN_AT = 85
10const RESUME =
11  'The rate limit / API error that stopped the last turn has cleared. Continue from where you left off.'
12
13// What ended the turn. null = a normal answer.
14export function classify(reason: string, answer: string, windows: Window[]): Kind {
15  const text = answer.trim()
16  const isError =
17    reason === 'error' || (text.length < 400 && /^(you've hit your|api error)/i.test(text))
18  if (!isError) return null
19  if (/prompt is too long|context (window|limit)|maximum context/i.test(text)) return 'fatal'
20  if (/hit your .*limit|usage limit|rate.?limit|\b429\b/i.test(text)) return 'limit'
21  if (windows.some(w => w.percentUsed >= 100)) return 'limit'
22  return 'transient' // 529 overloaded, 5xx, dropped connection, machine slept
23}
24
25// How long to wait before the next resume. Limits wait for the exceeded window(s) to reset.
26export function delayMs(kind: 'limit' | 'transient', attempt: number, windows: Window[], now: number): number {
27  if (kind === 'transient') return Math.min(MIN * 2 ** attempt, 15 * MIN)
28  const future = windows.filter(w => w.resetsAt && Date.parse(w.resetsAt) > now)
29  const over = future.filter(w => w.percentUsed >= 100)
30  const pick = over.length ? over : future.sort((a, b) => b.percentUsed - a.percentUsed).slice(0, 1)
31  if (!pick.length) return 30 * MIN
32  return Math.max(...pick.map(w => Date.parse(w.resetsAt!))) - now + MIN
33}
34
35export const fmt = (ms: number) => {
36  const m = Math.max(1, Math.round(ms / MIN))
37  return m < 60 ? `${m}m` : `${Math.floor(m / 60)}h${String(m % 60).padStart(2, '0')}m`
38}
39
40const usageLine = (ws: Window[]) =>
41  ws
42    .map(w => `${w.kind === 'five_hour' ? '5h' : w.kind === 'seven_day' ? '7d' : w.kind} ${Math.round(w.percentUsed)}%`)
43    .join(' · ')
44
45// Shared by the hooks and the top-level helpers below: the loader lets $ reach only functions declared at the top of this file.
46const s: { timer?: Timer; tick?: Timer; attempt: number; warned: string } = { attempt: 0, warned: '' }
47
48const stop = () => {
49  s.timer?.cancel()
50  s.tick?.cancel()
51  s.timer = s.tick = undefined
52}
53
54const showUsage = async ($: Engine) => {
55  const { rateLimits } = await $.session.usage()
56  if (!s.timer) $.ui.status(rateLimits.length ? usageLine(rateLimits) : undefined)
57  const five = rateLimits.find(w => w.kind === 'five_hour')
58  if (five && five.percentUsed >= WARN_AT && five.percentUsed < 100 && s.warned !== five.resetsAt) {
59    s.warned = five.resetsAt ?? 'seen'
60    $.ui.toast(`5h window ${Math.round(five.percentUsed)}% used. Good moment to commit a checkpoint.`, {
61      timeoutMs: 10_000,
62    })
63  }
64  return rateLimits
65}
66
67const paint = async ($: Engine, label: string, due: number) =>
68  $.ui.status(`⏸ ${label}: auto-resume in ${fmt(due - (await $.clock.now()))} · /autoresume off cancels`)
69
70export const register: Register = on => {
71  on('session.start', async ($, e, next) => {
72    await $.command.register({
73      name: 'autoresume',
74      description: 'limit-resume: turn auto-resume after rate limits on or off',
75      argumentHint: 'on | off | status',
76    })
77    void showUsage($)
78    return next(e)
79  })
80
81  on('command.run', { command: 'autoresume' }, async ($, e) => {
82    const arg = e.args.trim()
83    if (arg === 'on' || arg === 'off') await $.store.set('enabled', arg === 'on')
84    if (arg === 'off') stop()
85    const isOn = (await $.store.get('enabled')) !== false
86    await showUsage($)
87    return { text: `limit-resume is ${isOn ? 'on' : 'off'}${s.timer ? '; a resume is scheduled' : ''}.` }
88  })
89
90  // You typed something while a resume was pending: you took over.
91  on('prompt.submit', ($, e, next) => {
92    if (s.timer && (e.origin.kind === 'composer' || e.origin.kind === 'bridge')) {
93      stop()
94      void showUsage($)
95    }
96    return next(e)
97  })
98
99  on('turn.complete', async ($, e, next) => {
100    const result = await next(e)
101    if (e.agentId || e.isAborted) return result
102
103    const windows = await showUsage($)
104    const kind = classify(e.reason, e.answer, windows)
105    if (!kind) {
106      s.attempt = 0
107      return result
108    }
109    if (kind === 'fatal') {
110      $.ui.toast('limit-resume: context limit hit. Not auto-resuming; /compact first.')
111      return result
112    }
113    if ((await $.store.get('enabled')) === false) return result
114    if (s.attempt >= MAX_TRIES) {
115      $.ui.toast(`limit-resume: gave up after ${MAX_TRIES} tries.`)
116      s.attempt = 0
117      return result
118    }
119
120    const now = await $.clock.now()
121    const wait = delayMs(kind, s.attempt++, windows, now)
122    const due = now + wait
123    const label = kind === 'limit' ? 'Rate limit' : 'API error'
124
125    stop()
126    s.timer = $.clock.after(wait, () => {
127      stop()
128      $.ui.status('▶ limit-resume: resuming…')
129      void $.prompt.submit({ text: RESUME })
130    })
131    s.tick = $.clock.every(MIN, () => void paint($, label, due))
132    await paint($, label, due)
133    $.ui.toast(`limit-resume: ${label.toLowerCase()}. Resuming in ${fmt(wait)}.`, { timeoutMs: 8000 })
134    return result
135  })
136}
137