Agent Rewake docs
Agent Rewake picks your coding agent’s work back up when a usage limit resets, so it continues while you’re away, in the same session: in a terminal (Claude Code, Codex, GitHub Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode, Antigravity CLI), in Claude Code’s panel in VS Code or Cursor, in Cursor’s own agent, and in Zed’s Agent Panel for every external agent. Everything outside Zed is a preview.
Is it for you?
Section titled “Is it for you?”Find where you use your agent. Every place needs Node.js 22 or newer, on macOS, Linux or Windows.
| Where you use your agent | How Rewake works there | Needs |
|---|---|---|
| Claude Code in a terminal, or its panel in VS Code or Cursor (preview) | A plugin inside the session asks once at the limit and continues the same session after the reset. If you close Claude Code first, agent-rewake continue continues the closed session (macOS and Linux) |
Claude Code 2.1.287 or newer |
| Codex in a terminal (preview) | Type rewake at the limit; a system timer continues the thread after the reset, or when you next open Codex |
Codex 0.149.0 or newer |
| GitHub Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode or Antigravity CLI (previews) | Once the session is closed, agent-rewake continue has a system timer continue it after the reset |
Each one’s version |
| Zed’s Agent Panel, with an external agent such as Claude Agent, Codex or Gemini CLI | On the connection between Zed and the agent: the thread offers to resume at the reset, and you can schedule messages. Keep Zed open | Zed 1.22 or newer |
| JetBrains IDEs or Devin Desktop, with Claude Agent or Codex (preview, not tried yet) | The same add-on as in Zed, picked in the IDE: resumes after a limit while the IDE stays open | See the previews |
Each name links to that place’s guide. Zed’s Agent Panel opens with ⌘? on macOS, Ctrl+? on Linux and Ctrl+Shift+/ on Windows.
It can’t reach:
- Zed’s own agent (the panel’s built-in one): Zed doesn’t let add-ons into it. Start the thread with Claude Agent in the same panel instead.
- Claude’s own apps: claude.ai and the Claude desktop app’s chat.
Not supported yet: GitHub Copilot’s own chat in VS Code. The Claude desktop app’s Code tab: Rewake’s plugin has code for it (it always asks first), but it hasn’t been tried.
Install
Section titled “Install”You need Node.js 22 or newer. It works on macOS, Linux and Windows.
npx @codizelabs/agent-rewake installIn a terminal, install shows what it found on your computer (Zed and each coding agent, with its version) and what Rewake does in each. Tick the places you want, see every change together, and answer once; then one line per place gives its next step. An agent too old for Rewake is shown with how to update it. Everything except Zed is a preview; each one’s steps are in its guide.
In Zed: You need Zed 1.22 or newer with its AI features on, and an external agent in the Agent Panel (for example Claude Agent, signed in; install can add it for you). For Zed, install lists the agents it will add Rewake to and asks before writing anything. Rewake goes in front of each agent under the agent’s own name, so your existing threads keep working. Each file is backed up first; comments and settings are kept.
Then quit Zed completely and open it again (⌘Q on macOS, Ctrl+Q on Linux; on Windows, close every Zed window), open the Agent Panel, and open or start a thread with one of your agents. Zed starts Rewake with that thread, not when Zed itself starts. npx @codizelabs/agent-rewake doctor confirms it: “Working: Zed last started it …”.
The commands below are written as agent-rewake …; run them with npx @codizelabs/agent-rewake …, or install it once with npm install -g @codizelabs/agent-rewake.
A Rewake menu now appears under the message box, next to the model picker.
Agents
Section titled “Agents”Pick your agent for a step-by-step guide. Rewake works in a terminal, in VS Code and Cursor (Claude Code’s panel), in Zed, and in JetBrains IDEs and Devin Desktop. Everything outside Zed is a preview, installed one place at a time.
| Agent | Where | What you get |
|---|---|---|
| Claude Code (preview) | Terminal, VS Code, Cursor | Asks once at the limit, then continues the session after the reset; messages sent later |
| Codex (preview) | Terminal | Type rewake at the limit, and the thread continues after the reset |
| GitHub Copilot CLI (preview) | Terminal | Continues a closed session after the reset |
| Gemini CLI (preview) | Terminal | Type /rewake at the limit, and the session continues once closed |
| Grok Build (preview) | Terminal | Type /rewake at the limit, and the session continues once closed |
| Qwen Code (preview, not tried yet) | Terminal | Type /rewake at the limit, and the session continues once closed |
| OpenCode (preview, not tried yet) | Terminal | Continues a closed session after the reset |
| Antigravity CLI (preview) | Terminal | Continues a closed session after the reset |
| Cursor (preview, limit not tried yet) | Cursor’s own agent | At a limit, continues the chat at the time you choose, while its window stays open |
| Zed | Every external agent in Zed’s Agent Panel | Resume after a limit, automatic resume, messages sent later, a Rewake menu |
| JetBrains IDEs, Devin Desktop (preview, not tried yet) | Claude Agent and Codex, picked in the IDE | Resume after a limit while the IDE stays open |
Not supported yet: GitHub Copilot’s own chat in VS Code.
Outside Zed: previews
Section titled “Outside Zed: previews”To continue a Claude Code, Codex or other agent session after a usage limit in a terminal, in Claude Code’s VS Code or Cursor panel, in a JetBrains IDE or in Devin Desktop, install a preview. Previews aren’t installed by default, haven’t been checked with every account type yet, and may change. None has met a real usage limit yet: the ones tried end to end were tried with a test limit (see the table below). Each agent’s guide follows this section.
One command everywhere: /rewake is Rewake’s only command in a conversation, the same in Zed, Claude Code, Gemini CLI, Grok Build, Qwen Code and Cursor’s own agent. Rewake answers it itself, without using the model.
| Place | Type | At a limit | Also |
|---|---|---|---|
| Zed (and other ACP clients) | /rewake |
Opens the resume question, or resumes at the reset (/rewake 3:30pm for another time) |
Everything in Commands in a thread |
| Claude Code | /rewake |
Continues after the reset (/rewake 3:30pm for another time) |
/rewake in 1h <message>, list, cancel [N|all], auto on|off |
| Gemini CLI | /rewake |
Continues once Gemini CLI is closed, at the reset (/rewake 3:30pm for another time) |
list, cancel |
| Grok Build | /rewake |
Continues once the session is closed, at the reset (/rewake 3:30pm for another time) |
list, cancel |
| Qwen Code | /rewake |
Continues once the session is closed, at the reset (/rewake 3:30pm for another time) |
list, cancel |
| Cursor’s own agent | /rewake |
Continues the chat, while its window stays open (/rewake 3:30pm for another time) |
list, cancel |
| Codex | rewake, without the slash |
Continues after the reset (rewake 3:30pm for another time) |
rewake list, rewake cancel |
/rewake cancel cancels the continue, and /rewake help lists what works where you are; anything a place can’t do gets one line saying so. Codex is the one place without the slash: the Codex terminal answers a slash command it doesn’t know with “Unrecognized command” and never passes it on. GitHub Copilot CLI, OpenCode and Antigravity CLI have no command in the conversation: use npx @codizelabs/agent-rewake continue once the session is closed.
Each preview needs a recent version of its agent (a closed Claude Code session also needs claude --permission-prompts, in 2.1.259 or newer):
| Agent | Needs | Automated tests use | Tried by hand on a Mac (test limit) |
|---|---|---|---|
| Claude Code | 2.1.287 or newer | 2.1.292 | Yes: in a terminal, VS Code and Cursor (2.1.292) |
| Codex | 0.149.0 or newer | 0.160.1 | Installed by hand only; the usage-limit flow so far only in automated tests |
| GitHub Copilot CLI | 1.0.92 or newer | 1.0.92 | Yes (1.0.93) |
| Grok Build | 1.0.46 or newer | 1.0.46 | Yes (1.0.46) |
| Gemini CLI | 0.62.0 or newer | 0.62.0 | Yes (0.63.0, signed in with an API key) |
| Qwen Code | 0.25.0 or newer | Not yet | Not yet |
| OpenCode | 1.18.35 or newer | Not yet | Not yet |
| Antigravity CLI | Any version (not checked) | Not yet | Not yet |
Automated tests run each agent’s real program against a test server; “Not yet” means no real copy has been tested. “Tried by hand” means the agent was installed on a real Mac and taken through Rewake’s install, a usage limit and the continue in the same session; the limit came from a test server, because a real one can’t be had on cue. Windows and Linux haven’t been tried by hand yet.
If the agent is still limited when a closed session is continued, Rewake tries again at the new reset time, up to four times, then tells you.
installwon’t set up an agent that’s too old, and tells you how to update it.doctorwarns when an agent is too old.- If an agent is installed more than once,
doctorandinstallboth go by the copy your terminal starts (the first one on your PATH).agent-rewake doctor --detailslists every copy and says which one that is. doctoralso notes when Claude Code, Codex, Gemini CLI or Grok Build is newer than the version tested (Copilot CLI, Qwen Code, OpenCode and Antigravity CLI aren’t compared). It should still work; if Rewake misses a usage limit there, open an issue with whatagent-rewake doctor --detailsshows. To report the message itself, runagent-rewake doctor --limit-sample "<the message>": it shows how Rewake reads the text and prints a link to a pre-filled issue form. It sends nothing and opens nothing; you open the link and submit the form yourself.
In Devin Desktop (the editor that was Windsurf: windsurf.com now redirects to devin.ai, checked 9 October 2026), run npx @codizelabs/agent-rewake install --only devin-desktop, restart it, then pick Claude Agent (with Rewake) or Codex (with Rewake) in the agent selector for a new conversation. This hasn’t been tried in Devin Desktop yet.
In JetBrains IDEs (AI Assistant 2026.2 or newer), run npx @codizelabs/agent-rewake install and tick JetBrains IDEs (it’s listed when Rewake finds one), or run npx @codizelabs/agent-rewake install --only jetbrains, then pick Claude Agent (with Rewake) or Codex (with Rewake) in AI Assistant. Rewake resumes a conversation only while the IDE stays open: after a restart, JetBrains starts a new session. The Claude Code plugin for JetBrains runs Claude Code in the IDE’s terminal, so the Claude Code setup already covers it.
For Claude Code, Copilot CLI, Gemini CLI, Grok Build, Qwen Code and OpenCode: Rewake continues a closed session from a system timer, which starts the agent without your shell profile. Rewake remembers each session’s own settings (such as COPILOT_HOME, GEMINI_CLI_HOME, GROK_HOME, QWEN_HOME, OPENCODE_CONFIG_DIR or a provider address) and gives them back to it. It never stores an API key: if the session used a key exported in your shell profile (such as GEMINI_API_KEY, XAI_API_KEY, OPENAI_API_KEY for Qwen Code or Copilot’s GH_TOKEN), the timer can’t see it, so Rewake doesn’t continue and tells you why. To have Rewake continue those sessions, sign in to the agent and remove the key from your shell profile. For Codex and Antigravity CLI, keep their default folders: a CODEX_HOME set only in your shell profile isn’t seen.
Continuing a long session re-reads all of its history, and that uses your plan like any message you type, because the agent’s cache has expired by the time the limit resets. Where the agent gives Rewake the path of its history file (Gemini CLI and Cursor), agent-rewake continue looks at the file’s size, never its content, and when it is 5 MB or more it adds “This session is large (about N MB of history); continuing it re-reads that and uses your plan.” It’s a size, not a count of tokens, and it only warns: nothing is paused.
While Rewake continues a closed session, the agent runs in the background with no window. A notification says when it starts and when it’s done. To stop it, run agent-rewake continue --cancel (or npx @codizelabs/agent-rewake continue --cancel) and answer y: what it has done so far stays. Rewake stops a run that is still going after three hours.
Resume now. If you upgraded your plan, or the limit lifted early, you don’t have to wait for the reset: run agent-rewake continue --now for a resume Rewake planned outside Zed. With one planned it names it and asks; with several, in a terminal, it lists them to pick one; or give the id, the eight characters in square brackets in agent-rewake schedules: agent-rewake continue --now <id>. It says which agent and folder, and what it will send, and asks first (the default is No). Without a terminal, give the id and --yes. It then does what the timer would have done at the reset, with the same checks: it sends once. If you typed in the session after the limit, if the session is open or has changed, if the agent has continued by itself, if the limit is still on, or if the message can’t reach the agent (you’re signed out, the session was deleted or archived, a key from your shell is missing, or the folder is gone), nothing is sent and the resume stays planned for its time; Rewake says which, and how to cancel it. Any other error ends the resume as failed, as it does at the reset. Credit and billing limits are never resumed. The window stays busy until the agent finishes (up to three hours); Ctrl+C stops it and cancels this planned resume (what the agent has done so far stays). A Cursor chat can’t be continued this way: Cursor allows it only from the waiting chat window, within four hours of the limit. agent-rewake schedules --explain <id> names the command. For a message in a Zed thread, use Rewake → Change a scheduled message… instead.
On macOS and Linux, installing Codex, Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode, Antigravity CLI or Cursor also adds a login item, so planned resumes are set again after a restart (macOS may show “Background Items Added”; it’s listed as “node”, which runs Agent Rewake, under Login Items, Allow in the Background). It’s removed when you uninstall the last of them. To turn it off on its own: on macOS switch off “node” in System Settings → General → Login Items; on Linux run systemctl --user disable agent-rewake-sweep.service (or delete ~/.config/autostart/agent-rewake-sweep.desktop). Planned resumes then wait until you next open an agent after a restart.
On macOS and Linux, hooks, timers, the login item and Zed’s entries for Codex and the other agents (not Claude Agent, see below) start Rewake through two files in Rewake’s own folder: a small script, bin/rewake-node, which finds a working Node.js 22 or newer each time, and bin/agent-rewake.mjs, Rewake itself. Upgrading or removing a Node.js version (nvm, fnm, asdf, Homebrew) doesn’t break them, and starting Rewake in Zed needs neither npm nor the network (an agent’s own first download still needs the network). If you run npx @codizelabs/agent-rewake install after updating from an earlier version, Zed’s entries move over to these files once. Claude Agent’s entry keeps starting Rewake from its package, because the Claude adapter is installed beside the package and Rewake’s own copy is a single file that can’t find it; a removed Node.js version can still stop that one until you run install again. Windows keeps starting Rewake with the Node.js it was set up with: run install again after you upgrade or move Node.js.
The system timer is launchd on macOS, Task Scheduler on Windows, and on Linux a systemd user timer or the at service. Linux without either (WSL without systemd, or a container) uses Rewake’s own background process instead: it runs planned resumes at their times while the computer stays on, stops when you log out or restart, and starts again the next time you use an agent. A resume missed by more than half an hour isn’t sent. agent-rewake install and doctor say when it’s used. So resumes don’t wait for you after a restart: in WSL, turn on systemd (add [boot] and systemd=true to /etc/wsl.conf, then run wsl.exe --shutdown in Windows and open WSL again; Microsoft’s guide); elsewhere, install and start the at service (Debian, Ubuntu: sudo apt install at, then sudo service atd start).
For every preview, keep the computer on and awake until the time Rewake gives. On macOS the Claude Code preview keeps it from idling to sleep while a continue is due within six hours, and every preview does while the agent works on the resumed session (the Keep this computer awake setting decides). install and doctor list the previews you set up.
Claude Code
Section titled “Claude Code”Preview, for Claude Code in a terminal, and in Claude Code’s panel in VS Code or Cursor (the same plugin loads there). The Claude desktop app’s Code tab hasn’t been tried yet; Rewake’s plugin has code for it, and always asks first there.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only claude-codeIt adds Rewake’s plugin with Claude Code’s own plugin commands.
-
Start a new Claude Code session, and work as usual.
-
At a usage limit, Rewake asks once whether to continue the session after the reset: at that time, or at that time and from then on in every session when the reset is within a day. If automatic resume is on for every agent (
agent-rewake continue --always, or Zed’s Settings), it doesn’t ask./rewake auto onoroffsets it for Claude Code only. In a terminal, when Claude Code’s own “Continue automatically at usage limit” will most likely continue the session (its setting on, a reset within a day), Rewake leaves it to Claude Code and doesn’t ask. In VS Code and Cursor, Claude Code’s own setting doesn’t apply, so Rewake handles every limit there. While Claude Code is open, Rewake runs inside it. If you close Claude Code at the limit before answering, or it quits or the computer restarts, the session counts as closed: see “Closed sessions” below. A continue that was planned inside Claude Code and came due while it was closed is offered when you reopen the session, not sent. -
If you didn’t answer the question, type
/rewaketo continue after the reset (or/rewake 3:30pmfor another time). To cancel a planned continue, type/rewake cancel. To be asked each time again,/rewake auto off. -
To send a message later, type
/rewakealone and choose when, then what, or type it in one go:/rewake in 1h Run the tests./rewake listshows what’s scheduled,/rewake cancel Ndeletes one, and/rewake helplists the rest. -
Check the setup:
npx @codizelabs/agent-rewake doctor. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only claude-code.
Needs: Claude Code 2.1.287 or newer (tested with 2.1.292).
If you close Claude Code at a usage limit (macOS and Linux; not tried against a real usage limit yet). Close it, or let it quit or restart, before the limit is answered, then run npx @codizelabs/agent-rewake continue. It lists the session, and at the reset a system timer continues it with Claude Code’s own command, claude --resume <session id> -p: the same session, in its folder, in the background with no window, with your message on standard input.
- Permissions. Rewake never asks Claude Code to skip permission prompts. A step that would need your approval is denied, so the run goes on without it.
- Automatic. With
continue --always, Rewake does this by itself once it notices Claude Code has closed. It notices the next time any Rewake command or hook runs. - When it doesn’t continue. If you typed in the session after the limit, that answers it. If the session is open again, Rewake never writes into it. If the session’s transcript changed after the limit, a notification says so instead.
- Claude Code’s own “Continue automatically at usage limit” keeps handling the limit while Claude Code stays open. Rewake steps in only once it is closed.
- Your settings. A timer starts Claude Code without your shell profile, so Rewake gives the run what the session had:
CLAUDE_CONFIG_DIR,ANTHROPIC_BASE_URL,ANTHROPIC_MODELand the Bedrock, Vertex and Foundry switches. It never storesANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENorCLAUDE_CODE_OAUTH_TOKEN: if the session used one exported in your shell profile, Rewake doesn’t continue and says why. If you sign in with your Claude account, the timer’sclaudehas to be able to read that sign-in; that hasn’t been checked from a timer yet.
Can’t: continue while the computer is asleep, or a closed session on Windows (Rewake can’t tell there that Claude Code has closed).
Preview, for Codex in a terminal.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only codexIt adds Rewake’s hooks to Codex and checks that Codex lists them.
-
Once, in Codex: trust Rewake’s hooks when Codex says “Hooks need review”.
-
At a usage limit, type
rewakein the thread (without the slash: the Codex terminal refuses slash commands it doesn’t know). Rewake says when it will continue the thread, after the reset. If Rewake doesn’t know when the limit resets, type a time with it, for examplerewake 3:30pm.rewake listshows it, andrewake helplists the rest. -
Keep the computer on and awake until then. If Codex is closed at that time, the thread continues when you next open it. To cancel, type
rewake cancel, or send any other message in the thread. -
Check the setup:
npx @codizelabs/agent-rewake doctor. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only codex.
Needs: Codex 0.149.0 or newer (tested with 0.160.1).
Privacy note: Rewake queues the message with codex queue --message <text>, so another program on your computer can read it from the process list for the few seconds that command runs.
Can’t: schedule messages, or continue a thread in the Codex desktop app.
GitHub Copilot CLI
Section titled “GitHub Copilot CLI”Preview. Rewake continues a session once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only copilot-cli -
Work in Copilot CLI as usual. When a session stops at its usage limit, close it.
-
Run
npx @codizelabs/agent-rewake continue. Run it any time before the reset, and Rewake waits until then, then continues the closed session. Copilot’s weekly limit doesn’t say when it resets, socontinueasks you when (in 1, 3 or 5 hours, or another time). -
To have Rewake continue closed sessions by itself, run
npx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again, andcontinue --cancelcancels every planned resume. This is one setting for every agent: it also turns on automatic resume in new Zed threads and in Claude Code (unless you typed/rewake auto offthere), andcontinue --askturns it off in all of them. Reopening the session and typing in it before the reset also cancels its resume. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only copilot-cli. That also cancels its planned resumes.
Needs: GitHub Copilot CLI 1.0.92 or newer (tested with 1.0.92).
Can’t: continue a session that’s still open, or schedule messages.
Gemini CLI
Section titled “Gemini CLI”Preview. Rewake continues a session once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only gemini-cliIt adds Rewake’s extension with Gemini CLI’s own command.
-
Work in Gemini CLI as usual. At a usage limit, Gemini CLI asks what to do. Choose Stop, type
/rewakethere, then close Gemini CLI. Gemini CLI sometimes says when its limit resets; when it doesn’t, Rewake asks you when.While that question is open, Rewake can’t see the limit. If you close Gemini CLI without choosing, Rewake has nothing to continue: open the session again later and continue it yourself.
Gemini CLI shows Rewake’s answer as “Agent execution blocked … This request failed”. That’s expected: Rewake answers
/rewakeitself, without using the model. -
If you didn’t type
/rewake: once the session is closed, runnpx @codizelabs/agent-rewake continue. Run it any time before the reset, and Rewake waits until then, then continues the closed session. -
To have Rewake continue closed sessions by itself, run
npx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again, andcontinue --cancelcancels every planned resume. This setting also applies to Claude Code, unless you typed/rewake auto offthere. Reopening the session and typing in it before the reset also cancels its resume. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only gemini-cli. That also cancels its planned resumes.
Needs: Gemini CLI 0.62.0 or newer (tested with 0.62.0). Tried with an API key; signing in with Google hasn’t been tried yet.
Privacy note: Rewake gives Gemini CLI your message on standard input. If you’ve turned Gemini CLI’s sandbox on, Gemini starts itself again inside the sandbox and passes the text as --prompt, so another program on your computer can read it from the process list while the run lasts.
Can’t: continue a session that’s still open, or schedule messages. It can’t approve anything for you either: a continued session runs without a terminal, so Gemini CLI can’t ask you to approve an edit or a command. It refuses that step and carries on without it, and Rewake sends a notification saying so. Open the session to see where it stopped, and approve what’s needed there.
Grok Build
Section titled “Grok Build”Preview. Rewake continues a session once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only grok -
Work in Grok Build as usual. When a session stops at its usage limit, type
/rewakein that same session (the slash is optional). Grok’s free usage limit doesn’t say when it resets, so/rewakeasks you to say when, for example/rewake 3:30pm./rewake listshows what’s planned,/rewake cancelcancels it. Then close the session: Rewake continues it once it’s closed, at the chosen time. -
To have Rewake continue closed sessions by itself, without typing
/rewakefirst, runnpx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again. This setting also applies to Claude Code, unless you typed/rewake auto offthere. Typing anything else in the session before the reset cancels its resume. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only grok. That also cancels its planned resumes.
Needs: Grok Build 1.0.46 or newer (tested with 1.0.46).
Can’t: continue a session that’s still open, or schedule messages.
Qwen Code
Section titled “Qwen Code”Preview, not tried yet. Rewake continues a session once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only qwen-codeIt adds Rewake’s hooks to Qwen Code’s user settings file,
~/.qwen/settings.json(orsettings.jsonin the folderQWEN_HOMEnames). Your own settings and hooks stay, and the file is backed up first. Start a new Qwen Code session afterwards; one that is already open may pick the hooks up only when you open/hooksin it. -
Work in Qwen Code as usual. When a session stops at its usage limit, type
/rewakein that same session (the slash is optional). Qwen Code’s token-plan quota error says when the quota resets (“The quota will reset at 07-27 09:25:00 UTC”), without a year: Rewake takes the next such time. When an error gives no time, say one, for example/rewake 3:30pm./rewake listshows what’s planned,/rewake cancelcancels it. Then close the session: Rewake continues it once it’s closed, at the chosen time. -
To have Rewake continue closed sessions by itself, without typing
/rewakefirst, runnpx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again. This setting also applies to Claude Code, unless you typed/rewake auto offthere. Typing anything else in the session before the reset cancels its resume. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only qwen-code. That removes only Rewake’s hooks from the settings file and cancels its planned resumes.
Needs: Qwen Code 0.25.0 or newer. Not tried: no real Qwen Code has been run with Rewake, and no real Qwen Code usage limit has been met. Everything Rewake relies on comes from Qwen Code’s documentation and source code at version 0.25.0, and from automated tests with a stand-in program. Windows hasn’t been tried either; there Rewake sets the hooks to run in PowerShell.
Doesn’t resume: a billing error (Qwen Code’s billing_error, such as a payment problem): waiting doesn’t fix it, so Rewake tells you instead. A rate limit that isn’t an exhausted quota is a short wait Qwen Code retries itself.
Privacy note: Rewake gives Qwen Code your message on standard input. If you’ve turned Qwen Code’s sandbox on, Qwen starts itself again inside the sandbox and passes the text as --prompt, so another program on your computer can read it from the process list while the run lasts. That, and the message going in on standard input at all, is read from Qwen Code’s source, not tried.
Can’t: continue a session that’s still open, or schedule messages. It can’t approve anything for you: Rewake continues the session with Qwen Code’s default approval mode and never passes --yolo or any other way past a question. Qwen Code’s documentation doesn’t say what a run without a terminal does with a tool that needs approval, and this wasn’t tried, so Rewake can’t tell you whether the work was done: open the session to see where it stopped. Qwen Code also doesn’t run its hook for an API error in a run without a terminal, so if the limit hits again during a continue, Rewake finds out from the run’s output, whose wording isn’t known.
OpenCode
Section titled “OpenCode”Preview, not tried yet. Rewake continues a session once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only opencodeIt adds one small plugin file,
agent-rewake.js, to OpenCode’s plugin folder:~/.config/opencode/plugins/, or the same under the folderXDG_CONFIG_HOMEnames. The first line of the file says Rewake wrote it. Your own plugins and settings stay, and a file of that name that Rewake didn’t write is never touched. Start OpenCode again afterwards: it loads plugins when it starts. -
Work in OpenCode as usual. When OpenCode stops at a usage limit that has a wait (“Usage limit reached. It will reset in …”), it waits and tries again by itself, as long as it stays open. To leave instead, close it.
-
Run
npx @codizelabs/agent-rewake continue. Run it any time before the reset, and Rewake waits until then, then continues the closed session. When the message gives no time,continueasks you when. -
To have Rewake continue closed sessions by itself, run
npx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again, andcontinue --cancelcancels every planned resume. This setting also applies to Claude Code, unless you typed/rewake auto offthere. Reopening the session and typing in it before the reset also cancels its resume. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only opencode. That deletes only Rewake’s plugin file and cancels its planned resumes.
Needs: OpenCode 1.18.35 or newer (the release whose source Rewake was built from; older ones weren’t checked). Not tried: no real OpenCode has been run with Rewake, and no real OpenCode usage limit has been met. Everything Rewake relies on comes from OpenCode’s documentation and source code (release 1.18.35), and from automated tests with a stand-in program. Windows hasn’t been tried either.
What it reads: only OpenCode’s own usage limit for its Go plan, whose message gives the wait. A limit from another provider you use through OpenCode (Anthropic, OpenAI and so on) reaches OpenCode as a plain retry with that provider’s wording, and Rewake doesn’t recognise it. Other retries (server errors, short throttles) OpenCode rides out itself. A limit that one of OpenCode’s sub-agents meets isn’t recorded; if the main session then stops at the limit too, that one is.
Doesn’t resume: the free-usage limit (“Free usage exceeded, subscribe to Go”): waiting doesn’t fix it, so Rewake tells you instead.
Privacy note: the plugin hands each event it cares about (a session starting, a limit, a turn ending, a message sent) to Rewake on your computer, and Rewake keeps only the session’s id, folder and limit time, never what was said. Rewake gives OpenCode your message on standard input (not tried).
Can’t: continue a session that’s still open, or schedule messages. It can’t approve anything for you: Rewake never turns on OpenCode’s auto-approve, so a request your OpenCode settings mark “ask” is refused. But OpenCode allows most tools without asking by default, so a continued session can edit files and run commands just as one you start yourself can. To keep continued sessions stricter, mark those tools “ask” in your OpenCode permission settings; the session may then stop short. Rewake can’t tell whether the work was done: open the session to see where it stopped.
Not known: whether OpenCode tells the plugin when you close the terminal (if it doesn’t, Rewake notices the closed session at its next run or at continue), and what a continue does if the limit hasn’t reset yet.
Antigravity CLI
Section titled “Antigravity CLI”Preview. Rewake continues a conversation once it’s closed.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only antigravity -
Work in Antigravity CLI as usual. When a conversation stops at its usage limit, close it.
-
Run
npx @codizelabs/agent-rewake continue. Run it any time before the reset, and Rewake waits until then, then continues the closed conversation. -
To have Rewake continue closed conversations by itself, run
npx @codizelabs/agent-rewake continue --alwaysonce: from then on it does so when the reset is within a day.continue --askasks again, andcontinue --cancelcancels every planned resume. This setting also applies to Claude Code, unless you typed/rewake auto offthere. -
Check the setup:
npx @codizelabs/agent-rewake doctor. Its “Outside Zed” section shows the next planned resume, and any that need you. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only antigravity. That also cancels its planned resumes.
Needs: any version of Antigravity CLI. Rewake doesn’t check the version, and no real copy has been tested yet.
Privacy note: Antigravity CLI’s own command takes the message as -p <text>, so another program on your computer can read it from the process list while the run lasts.
Can’t: schedule messages. While Antigravity CLI runs in that conversation’s project, Rewake doesn’t continue it and tells you instead.
Cursor
Section titled “Cursor”Preview, for Cursor’s own agent (the Agent panel). Not tried with a real Cursor usage limit yet: continuing the same chat was tried in Cursor 3.23, the limit itself wasn’t.
-
Install:
Terminal window npx @codizelabs/agent-rewake install --only cursorIt adds two hooks to
~/.cursor/hooks.jsonand keeps your own. Then reload Cursor’s window: run Developer: Reload Window from the Command Palette. -
Work as usual. When a chat stops at its usage limit, type
/rewakein that same chat: Cursor doesn’t say when its limit resets, so you choose the time, within 4 hours of the limit (for example/rewake 3:30pm)./rewake listshows what’s planned. -
Keep that Cursor window open: reloading or quitting Cursor cancels the continue. At the time, Rewake sends your resume message (marked as from Agent Rewake) into the same chat. By default it starts “Resume the work from where you were interrupted” and tells the agent to keep going without asking questions. If you type anything else in the chat before then, it doesn’t. If the window was closed or reloaded, Rewake tells you to continue the chat yourself.
-
To cancel, type
/rewake cancelin the chat. To check the setup:npx @codizelabs/agent-rewake doctor. -
To remove it:
npx @codizelabs/agent-rewake uninstall --only cursor.
Needs: Cursor’s agent hooks. Tried with Cursor 3.23; Rewake doesn’t check Cursor’s version.
Can’t: continue more than 4 hours after the limit, or after a limit that waiting won’t lift (a free plan’s allowance, or one that needs payment or a new month: Rewake sends a notification instead), continue a chat whose window is closed, continue by itself (continue --always doesn’t apply: you always choose the time), or reach Cursor’s Agents window and CLI (not tried).
Rewake works the same way in front of every external agent Zed runs: Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose and the rest, npm-based or binary, plus custom agents. Rewake has built-in rules for how each agent it knows by name reports a limit: an error, its own error codes, or a last line such as Cursor’s “Upgrade your plan to continue”. When the agent says when the limit resets, Rewake resumes at that time; otherwise it asks you when. Any other agent, or a custom command, gets the general rules, and its limit may not be recognised. An agent Zed starts from neither an npm package nor a binary can’t be added.
-
Install:
Terminal window npx @codizelabs/agent-rewake installIt lists the agents it will add Rewake to and asks before writing anything.
-
Quit Zed completely and open it again, then open or start a thread with one of your agents in the Agent Panel. The Rewake menu appears under the message box.
-
At a usage limit, the thread asks once whether to resume, with your resume message ready to edit. Submit, keep Zed open, and Rewake sends it about a minute after the limit resets. Details: Resume after a usage limit.
-
To resume without being asked: Rewake → Turn on auto-resume after limits… for this thread, or answer every new thread when a new thread asks (Make it automatic).
-
To send a message later: Rewake → Schedule a message… (Schedule a message).
-
Check the setup:
npx @codizelabs/agent-rewake doctorsays “Working: Zed last started it …” once a thread has started Rewake. -
To remove it from Zed:
npx @codizelabs/agent-rewake uninstall --only zed.
Needs: Zed 1.22 or newer with its AI features on, an external agent in the Agent Panel, and Node.js 22 or newer.
Can’t: reach Zed’s own agent (it isn’t an external agent, so Rewake can’t be added to it), or send anything while Zed is closed or the computer is asleep.
In Zed: the Rewake menu
Section titled “In Zed: the Rewake menu”In Zed, everything is in the Rewake menu under the message box, and the thread asks for you at a usage limit. Elsewhere, see each agent’s guide: there, you type /rewake in the session or run agent-rewake continue.
Resume after a usage limit
Section titled “Resume after a usage limit”When an agent stops at its usage limit, Rewake adds a form to the thread with your resume message, ready to edit.
I'll move the storage code first, then write the tests.
Picking up from the last completed step: the store is split; now the tests for the delivery loop.
- Submit sends the message about a minute after the limit resets. If the agent is still limited then, Rewake waits for the new reset time and tries again.
- Decline schedules nothing.
- If the agent doesn’t say when the limit resets (Cursor, for example), the form asks when: in 30 minutes, 1, 3 or 5 hours, or a custom time.
More work after the resume: while a resume is scheduled, Rewake → Add a message after the resume… queues follow-ups (up to 20). Each goes when the reply before it finishes.
Change the resume message in the form, or with /rewake prompt <text>. If you continue the thread yourself after the reset, or before it and the agent answers (another account, another model), the pending resume is cancelled.
Make it automatic
Section titled “Make it automatic”When you open a new thread, Rewake asks once whether to resume it automatically. Choose every new thread, this thread only, or don’t ask again. For a thread that’s already open, use Rewake → Turn on auto-resume after limits… (or /rewake auto on).
Automatic resume asks you instead of sending when:
- with Claude, your Claude setting “Continue automatically at usage limit” is off;
- the limit resets more than 24 hours from now (a weekly limit, for example);
- you chose On, except when permissions are bypassed in Settings… and the thread skips permission prompts;
- the agent gave the same reset time as last time, or never says when it resets and the limit has lasted about a day.
Credit, spend and billing limits are never resumed: waiting doesn’t fix them, and Rewake says so in the thread. If the message gives a reset time, even next to an offer of credits (“buy more credits, or try again at 2:51 PM”), the limit resets, and Rewake resumes the thread then. Rewake never approves permission requests; those wait for you in Zed.
Schedule a message
Section titled “Schedule a message”Rewake → Schedule a message…: type the message, pick a time (in 30 minutes, 1 or 3 hours, tomorrow morning, when the usage limit resets, or a custom time), and press Submit. Or type it:
/rewake 09:00 Check the build/rewake in 3h Run the tests/rewake every weekday 09:00 Summarise yesterday's commitsTo repeat on any schedule, pick Custom time… and type a cron expression such as 0 9 * * 1-5; Rewake shows what it understood and the next runs before saving.
If the agent is at its usage limit when a scheduled message is due, Rewake waits for the reset and sends it then, even when the reset is days away, and says so in the thread; it doesn’t ask. When the agent doesn’t say when it resets, Rewake tries again after the wait set in Settings (an hour unless you changed it), for up to a day.
You can also ask the agent (“check the CI run again in 30 minutes”). It proposes the message, and you approve or edit it in the thread.
When it’s sent: the message appears in the thread as yours and the agent replies there. If the agent is busy, it waits for the reply to finish. If Zed or your computer wasn’t running and it’s more than 15 minutes late, it’s marked Missed and Rewake asks whether to send it now.
See and change scheduled messages
Section titled “See and change scheduled messages”- Rewake → Schedules shows this thread’s messages.
- Rewake → Change a scheduled message… changes the time or text, sends it now, pauses or deletes it.
- What will happen at the time:
agent-rewake scheduleslists each message with an id in square brackets.agent-rewake schedules --explain <id>says what Rewake will do then and what could stop it (you typing in the thread, the agent continuing on its own, the thread being open, a later usage limit, the computer being off), without sending anything. - Every thread at once: run the Zed task Agent Rewake: schedules (command palette → task: spawn), or
agent-rewake uiin any terminal. Add--keybindingtoinstallfor ⌘⌥R (Ctrl+Alt+R elsewhere; on Windows, Ctrl+Alt can be AltGr, so change it in Zed’skeymap.jsonif it types a character).
Settings
Section titled “Settings”Rewake → Settings… applies to every thread:
- Automatic resume after usage limits: Ask when a new thread opens (default), On, except when permissions are bypassed, On, even when permissions are bypassed, or Off. “On” also covers threads Rewake sees for the first time, such as ones you reopen after installing it.
- Time format: 12-hour (default) or 24-hour.
- Keep this computer awake for resumes and scheduled messages (macOS, Linux with systemd, Windows): While it’s plugged in (default), Always, also on battery or Never. While a resume or scheduled message is due within six hours, or while the agent is working on a scheduled message, Rewake stops the computer from idling to sleep, and says so once in the thread. Closing the lid, choosing Sleep or a flat battery still put it to sleep, and Rewake can’t wake a sleeping computer. Only macOS has been tried by hand; on Linux it uses
systemd-inhibit, on Windows a hidden PowerShell, and both are checked only by automated tests so far. The Claude Code preview holds the same way on all three systems, tied to Claude Code, and the same two are checked only by automated tests.
Outside Zed, the same settings are in a terminal: agent-rewake settings lists each with its value and what it does, agent-rewake settings change lets you pick one and its new value by number, agent-rewake settings <name> shows the values one takes, agent-rewake settings <name> <value> changes it, and agent-rewake settings --reset <name> puts it back to the default. They are one set of settings: a change in either place applies in both, and to every agent Rewake is set up in.
| Name | Values | In Zed’s Settings… |
|---|---|---|
new-threads |
ask (default), on, off |
Automatic resume after usage limits (continue --always and continue --ask change it too) |
auto-when-prompts-skipped |
on (default), off |
Whether “On” includes threads that bypass permissions (Zed threads only) |
clock |
12h (default), 24h |
Time format |
keep-awake |
plugged-in (default), always, never |
Keep this computer awake… (only where Rewake can keep the computer awake; not listed elsewhere) |
workspace-changed |
tell (default), note, hold, off |
Not in the form: what Rewake does when the project changed while a continue outside Zed waited (below) |
usage-warnings |
on (default), off |
Not in the form: warn me when a usage limit is nearly used up (Claude Code, at the moment it happens; Codex, with your next prompt) (below) |
resume-prompt |
Your own message, or Rewake’s own (default) | Not in the form: the message a resume sends to a closed session or a Codex thread, and in new threads that automatic resume turns on |
If the project changed while a continue waited
Section titled “If the project changed while a continue waited”A continue outside Zed can run hours after the limit, and you or another tool may have changed the project meanwhile. When the session’s folder is a git folder, Rewake notes its latest commit and a hash of the list of changed tracked files when it plans the continue (a moment after it is planned, so planning is never slowed), and checks again just before it sends. If the commit or that list differs, the workspace-changed setting decides: tell (the default) tells you, and sends the message as it was; note also adds one fixed line to the message, saying the project changed while the session waited and the agent should re-read files before editing; hold sends nothing, tells you what changed and how to continue; off doesn’t check. The notice names the setting. Only tracked files and the latest commit count: new untracked files (a .DS_Store, build output, logs) don’t. Rewake reads only the commit id and the names-and-status summary of git status --porcelain --untracked-files=no, never file contents, keeps only the commit id and a hash (no file names), and uses local git commands only, with a couple of seconds at most. It does nothing when the folder isn’t a git folder, git isn’t installed or git is slow. Zed threads aren’t checked.
Warnings before a limit (Claude Code and Codex)
Section titled “Warnings before a limit (Claude Code and Codex)”In Claude Code, Rewake’s plugin can tell you before a usage window runs out, so you can finish or shorten what you are doing instead of being stopped mid-task. It reads the usage figures Claude Code already gives the plugin, as of Claude Code’s last reply: it makes no network request and needs no sign-in of its own.
- At 80% and at 95% used, for the 5-hour and the 7-day windows (and other windows of that kind), it shows one short message each, with the time the window resets in your time format. If a reading jumps past both, you get only the 95% one. Nothing is shown at 100%: the limit flow above takes over. Spending caps are left out.
- When the pace would reach the limit soon. From how fast the figure has risen over the last hour (at least two readings 10 minutes apart, both within that hour), Rewake estimates when it would reach 100%. If that is within about 45 minutes and before the window resets, it shows it once per window as a range in 5-minute steps, for example “At this pace you reach the 5-hour limit in about 20 to 40 minutes, before it resets at 3:00 AM today”. It is an estimate, never a precise minute, and nothing is shown while the pace is unknown or not rising.
- Once per window for your Claude Code account: a restart, or another session of the same account (the same config folder), doesn’t repeat a message you have seen.
- The 80% message suggests
/compactif you are in the middle of a task, and says compacting uses some quota too. The 95% message doesn’t suggest it, because compacting is itself a request to the model; it says it is a good moment to wrap up or save what you are doing. Rewake only tells you; it never types, compacts or sends anything for you. - The estimate needs the figure to have moved: waiting without using Claude Code never produces a pace warning.
- It runs only where a person is at the prompt, not in
-por SDK runs without one. - Turn it off or on with
agent-rewake settings usage-warnings off(oron, the default). A change applies from the next Claude Code session, and only when the plugin was installed withagent-rewake install(the setting is read from Rewake’s settings file, which a plugin installed another way can’t find).
Codex gets the same warnings (80%, 95% and the pace, with the same limits and wording style), through the Codex plugin’s existing prompt hook. Differences:
- When you see it: when you send your next prompt, from the figures Codex stored after its previous reply. A warning is therefore one turn late by design, and nothing is shown before your first prompt of a thread. Codex shows it as a warning from Rewake; it is not sent to the model, and nothing is typed or compacted for you.
- Wording: it says “as of Codex’s last reply”. It doesn’t suggest compacting at 80%, because Rewake couldn’t verify Codex’s command for it; at 95% it says it is a good moment to wrap up or save what you are doing.
- Where it has been seen: it is not yet confirmed in the Codex desktop app or the VS Code extension, so it may not appear there. Whether it appears in Codex’s non-interactive runs (
codex exec) is unknown; Rewake can’t tell them apart from the hook’s input. - Once per window for your Codex account (the Codex folder,
CODEX_HOME), across threads and restarts. It is skipped when you send Rewake’s ownrewakecommand. - Turn it off or on with the same
agent-rewake settings usage-warnings off. It takes effect from your next prompt.
The other agents are not covered.
Keep your computer awake
Section titled “Keep your computer awake”Rewake sends a resume or scheduled message only while the computer is awake. The best settings, on every system: let the screen turn off, but don’t let the computer sleep while it’s plugged in; keep the lid open; stay on mains power. Rewake never changes these settings itself. agent-rewake doctor reads them and says if one would let the computer sleep while a resume waits, and the thread says so once too.
Rewake’s own Keep this computer awake setting (macOS, Linux, Windows) is changed in Zed’s Rewake → Settings…, or with agent-rewake settings keep-awake followed by plugged-in, always or never; until you change it, its default applies: kept awake while plugged in.
- Laptop: System Settings → Battery → Options… → turn on Prevent automatic sleeping on power adapter when the display is off. Desktop: System Settings → Energy → turn on Prevent automatic sleeping when the display is off.
- Rewake already keeps a Mac awake while it’s plugged in and a resume is due within six hours (Rewake → Settings… → Keep this computer awake for resumes and scheduled messages), so this matters most on battery, or for messages further ahead.
- Lid: keep it open. A closed MacBook sleeps unless it has power, an external display, and an external keyboard and mouse.
- Check from a terminal:
pmset -g custom, then look atsleepunder AC Power (0means never).
Windows
Section titled “Windows”- Settings → System → Power & battery → Screen, sleep, & hibernate timeouts → Make my device sleep after → When plugged in: Never. Leave the screen timeout as it is. On Windows 10: Settings → System → Power & sleep → Sleep: When plugged in: Never.
- Lid: keep it open, or set Control Panel → Power Options → Choose what closing the lid does → When plugged in: Do nothing (don’t put a running laptop in a bag).
- Rewake can’t hold Windows awake itself yet, so this setting decides. If the setting is greyed out, your organisation manages it: ask your IT team.
- Check from a terminal:
powercfg /query SCHEME_CURRENT SUB_SLEEP STANDBYIDLE(the AC value0x00000000means never).
- GNOME: Settings → Power → Automatic Suspend → turn off When Plugged In.
- KDE Plasma: System Settings → Power Management → On AC Power → Suspend session → When inactive: Do nothing.
- Lid: keep it open. Changing what closing the lid does needs an administrator (systemd-logind’s
HandleLidSwitchExternalPower), or KDE’s When laptop lid closed setting. - Check from a terminal (GNOME):
gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type('nothing'means never).
Privacy and security
Section titled “Privacy and security”The full picture, with what Rewake never does, what each place runs and stores, what install changes and how to undo it, is on its own page: Privacy and security. In short:
- Everything runs on your machine. Rewake never sees your credentials; sign-in goes through the agent’s own flow. Besides fetching an agent’s own program (a download, or
npm install) when Zed hasn’t already done it, its only network use is error reports, which are off unless you turn them on (below). - It sends only what you scheduled, what you approved, or the resume message you turned on. (One fixed line, saying the project changed while it waited, is added only if you choose
noteforworkspace-changed.) - It stores scheduled messages, per-thread settings and metadata-only logs (events, codes and program names, never message text) in its state directory, with owner-only permissions.
doctor --detailsprints where. Plaindoctornames no folders, accounts or keys, so you can paste its output anywhere. - Your message stays off the command line for most agents, with exceptions. Continuing a closed session starts the agent and hands it the message on standard input (Copilot CLI, Gemini CLI, Qwen Code, OpenCode), or in a file with owner-only permissions that is deleted as soon as the run ends (Grok Build). A command-line argument would be readable by every other process on the computer (
ps), and three cases still use one, so the message is visible in the process list while the command runs: Codex (codex queue --message <text>, a few seconds), Antigravity CLI (-p <text>, the whole run, because its CLI has no documented way to take a prompt otherwise) and Gemini CLI or Qwen Code when you’ve turned its sandbox on (they start themselves again with the text as--prompt). Claude Code, Cursor and Zed don’t use a command line for it. - Anything it sends runs with your account and the thread’s permission settings while you may be away. Report vulnerabilities privately: SECURITY.md.
Error reports
Section titled “Error reports”Off by default, and nothing turns it on but you: install doesn’t ask about it. Turn it on or off any time with agent-rewake errors on or agent-rewake errors off; agent-rewake errors status and doctor show whether it’s on.
Sent, when it’s on: the kind of error and a one-line message produced by Rewake’s own code (not yours), a scrubbed stack trace (file names only, no folders), which part of Rewake it happened in, the place it ran (Zed, Claude Code, Codex, …), Rewake’s version, your OS and Node.js version. Example payload (the tags.place and timestamp vary):
{ "event_id": "9f1c2b3a4d5e6f708192a3b4c5d6e7f8", "timestamp": "2026-10-08T12:00:00.000Z", "level": "error", "platform": "node", "release": "agent-rewake@0.3.0", "environment": "production", "message": { "formatted": "sweep.arm_failed" }, "tags": { "place": "sweep", "os": "darwin", "os_version": "24.6.0", "node_version": "v22.14.0" }, "exception": { "values": [ { "type": "Error", "value": "armTimer failed during sweep: no-scheduler", "stacktrace": { "frames": [{ "filename": "sweep.js", "function": "sweep", "lineno": 64 }] } } ] }, "user": { "ip_address": null }}Never sent: your messages or prompts, agent output, file contents, environment variables, tokens or keys, session or thread ids, usernames, hostnames, or full file paths (the home folder is shown as ~, and anything outside it is dropped). At most 20 events are sent per day per install, with duplicates within a day skipped.
A local, owner-only record of every error (whether or not reporting is on) is kept in Rewake’s state directory, bounded to the last 200, so doctor can show what happened even with reporting off. Turn it on or off: AGENT_REWAKE_ERROR_REPORTS=0 and DO_NOT_TRACK=1 always force it off, as does running in CI.
Troubleshooting
Section titled “Troubleshooting”Start with agent-rewake doctor. It checks Zed (installed, version, AI features on), your agents and which have Rewake, whether Zed has started it, the version and Node.js Zed uses, settings that override Rewake’s, sign-in, your scheduled messages and recent start failures, and gives the fix for each. It works offline and prints no folders, accounts or keys (--details adds versions and folders for bug reports). In Zed, dev: open acp logs shows the agent connection. Then open an issue.
For a bug report, run agent-rewake doctor --report. It writes one text file in Rewake’s own folder and prints where it is, with the issue link to open yourself. The file has doctor’s findings, versions, the warnings and errors from the last 14 days, the timers Rewake has set against the resumes it has on file, the state of each agent’s sessions and what Rewake decided the last times a timer fired. Your home folder is shown as ~, session ids are replaced by short hashes, and message text, thread titles and folder names are left out. Rewake sends nothing, checks nothing online and doesn’t open a browser: read the file, then attach it to the issue if you want to. agent-rewake history shows in plain words what happened to your messages and resumes lately.
- Installed, but nothing happens (
doctorsays “Not used yet”): Zed starts Rewake only when you open or start a thread with a Rewake agent in the Agent Panel; restarting Zed isn’t enough. If you chat with Claude in the Claude desktop app, claude.ai or a terminal, Rewake can’t reach it there: see Is it for you?. To remove it:agent-rewake uninstall. - No Rewake menu, or
/rewakegoes to the agent: quit Zed completely and reopen it afterinstall. Check thatinstalllisted the agent you use. For agents without their own toolbar options, type/rewake: it opens the same forms. - Will it send while Zed is closed? No: Rewake runs inside Zed. After a restart, open the thread once. Late messages ask before sending.
- The resume form didn’t appear: it appears only for limits that a wait fixes. Use Rewake → Resume after the usage limit… or
/rewake. - The thread stopped responding after a limit: a known Zed issue (#55501). Rewake reconnects a thread whose session the agent lost; without Rewake, reload the agent in Zed.
- “Another Zed window owns this thread”: the thread is open in two windows; only one sends.
- “Rewake hit a problem and switched itself off for now”: something went wrong inside Rewake. Your agent isn’t affected: Rewake passes everything through untouched and keeps your scheduled messages, but sends none until you restart Zed. If it happens again, open an issue with what
agent-rewake doctor --detailsshows. - “…because the project folder is gone (moved, renamed or deleted)”: the folder the session was started in no longer exists. Open the session from its new folder to continue. This applies to Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode and Antigravity CLI sessions.
- Behind a proxy: Rewake downloads an agent itself only when Zed has no copy of it at all. An agent that runs through npm is installed with npm, started with your environment, so npm uses your
HTTPS_PROXY,HTTP_PROXYandNO_PROXYand your own npm settings. An agent that is a downloaded program is fetched by Rewake itself, which uses the same variables on Node.js 24.14 or newer; on Node.js 22.21 or newer, start Zed withNODE_USE_ENV_PROXY=1set. If the download fails, Rewake says it couldn’t download the agent (and whether a proxy was involved): open that agent once in Zed without Rewake (agent-rewake uninstall), so Zed downloads it, then reopen the thread. Tried against a local proxy on Node.js 24.14; not tried behind a company proxy or on a managed computer.
Report a limit Rewake missed
Section titled “Report a limit Rewake missed”If an agent hit a usage limit and Rewake didn’t offer to resume, or resumed at the wrong time, open a bug report with:
- the agent and its version, and where you use it (terminal, VS Code, Cursor, Zed, JetBrains);
- the exact limit message, as the agent printed it, with anything private removed;
- what you expected, and what happened;
- the output of
agent-rewake doctor --details(run it withnpx @codizelabs/agent-rewake doctor --details). It shows versions and folders, with your home folder as~, and no keys.
The exact message is what shows whether Rewake could recognise the limit. Please don’t paste conversation content or credentials.
Update
Section titled “Update”The same two steps for every version, from any earlier one:
-
Run the install command again, with
@latest:Terminal window npx @codizelabs/agent-rewake@latest installIt shows which agents it updates, and from which version to which, and asks first.
-
Restart the agent. Zed keeps an agent it already started on the old version until its connection is restarted. In Zed 1.18 or newer, open the Agent Panel’s menu (top right) and choose Reload Agent: Zed should start a fresh copy and reopen that thread’s session. Do it in each open thread you want on the new version: a thread you don’t reload keeps running on the old one until you do, or until you quit Zed. If you don’t see Reload Agent, or something looks wrong afterwards, quit Zed completely and open it again (⌘Q on macOS, Ctrl+Q on Linux; on Windows, close every Zed window), which always works.
Your threads, scheduled messages, automatic-resume choices and settings stay as they are: they live in Rewake’s own folder, which an update doesn’t touch. If you quit Zed to restart, a message due while it is closed is sent when you reopen its thread, or, if it’s more than 15 minutes late, Rewake asks first (a repeating message skips to its next run).
Check it with npx @codizelabs/agent-rewake@latest doctor. It says if Zed still starts an older version, and what to do. doctor also says how long ago the installed version was installed and how to update, from a note Rewake keeps in its own folder when you run install: it never looks online for a newer version.
To see which version a thread runs, hover over the Rewake menu. Picking Rewake in it (About) and Settings… show it too, and so does the schedules page, in its title line or its help (press ?). In a terminal, agent-rewake --version prints it.
- Why run install again: on macOS and Linux, Zed starts the copy of Rewake in Rewake’s own folder (
bin/agent-rewake.mjs) for every agent except Claude Agent, andinstallis what replaces it with the new version, so Zed keeps the version you have until you run it. An older Rewake never replaces a newer copy. On Windows,installwrites the exact version into Zed’s settings. Either way, updates never happen behind your back. - Why
@latest:npx @codizelabs/agent-rewake installwithout it may run a copy npx saved earlier. - Installed with
npm install -g: runnpm install -g @codizelabs/agent-rewake@latest, thenagent-rewake install, then reload the agent in each open thread (or restart Zed). - After you upgrade or move Node.js: nothing to do on macOS and Linux: Rewake finds the new one. On Windows, run the install command again so Zed’s settings point at it.
doctortells you when that’s needed. - Going back to an earlier version: run that version’s install, for example
npx @codizelabs/agent-rewake@0.1.1 install, and reload the agent (or restart Zed). Zed’s entries then start that version the way it did. The copy in Rewake’s folder, which hooks and timers use, only moves forward.
Version-specific steps
Section titled “Version-specific steps”Every version updates with the two steps above. If a release ever needs anything more (a newer Node.js or Zed, a setting renamed, stored messages in a new format), it’s listed here and under Upgrade notes for that version in the changelog, and doctor checks for it where it can.
| From | To | Extra steps |
|---|---|---|
| 0.1.x | 0.2.0 or later | None to update. In a thread, type /rewake where you typed /schedule, and /rewake stop for /stop (/schedule rm N is now /rewake cancel N); Zed refuses the old names as unknown commands. In Claude Code, /rewake-schedule, /rewake-cancel and /rewake-ask are now /rewake, /rewake cancel and /rewake auto off |
| Any earlier version | Any later version | None |
Uninstall
Section titled “Uninstall”agent-rewake uninstall takes Rewake out of every place it’s set up in (Zed, your agents’ hooks and plugins, the login item), after showing you every change and asking once. To keep some places, name the others with --only, or leave some out with --skip. Then delete Rewake’s folder, which agent-rewake doctor --details shows. Pending messages aren’t sent after removal.
Status
Section titled “Status”Version 0.6. Rewake’s automated tests run on macOS, Linux and Windows with Node.js 22 and 24, and the author uses it daily in Zed. The previews outside Zed are new: what’s been tried for each. Changes: the changelog. The site aims for WCAG 2.2 AA; Zed’s agent panel itself has limited screen-reader support. Report barriers as issues.
Reference
Section titled “Reference”Commands in a thread
Everything here is also in the Rewake menu.
| Command | What it does |
|---|---|
/rewake |
At a usage limit, the resume question; otherwise the “Schedule a message” form |
/rewake <when> <message> |
Schedule a message. When: 09:00, 9pm, at 6pm, tomorrow 09:00, in 90m, a date and time such as YYYY-MM-DD 09:00 (local time, up to 30 days ahead) |
/rewake <when>, /rewake continue |
Resume after the current usage limit, at that time or at the reset |
/rewake every hour|day|weekday|week|monday… [HH:MM] <message> |
Repeat a message |
/rewake cron <expression> <message> |
Repeat on a cron expression, e.g. "0 9 * * 1-5" |
/rewake list |
This thread’s scheduled messages |
/rewake cancel |
Cancel the resume after the usage limit |
/rewake cancel N, /rewake cancel all |
Delete message N, or every message in this thread |
/rewake now N, /rewake pause N, /rewake resume N |
Send now, pause, or resume a paused message |
/rewake move N <when>, /rewake edit N <text> |
Change the time or the text |
/rewake auto on, /rewake auto off |
Automatic resume for this thread |
/rewake prompt <text> |
Set this thread’s resume message |
/rewake page |
Open an overview of every scheduled message |
/rewake stop |
Stop a scheduled reply that is running |
/rewake help |
What /rewake does here |
Command line
| Command | What it does |
|---|---|
agent-rewake install [--yes] [--keybinding] [--dry-run] [--agent <id>]… |
Add Rewake to your Zed agents (shows the changes and asks first) |
agent-rewake uninstall [--yes] [--dry-run] |
Take Rewake out of every place it’s set up in |
agent-rewake install (in a terminal) |
Shows what’s on your computer and lets you tick the places to set up; then shows every change and asks once |
agent-rewake install --only <place>, --all, --skip <place>; the same for uninstall |
Choose places by name: zed, claude-code, codex, copilot-cli, grok, gemini-cli, qwen-code, opencode, antigravity, jetbrains, devin-desktop, cursor. With --yes and no place named, install sets up Zed and uninstall removes every place |
agent-rewake continue [--always | --ask | --cancel [<id>] | --now [<id>] [--yes]] |
Continue a closed Copilot CLI, Grok, Gemini CLI, Qwen Code, OpenCode or Antigravity CLI session after its usage limit, or a stopped Cursor chat. --always does it from now on, --ask asks again, --cancel cancels the planned resume (with several, in a terminal, it lists them to pick one or all; otherwise all), and --cancel <id> only the one with that id (the eight characters in square brackets in schedules; a Codex resume too). One that is already running isn’t cancelled, and Rewake says so. --now [<id>] continues a planned resume outside Zed now, without waiting for the reset (see “Resume now” below); --yes skips its question |
agent-rewake settings [<name> [<value>]], agent-rewake settings change, agent-rewake settings --reset <name> |
See Rewake’s settings, with their values and what each does, and change one (see Settings). settings change lets you pick one by its number |
agent-rewake doctor [--details] [--json] [--report] |
Whether Rewake can work in your Zed, and what to do next, each finding as Problem:, To do:, Note: or OK:. --details adds versions and folders for bug reports; --json prints the findings as JSON for scripts; --report writes one text file for a bug report (see Troubleshooting). It also says how long ago this version was installed and how to update |
agent-rewake ui [--inline] [--thread <id>] |
The schedules page for every thread. For a screen reader or plain text, use schedules |
agent-rewake schedules [--all] [--json] |
List scheduled messages as plain text, with each one’s agent; resumes of agents outside Zed are marked [outside Zed] and called what their agent calls them (session, thread or chat). --all includes finished ones, newest first, with the year and what happened to each |
agent-rewake schedules --explain <id> |
Say in plain words what Rewake will do for one scheduled message or resume (<id> is the eight characters in square brackets in the list), and what could stop it. Sends nothing and changes nothing |
agent-rewake history [--days <n>] |
What Rewake did in the last days (7 by default), newest first: the agent and folder, and what happened and why (sent, cancelled because you typed, too late, still limited, failed and the reason) |
agent-rewake setup zed |
Print the Zed entries, to add by hand |
agent-rewake completion <bash|zsh|fish> |
Print a script that completes Rewake’s commands and options in your shell. Nothing is installed for you: source <(agent-rewake completion bash) in ~/.bashrc, the same with zsh in ~/.zshrc, or agent-rewake completion fish > ~/.config/fish/completions/agent-rewake.fish |
agent-rewake errors on|off|status |
Turn error reports to the maintainer on or off (opt-in, off by default), or see the current state (see Error reports) |
agent-rewake help [<command>], agent-rewake <command> --help |
The commands you run, or one command’s options. agent-rewake --help --all also lists the ones Rewake runs itself |
agent-rewake --version, --help |
|
agent-rewake --wrap-registry <id>, --wrap-command <json>, -- <cmd>, mcp, hook <agent> <event>, fire <id>, wait, sweep |
Started by Zed, an agent, a timer or the login item, not by you |
Scheduled-message states
| State | Meaning |
|---|---|
| Scheduled | Waiting for its time |
| Paused | Kept, not sent until resumed |
| Queued | Due, waiting for the agent’s current reply |
| Sending | Sent; reply in progress |
| Sent | The agent replied |
| Failed | The agent returned an error |
| Missed | Due while Zed or the computer wasn’t running |
| Stopped | Stopped with /rewake stop |
| Cancelled | Cancelled, for example because you continued by hand |
| Needs you | Waiting for you to confirm, for example a reset more than a day away |
| Waiting for limit | Reserved; a resume waiting for its reset shows as Scheduled |
Environment variables
| Variable | Effect |
|---|---|
AGENT_REWAKE_STATE_DIR |
Where schedules and settings are stored (default: macOS ~/Library/Application Support/agent-rewake, Linux ~/.local/state/agent-rewake, Windows %LOCALAPPDATA%\agent-rewake) |
AGENT_REWAKE_ZED_CONFIG_DIR |
Which Zed settings install edits (default: where Zed keeps them, including a Flatpak Zed’s) |
AGENT_REWAKE_ZED_DATA_DIR |
Where Zed keeps its registry cache and installed agents |
AGENT_REWAKE_ALLOW_AUTO=0 |
Turns off automatic resume in Zed threads. It has no effect outside Zed |
AGENT_REWAKE_AGENT_TOOLS=0 |
Don’t give the agent Rewake’s tools |
AGENT_REWAKE_KEEP_API_KEY=1 |
Pass ANTHROPIC_API_KEY to the Claude adapter instead of blanking it |
AGENT_REWAKE_TITLE_MARKERS=1 |
Add markers such as Scheduled 09:00 · to thread titles |
AGENT_REWAKE_PLATFORM |
Which build of a binary agent to run (testing) |
AGENT_REWAKE_LINK |
Internal: links the agent’s tool server to its thread |
AGENT_REWAKE_OWNER |
Internal: set by Rewake on the agents it runs in Zed, so they’re never resumed twice |
AGENT_REWAKE_TEST_TIMING |
Internal, for Rewake’s own tests: shorter waits (margin=0,jitter=0,heartbeat=1000), only together with AGENT_REWAKE_STATE_DIR; doctor says when it’s set |
AGENT_REWAKE_TEST_ALLOW_HTTP |
Internal, for Rewake’s own tests: lets a test serve a fake agent download over plain http. Real downloads must be https |
AGENT_REWAKE_TEST_NO_OS_TIMERS |
Internal, for Rewake’s own tests: Rewake does not create launchd, systemd, at or Task Scheduler jobs and does not start its waiter, so a test can’t leave one behind |
AGENT_REWAKE_FIRE |
Internal: set by Rewake on an agent it starts to continue a session, so that run isn’t taken for you typing |
AGENT_REWAKE_ERROR_REPORTS=0 |
Force error reports off, overriding the setting (see Error reports) |
AGENT_REWAKE_SENTRY_DSN |
Internal: a different Sentry DSN for error reports (testing); the owner’s own DSN is the default |