@codizelabs/agent-rewake 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Auto-resume your AI coding agent when its usage limit resets.** Same session, same context, same thread.
8
8
 
9
- Works where you already use your agent: Claude Code in a terminal or in its VS Code and Cursor panel, Codex, GitHub Copilot CLI, Gemini CLI, Grok Build and Antigravity CLI in a terminal, and every external agent in [Zed](https://zed.dev). Everything outside Zed is a preview.
9
+ Works where you already use your agent: Claude Code in a terminal or in its VS Code and Cursor panel, Cursor's own agent, Codex, GitHub Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode and Antigravity CLI in a terminal, and every external agent in [Zed](https://zed.dev). Everything outside Zed is a preview.
10
10
 
11
11
  [![npm](https://img.shields.io/npm/v/@codizelabs/agent-rewake?color=f4a949&label=npm)](https://www.npmjs.com/package/@codizelabs/agent-rewake)
12
12
  [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
@@ -33,10 +33,10 @@ Coding agents stop at their usage limit: Claude's 5-hour session limit, Codex's
33
33
 
34
34
  <img src="site/public/images/rewake-demo.gif" alt="A Zed agent thread: the agent stops at its usage limit, Rewake asks whether to resume, and at 5:01 PM the thread continues on its own" width="100%">
35
35
 
36
- - **Resumes after a usage limit.** When the agent stops, Rewake asks once whether to continue (or does it on its own, if you turned that on). At the reset, plus a minute, it sends a message that resumes the same session, and the agent carries on. If the agent is still limited, Rewake waits for the new reset time.
37
- - **Automatic, if you want.** Choose *from now on* when Rewake asks (Claude Code), turn on auto-resume in Zed's **Rewake** menu, or run `agent-rewake continue --always` (Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI), and Rewake resumes without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits (and says so), and never approves permission prompts for you.
36
+ - **Resumes after a usage limit.** When the agent stops, Rewake asks once whether to continue (or does it on its own, if you turned that on). At the reset, plus a minute, it sends a message that resumes the same session, and the agent carries on. If the agent is still limited, Rewake waits for the new reset time (outside Zed it tries again up to four times, then tells you).
37
+ - **Automatic, if you want.** Choose *from now on* when Rewake asks (Claude Code), turn on auto-resume in Zed's **Rewake** menu, or run `agent-rewake continue --always` (Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode, Antigravity CLI), and Rewake resumes without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits (and says so), and never approves permission prompts for you.
38
38
  - **Sends messages later.** `/rewake in 1h Run the tests` schedules a message into the session (Zed and Claude Code; in Zed also on a repeat, such as every weekday at 9).
39
- - **Keeps the computer awake, if it can.** On macOS, while a resume is due within six hours, Rewake stops the computer from idling to sleep (while plugged in, by default). Closing the lid still puts it to sleep. `agent-rewake doctor` tells you if your computer's own sleep settings would let it sleep, and [which settings to change](https://codizelabs.github.io/agent-rewake/docs/#keep-your-computer-awake).
39
+ - **Keeps the computer awake, if it can.** On macOS, and on Linux (with systemd) and Windows, while a resume is due within six hours, Rewake stops the computer from idling to sleep (while plugged in, by default). Only macOS has been tried by hand. Closing the lid still puts it to sleep. `agent-rewake doctor` tells you if your computer's own sleep settings would let it sleep, and [which settings to change](https://codizelabs.github.io/agent-rewake/docs/#keep-your-computer-awake).
40
40
  - **Same agent, same session.** No new agent to pick: Rewake works inside or in front of the agents you already use, so your sessions and threads keep going where they stopped.
41
41
 
42
42
  ## Where you work
@@ -45,19 +45,21 @@ Install once with `npx @codizelabs/agent-rewake install`: it finds what's on you
45
45
 
46
46
  | Where | Agents | What Rewake does there | Status |
47
47
  |---|---|---|---|
48
- | **A terminal** | Claude Code | Asks once at the limit, then continues the same session. `/rewake` sends messages later | Preview, tried on a Mac |
48
+ | **A terminal** | Claude Code | Asks once at the limit, then continues the same session. `/rewake` sends messages later. If you close it at the limit first, `agent-rewake continue` continues the closed session (macOS, Linux) | Preview, tried on a Mac; the closed-session part isn't tried against a real limit |
49
49
  | | Codex | Type `rewake` at the limit; the thread continues after the reset | Preview, limit not tried by hand yet |
50
- | | GitHub Copilot CLI, Gemini CLI, Grok Build | Continues a closed session after the reset (`agent-rewake continue`, or on its own) | Preview, tried on a Mac |
51
- | | Antigravity CLI | The same | Preview, not tried yet |
50
+ | | Gemini CLI, Grok Build | Type `/rewake` at the limit; the session continues once closed (or `agent-rewake continue`) | Preview, tried on a Mac |
51
+ | | GitHub Copilot CLI | Continues a closed session after the reset (`agent-rewake continue`, or on its own) | Preview, tried on a Mac |
52
+ | | Antigravity CLI, OpenCode | The same | Preview, not tried yet |
53
+ | | Qwen Code | Type `/rewake` at the limit; the session continues once closed | Preview, not tried yet |
52
54
  | **VS Code, Cursor** | Claude Code's panel | The same as in a terminal: the same plugin loads there | Preview, tried on a Mac |
53
55
  | | Codex's extension | Rewake's hooks show up there, waiting to be trusted; the rest isn't tried yet | Not tried yet |
54
- | | Cursor's own agent | At a usage limit, continues the chat at the time you choose (within 4 hours), while its window stays open | Preview, limit not tried yet |
56
+ | | Cursor's own agent | Type `/rewake` at a usage limit to continue the chat at the time you choose (within 4 hours), while its window stays open | Preview, limit not tried yet |
55
57
  | **Zed** | Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose and every other external agent | Resumes the thread at the reset; a **Rewake** menu, scheduled and repeating messages, a schedules page | In daily use |
56
58
  | **JetBrains IDEs, Devin Desktop** | Claude Agent, Codex (picked in AI Assistant or the agent selector) | Resumes after a limit while the IDE stays open, through the same add-on as in Zed | Preview, not tried yet |
57
59
 
58
- Not supported yet: GitHub Copilot's own chat in VS Code, and the Claude desktop app's Code tab (not tried yet). Out of reach: claude.ai, the Claude desktop app's chat and Zed's own built-in agent, which let no add-on in.
60
+ 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. Out of reach: claude.ai, the Claude desktop app's chat and Zed's own built-in agent, which let no add-on in.
59
61
 
60
- Guides for each: [Claude Code](https://codizelabs.github.io/agent-rewake/docs/#claude-code) · [Codex](https://codizelabs.github.io/agent-rewake/docs/#codex) · [Copilot CLI](https://codizelabs.github.io/agent-rewake/docs/#github-copilot-cli) · [Gemini CLI](https://codizelabs.github.io/agent-rewake/docs/#gemini-cli) · [Grok Build](https://codizelabs.github.io/agent-rewake/docs/#grok-build) · [Antigravity CLI](https://codizelabs.github.io/agent-rewake/docs/#antigravity-cli) · [Cursor](https://codizelabs.github.io/agent-rewake/docs/#cursor) · [Zed](https://codizelabs.github.io/agent-rewake/docs/#zed)
62
+ Guides for each: [Claude Code](https://codizelabs.github.io/agent-rewake/docs/#claude-code) · [Codex](https://codizelabs.github.io/agent-rewake/docs/#codex) · [Copilot CLI](https://codizelabs.github.io/agent-rewake/docs/#github-copilot-cli) · [Gemini CLI](https://codizelabs.github.io/agent-rewake/docs/#gemini-cli) · [Grok Build](https://codizelabs.github.io/agent-rewake/docs/#grok-build) · [Qwen Code](https://codizelabs.github.io/agent-rewake/docs/#qwen-code) · [OpenCode](https://codizelabs.github.io/agent-rewake/docs/#opencode) · [Antigravity CLI](https://codizelabs.github.io/agent-rewake/docs/#antigravity-cli) · [Cursor](https://codizelabs.github.io/agent-rewake/docs/#cursor) · [Zed](https://codizelabs.github.io/agent-rewake/docs/#zed)
61
63
 
62
64
  ## Quick start
63
65
 
@@ -69,7 +71,7 @@ npx @codizelabs/agent-rewake install
69
71
 
70
72
  - **Claude Code** (terminal, VS Code, Cursor): start a new session.
71
73
  - **Codex**: open it once and trust Rewake's hooks when it says "Hooks need review".
72
- - **Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI**: start a new session.
74
+ - **Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode, Antigravity CLI**: start a new session.
73
75
  - **Zed, JetBrains, Devin Desktop**: restart the app (below for Zed).
74
76
 
75
77
  **In Zed,** `install` lists the agents it will add Rewake to. Each settings file is backed up first, and your 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. A **Rewake** menu now sits under the message box, next to the model picker.
@@ -82,6 +84,8 @@ Check the setup at any time. `doctor` looks at every place you set up (Zed and i
82
84
  npx @codizelabs/agent-rewake doctor
83
85
  ```
84
86
 
87
+ `doctor --json` prints the same findings for scripts, and `doctor --report` writes one redacted text file for a bug report (your home folder as `~`, session ids hashed, no message text; nothing is sent). `agent-rewake history` says what happened to your messages and resumes lately, `agent-rewake <command> --help` shows a command's options, and `agent-rewake completion <bash|zsh|fish>` prints a shell completion script. `doctor` also says how long ago this version was installed and how to update, without going online.
88
+
85
89
  ### Updating
86
90
 
87
91
  From any version: run `npx @codizelabs/agent-rewake@latest install`. Previews use the new version from their next session; in Zed, quit Zed completely and open it again. Your sessions, scheduled messages and settings stay. Details, and any version-specific steps (none so far), are in the [docs](https://codizelabs.github.io/agent-rewake/docs/#update). To see which version you run: `agent-rewake --version` (in Zed also the **Rewake** menu).
@@ -97,39 +101,43 @@ From any version: run `npx @codizelabs/agent-rewake@latest install`. Previews us
97
101
 
98
102
  Rewake joins each agent the way that agent allows, and always continues the same session:
99
103
 
100
- - **Inside the agent**: a plugin in Claude Code's own session (terminal, VS Code, Cursor). It sees the limit, asks, and sends the resume message itself, while Claude Code stays open.
101
- - **Through the agent's hooks**: Codex, Copilot CLI, Gemini CLI, Grok Build and Antigravity CLI tell Rewake about the limit (and you say when, with `rewake`, `/rewake` or `agent-rewake continue`, unless Rewake does it on its own); at the reset your system's own timer runs Rewake once, and it continues the closed session with the agent's own resume command (Codex: its own message queue).
102
- - **In front of the agent**: in Zed, JetBrains and Devin Desktop, the editor talks to agents over the [Agent Client Protocol](https://agentclientprotocol.com). Rewake sits on that connection, passes everything through unchanged, adds its menu and forms (in Zed), and sends messages into the same thread at the right time.
104
+ - **Inside the agent**: a plugin in Claude Code's own session (terminal, VS Code, Cursor). It sees the limit, asks, and sends the resume message itself, while Claude Code stays open. If Claude Code is closed first, Rewake continues the session the way it does for the agents below, with `claude --resume`.
105
+ - **Through the agent's hooks**: Codex, Copilot CLI, Gemini CLI, Grok Build, Qwen Code, OpenCode (through a small plugin) and Antigravity CLI tell Rewake about the limit (and you say when, with `rewake`, `/rewake` or `agent-rewake continue`, unless Rewake does it on its own); at the reset your system's own timer runs Rewake once, and it continues the closed session with the agent's own resume command (Codex: its own message queue).
106
+ - **In front of the agent**: in Zed, JetBrains and Devin Desktop, the editor talks to agents over the [Agent Client Protocol](https://agentclientprotocol.com). Rewake sits on that connection and passes your messages and the agent's replies through. It adds its own menu and forms (in Zed), and sends messages into the same thread at the right time. For Claude Agent it runs its own pinned copy of the Claude adapter.
103
107
 
104
108
  Everything runs on your computer; nothing runs in the cloud.
105
109
 
106
110
  ## Use it
107
111
 
108
- In Zed, the **Rewake** menu under the message box does everything; elsewhere, type `/rewake` in the session (in Codex, `rewake` without the slash), or run `agent-rewake continue` in a terminal for a closed session.
112
+ In Zed, the **Rewake** menu under the message box does everything; elsewhere, type `/rewake` in the session (in Codex, `rewake` without the slash). GitHub Copilot CLI and Antigravity CLI have no typed command: run `agent-rewake continue` in a terminal for a closed session there.
109
113
 
110
114
  | To… | In Zed | Elsewhere |
111
115
  |---|---|---|
112
- | Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | Answer Rewake's question, or type `/rewake` (or `/rewake 3:30pm`); for a closed session, `agent-rewake continue` |
116
+ | Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | Answer Rewake's question, or type `/rewake` (or `/rewake 3:30pm`); for a closed session without a typed command (Copilot CLI, Antigravity CLI), `agent-rewake continue` |
113
117
  | Resume automatically | **Rewake → Turn on auto-resume after limits…** | Choose "from now on" in Rewake's question, `/rewake auto on` (Claude Code only), or `agent-rewake continue --always` (every agent outside Zed, Claude Code included) |
114
118
  | Schedule a message | **Rewake → Schedule a message…** | `/rewake in 3h Run the tests` (Claude Code) |
115
119
  | Repeat a message | **Custom time…** in the schedule form, or `/rewake every weekday 09:00 Check the build` | Not yet |
116
- | See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/rewake list`, `/rewake cancel N` (Claude Code, Gemini CLI; in Codex without the slash) |
117
- | See what's planned | The Zed task **Agent Rewake: schedules** | `/rewake list` in the session; `agent-rewake doctor` shows the next planned resume of a closed session |
120
+ | See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/rewake list` and `/rewake cancel` (Claude Code, Gemini CLI, Grok Build, Qwen Code, Cursor; in Codex without the slash). `/rewake cancel N` deletes one message: Claude Code only |
121
+ | See what's planned | The Zed task **Agent Rewake: schedules** | `/rewake list` in the session; `agent-rewake schedules` lists every one, marking the resumes outside Zed; `agent-rewake doctor` shows the next planned resume of a closed session |
122
+ | Cancel a planned resume | **Rewake → Change a scheduled message…**, or the schedules page | `/rewake cancel` in the session where it's typed, or `agent-rewake continue --cancel` to pick one or all; `agent-rewake continue --cancel <id>` cancels one by the id in square brackets in `agent-rewake schedules` |
123
+ | Change settings | **Rewake → Settings…** | `agent-rewake settings` lists them with what each does; `agent-rewake settings change` lets you pick one, or `agent-rewake settings <name> <value>` changes it (for example `agent-rewake settings clock 24h`) |
118
124
 
119
- **One command everywhere:** `/rewake` is the same in Zed, Claude Code and Gemini CLI (in Codex, type `rewake` without the slash). At a usage limit it continues after the reset; `/rewake <time>` continues then, `/rewake cancel` cancels it, and `/rewake help` lists what else works where you are. Rewake answers it itself, without using the model.
125
+ **One command everywhere:** `/rewake` is the same in Zed, Claude Code, Gemini CLI, Grok Build, Qwen Code and Cursor's own agent (in Codex, type `rewake` without the slash). At a usage limit it continues after the reset; `/rewake <time>` continues then, `/rewake cancel` cancels it, and `/rewake help` lists what else works where you are. Rewake answers it itself, without using the model. `npx`/`agent-rewake` on the command line is only for installing, uninstalling and the two agents with no typed command (GitHub Copilot CLI, Antigravity CLI).
120
126
 
121
127
  Full guide: **[codizelabs.github.io/agent-rewake/docs](https://codizelabs.github.io/agent-rewake/docs/)**.
122
128
 
123
129
  ## Agents in Zed
124
130
 
125
- In Zed, Rewake works the same way in front of every external agent: **Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose** and the rest, npm-based or binary, plus custom agents. Rewake knows how each of them 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, in any of the formats agents use, Rewake resumes at that time; otherwise it lets you pick when.
131
+ In Zed, Rewake works the same way in front of every external agent: **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, in any of the formats agents use, Rewake resumes at that time; otherwise it lets you pick 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.
126
132
 
127
133
  ## Privacy
128
134
 
129
- - Runs locally. Rewake makes no network calls of its own and never sees your credentials: sign-in goes through each agent's own flow.
135
+ The whole picture, with what Rewake never does and how to undo it, is on the [privacy and security page](https://codizelabs.github.io/agent-rewake/docs/privacy-and-security/). In short:
136
+
137
+ - Runs locally. Rewake never sees your credentials: sign-in goes through each 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 (`agent-rewake errors on`; see the docs' [Error reports](https://codizelabs.github.io/agent-rewake/docs/#error-reports)).
130
138
  - Sends only what you scheduled, approved, or turned on.
131
- - Stores scheduled messages and per-thread settings in a private folder on your machine; logs hold metadata only, never message content.
132
- - Keeps your message off the command line. When Rewake continues a closed session, it hands the message to the agent on its standard input, or in a file only you can read — never as a command-line argument, which anything else on the computer could read from the process list. The one exception is the Antigravity CLI preview, which has no way to take it otherwise.
139
+ - Stores scheduled messages and per-thread settings in a private folder on your machine; logs hold metadata only (events, codes and program names), never message text.
140
+ - Keeps your message off the command line, with exceptions. When Rewake continues a closed Copilot CLI, Gemini CLI, Qwen Code or OpenCode session, it hands the message to the agent on its standard input; for Grok Build, in a file only you can read. Three cases put it on a command line, where another program on your computer can read it from the process list for as long as the command runs: **Codex** (`codex queue --message <text>`), **Antigravity CLI** (`-p <text>`), and **Gemini CLI** or **Qwen Code** when you've turned its sandbox on (they then start themselves again with the text as an argument; for Qwen Code that is read from its source, not tried). Claude Code, Cursor and Zed don't use a command line for it.
133
141
 
134
142
  ## Uninstall
135
143
 
@@ -137,11 +145,11 @@ In Zed, Rewake works the same way in front of every external agent: **Claude Age
137
145
  npx @codizelabs/agent-rewake uninstall
138
146
  ```
139
147
 
140
- This takes Rewake out of every place it's set up in, after showing every change and asking once. `doctor` shows the folder where Rewake keeps its data, if you want to delete that too.
148
+ This takes Rewake out of every place it's set up in, after showing every change and asking once. `doctor --details` shows the folder where Rewake keeps its data, if you want to delete that too.
141
149
 
142
150
  ## Status
143
151
 
144
- Version 0.3. 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: the docs say [what's been tried for each](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews), and what hasn't. Feedback and bug reports are very welcome: [open an issue](https://github.com/codizelabs/agent-rewake/issues/new/choose).
152
+ Version 0.4. 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: the docs say [what's been tried for each](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews), and what hasn't. What changed in each release is in the [changelog](https://codizelabs.github.io/agent-rewake/changelog/). Feedback and bug reports are very welcome: [open an issue](https://github.com/codizelabs/agent-rewake/issues/new/choose). If Rewake missed a usage limit, [say how](https://codizelabs.github.io/agent-rewake/docs/#report-a-limit-rewake-missed).
145
153
 
146
154
  ## Contributing
147
155