@codizelabs/agent-rewake 0.2.0 → 0.3.1

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 with Claude, Codex, Gemini CLI and every other external agent in [Zed](https://zed.dev), in the threads you already have, with previews for Claude Code, Codex, GitHub Copilot CLI, Grok Build, Gemini CLI and Antigravity CLI outside Zed.
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.
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,45 +33,31 @@ 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, the thread asks once whether to resume, with your resume message ready to edit. At the reset (plus a minute), Rewake sends it and the agent carries on. If the agent is still limited, Rewake waits for the new reset time.
37
- - **Automatic, if you want.** Turn it on for a thread, or for every new thread, and Rewake schedules the resume without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits (and says so in the thread), and never approves permission prompts for you.
38
- - **Keeps the computer awake, if it can.** On macOS, while a resume or scheduled message is due within six hours, Rewake stops the computer from idling to sleep (while plugged in, by default) and says so. Closing the lid still puts it to sleep. On every system, `agent-rewake doctor` and the thread tell you if your computer's own sleep settings would let it sleep while a resume waits, and [which settings to change](https://codizelabs.github.io/agent-rewake/docs/#keep-your-computer-awake).
39
- - **Queues the next steps.** Add follow-up messages that go one after another once the work resumes.
40
- - **Also: send messages later.** Schedule a message into a thread for a time, or on a repeat (every weekday at 9, or any cron schedule, read back in plain words before it's saved). Your agent can propose follow-ups too; nothing is scheduled until you approve it.
41
- - **One place for everything.** A **Rewake** menu under the message box, and a schedules page for every thread and agent.
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.
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).
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.
42
41
 
43
- No new agent to pick: Rewake sits in front of the agents you already use, under their own names, so your existing threads keep working.
42
+ ## Where you work
44
43
 
45
- ## Auto-resume for each agent
44
+ Install once with `npx @codizelabs/agent-rewake install`: it finds what's on your computer and lets you pick. Everything outside Zed is a preview: new, installed one place at a time, and it may change. Most previews have been tried on a Mac with a simulated usage limit; none has hit a real one yet ([what's been tried](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews)).
46
45
 
47
- Find your agent below. Outside Zed, each preview is installed on its own and may change; details are in the [docs](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews).
46
+ | Where | Agents | What Rewake does there | Status |
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 |
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 |
52
+ | **VS Code, Cursor** | Claude Code's panel | The same as in a terminal: the same plugin loads there | Preview, tried on a Mac |
53
+ | | 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 |
55
+ | **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
+ | **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 |
48
57
 
49
- ### Auto-resume any agent in Zed
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.
50
59
 
51
- Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose and every other external agent in Zed's Agent Panel. At a usage limit the thread offers to resume, or resumes on its own with automatic resume on, in the same thread. `npx @codizelabs/agent-rewake install`
52
-
53
- ### Auto-resume Claude Code after a usage limit (preview)
54
-
55
- In the terminal (the Claude desktop app's Code tab isn't supported yet): at a usage limit, Rewake offers to continue the session after the reset; keep Claude Code open. `/rewake` schedules a message into the session (`/rewake in 1h Run the tests`); `/rewake help` lists the rest. `npx @codizelabs/agent-rewake install --only claude-code`
56
-
57
- ### Auto-resume Codex when the usage limit resets (preview)
58
-
59
- In the Codex terminal app: trust Rewake's hooks once, then at a usage limit type `rewake` in the thread (Codex refuses slash commands it doesn't know, so it's the one place without the slash), and Rewake continues the thread after the reset. `npx @codizelabs/agent-rewake install --only codex`
60
-
61
- ### Auto-resume GitHub Copilot CLI, Grok Build, Gemini CLI and Antigravity CLI (preview)
62
-
63
- Once the session is closed, run `npx @codizelabs/agent-rewake continue`, any time before the reset, and Rewake continues the same session when the limit resets. Run `continue --always` once, and from then on Rewake continues closed sessions by itself when the reset is within a day. In Gemini CLI you can also type `/rewake` in the conversation at the limit. `npx @codizelabs/agent-rewake install --only copilot-cli` (or `grok`, `gemini-cli`, `antigravity`)
64
-
65
- ## Is it for you?
66
-
67
- | Where you use your agent | What Rewake does there | Guide |
68
- |---|---|---|
69
- | Zed's Agent Panel, with any external agent (Claude Agent, Codex, Gemini CLI…) | Resumes the thread at the reset, and sends messages later | [Zed](https://codizelabs.github.io/agent-rewake/docs/#zed) |
70
- | Claude Code in a terminal (preview) | Asks once at the limit, then continues the same session | [Claude Code](https://codizelabs.github.io/agent-rewake/docs/#claude-code) |
71
- | Codex in a terminal (preview) | Type `rewake` at the limit; the thread continues after the reset | [Codex](https://codizelabs.github.io/agent-rewake/docs/#codex) |
72
- | GitHub Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI (previews) | Continues a closed session after the reset | [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) |
73
-
74
- It can't reach Zed's own agent (the panel's built-in one), claude.ai or the Claude desktop app's chat.
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)
75
61
 
76
62
  ## Quick start
77
63
 
@@ -79,13 +65,18 @@ It can't reach Zed's own agent (the panel's built-in one), claude.ai or the Clau
79
65
  npx @codizelabs/agent-rewake install
80
66
  ```
81
67
 
82
- In a terminal, `install` shows what it found on your computer (Zed and each coding agent) and what Rewake does in each. Tick the places you want, see every change together, and answer once; one line per place then gives its next step. Everything except Zed is a preview.
68
+ `install` shows what it found on your computer (each coding agent, your editors, Zed) and what Rewake does in each. Tick the places you want, see every change together, and answer once; one line per place then gives its next step, for example:
69
+
70
+ - **Claude Code** (terminal, VS Code, Cursor): start a new session.
71
+ - **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.
73
+ - **Zed, JetBrains, Devin Desktop**: restart the app (below for Zed).
83
74
 
84
- For 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.
75
+ **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.
85
76
 
86
77
  If you have no external agents yet, `install` offers to add **Claude Agent**: pick it in the Agent Panel and sign in with your Claude account.
87
78
 
88
- Check the setup at any time. `doctor` looks at Zed, its settings and agents, Rewake, sign-in, your scheduled messages and recent problems, and says in plain words what's left to do. It works offline and prints no folders, accounts or keys:
79
+ Check the setup at any time. `doctor` looks at every place you set up (Zed and its agents, each preview), sign-in, your scheduled messages and recent problems, and says in plain words what's left to do. It works offline and prints no folders, accounts or keys:
89
80
 
90
81
  ```sh
91
82
  npx @codizelabs/agent-rewake doctor
@@ -93,7 +84,7 @@ npx @codizelabs/agent-rewake doctor
93
84
 
94
85
  ### Updating
95
86
 
96
- From any version, the same two steps: run `npx @codizelabs/agent-rewake@latest install`, then quit Zed completely and open it again. Your threads, 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, hover over the **Rewake** menu, or run `agent-rewake --version`. **Settings…**, the menu's **Rewake** entry (About) and the schedules page show it too.
87
+ 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
88
 
98
89
  ### Requirements
99
90
 
@@ -104,36 +95,41 @@ From any version, the same two steps: run `npx @codizelabs/agent-rewake@latest i
104
95
 
105
96
  ## How it works
106
97
 
107
- ```text
108
- Zed ⇄ Agent Rewake ⇄ your agent (Claude, Codex, Gemini…)
109
- ```
98
+ Rewake joins each agent the way that agent allows, and always continues the same session:
99
+
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.
110
103
 
111
- Zed talks to external agents over the [Agent Client Protocol](https://agentclientprotocol.com). Rewake is a thin layer on that connection: it passes everything through unchanged, adds its menu and forms to the thread, notices when the agent reports a usage limit, and sends your messages into the same thread at the right time. It runs on your machine, inside Zed's own agent process; nothing runs in the cloud.
104
+ Everything runs on your computer; nothing runs in the cloud.
112
105
 
113
106
  ## Use it
114
107
 
115
- | To… | In the thread | Or type |
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.
109
+
110
+ | To… | In Zed | Elsewhere |
116
111
  |---|---|---|
117
- | Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | `/rewake` (or `/rewake 3:30pm`) |
118
- | Resume automatically | **Rewake → Turn on auto-resume after limits…** | `/rewake auto on` |
119
- | Schedule a message | **Rewake → Schedule a message…** | `/rewake in 3h Run the tests` |
120
- | Repeat a message | **Custom time…** in the schedule form | `/rewake every weekday 09:00 Check the build` |
121
- | See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/rewake list` |
122
- | See every thread | The Zed task **Agent Rewake: schedules** | `npx @codizelabs/agent-rewake ui` |
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` |
113
+ | 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
+ | Schedule a message | **Rewake → Schedule a message…** | `/rewake in 3h Run the tests` (Claude Code) |
115
+ | 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 |
123
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
120
 
126
121
  Full guide: **[codizelabs.github.io/agent-rewake/docs](https://codizelabs.github.io/agent-rewake/docs/)**.
127
122
 
128
- ## Supported agents
123
+ ## Agents in Zed
129
124
 
130
- 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 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.
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
126
 
132
127
  ## Privacy
133
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
130
  - Sends only what you scheduled, approved, or turned on.
136
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.
137
133
 
138
134
  ## Uninstall
139
135
 
@@ -141,11 +137,11 @@ Rewake works the same way in front of every external agent Zed runs: **Claude Ag
141
137
  npx @codizelabs/agent-rewake uninstall
142
138
  ```
143
139
 
144
- This puts every agent back the way it was. `doctor` shows the folder where Rewake keeps its data, if you want to delete that too.
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.
145
141
 
146
142
  ## Status
147
143
 
148
- Early release (0.1). Tested on macOS, Linux and Windows with Node.js 22 and 24. Feedback and bug reports are very welcome: [open an issue](https://github.com/codizelabs/agent-rewake/issues/new/choose).
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).
149
145
 
150
146
  ## Contributing
151
147