AI Auto Resume
Resumes your Claude Code, Codex and Antigravity conversations after a usage limit, so a long task continues when the plan renews instead of waiting for you.
You can resume in two ways:
- CLI mode (Claude Code, Codex, Antigravity): at the limit reset, or at a time you choose, the extension starts the CLI of the assistant in your workspace folder. The CLI continues, with your message, the conversation you chose when you scheduled the resume.
- Panel mode (Claude Code, Codex; optional, off by default): a small script added to the chat panel recognizes the usage limit and sends your message in the panel when the limit resets.
CLI mode
- Run AI Auto Resume: Open Panel (status bar entry, Ctrl+Alt+R) or AI Auto Resume: Schedule Resume... from the Command Palette.
- Choose the assistant and the conversation to continue, among the recent conversations started in the folder (Claude Code and Codex). The resume continues exactly that conversation, also if you work in another one meanwhile. When no conversation can be chosen (Antigravity, which does not allow it, or no conversation found in the folder), you confirm that the resume will continue the most recent conversation of the folder when it starts.
- Choose when it should resume:
- At the limit reset: the reset time read from the local data of the assistant, plus a short delay (
aiAutoResume.delayAfterResetSeconds);
- At a specific time: for example
15:05 (tomorrow if that time has already passed today);
- Now: useful to try the setup.
- Confirm or edit the message (default:
Continue from where you left off.).
At the chosen time the extension runs (<id> is the conversation chosen; without one, the most recent conversation):
| Assistant |
Command (the message goes through stdin when possible) |
| Claude Code |
claude --resume <id> --print --output-format json (without a conversation: --continue) |
| Codex |
codex exec resume --json --skip-git-repo-check <id> - (without a conversation: --last) |
| Antigravity |
agy --continue --output-format json --print <message> |
The answer goes to the AI Auto Resume output channel, and a notification reports the result. If the assistant is still limited, the extension tries again at the next reset, or after aiAutoResume.retryMinutes, up to aiAutoResume.maxAttempts times.
The CLI works in the background: the answer does not appear in a chat panel that is already open. Reopen the conversation from the panel history to see the new messages. If that conversation is still open and working in a chat panel, the CLI writes in it at the same time: in that case use the panel mode instead.
Notes:
- The VS Code window of the workspace must stay open and the computer awake. A resume that became due while VS Code was closed is never started on its own: when the workspace opens again you choose Run now or Cancel (if you close the message, it waits in Show Scheduled Resumes).
- Nobody is there to approve actions during a resume. With
aiAutoResume.cli.permissionMode set to default, the CLI settings apply and actions that need approval are refused. With acceptEdits, file changes in the workspace are allowed without asking.
- In an untrusted workspace the extension does not start CLIs.
Panel mode
Run AI Auto Resume: Enable Panel Auto Resume..., read the details and confirm, then reload the window. The confirmation is required: setting aiAutoResume.panel.enabled by hand does not change any file. An Auto Resume button appears next to the input box of the Claude Code and Codex chat panels. Click it to:
- switch the automatic resume on or off for that panel;
- send the message at a chosen time.
The script waits for the reset, then sends the message only when the input box is empty and the assistant is not busy. It also checks that the panel still shows the conversation that hit the limit. In Claude Code the check uses the id of the session shown, and each session of the panel that hits the limit gets its own resume. Codex exposes no conversation id: the resume is cancelled as soon as another conversation is opened, and when in doubt the script does not send.
Panel mode changes files of the Claude Code and Codex extensions: their webview/index.js (Claude Code), and webview/index.html plus a new webview/ai-auto-resume.js (Codex). Only the text between the markers of AI Auto Resume is touched. A copy of each original file is kept in the storage of this extension.
Updates of those extensions remove the script, and AI Auto Resume adds it again. Disable Panel Auto Resume removes it, and so does uninstalling AI Auto Resume. The script depends on the internal structure of those panels, so an update of Claude Code or Codex can stop it from working until AI Auto Resume is updated. Antigravity is not supported in panel mode: its chat runs in a frame served by a local program.
Commands
| Command |
Action |
| AI Auto Resume: Schedule Resume... |
Schedules a resume with the CLI |
| AI Auto Resume: Show Scheduled Resumes |
Lists the resumes; run now, cancel or stop one |
| AI Auto Resume: Cancel All Scheduled Resumes |
Cancels all the resumes of the workspace |
| AI Auto Resume: Enable Panel Auto Resume... |
Enables the panel mode after your consent |
| AI Auto Resume: Disable Panel Auto Resume |
Removes the panel scripts |
| AI Auto Resume: Show Log |
Opens the output channel |
| AI Auto Resume: Open Panel |
Opens the panel of the extension: new resume (assistant, folder, at the limit reset, at a time or now, message in a large text area, confirmed with a button; a time already passed today means tomorrow), list of the scheduled resumes with run now, delete and stop, and an explanation of the CLI and panel modes. Also from the status bar and the context menu of the extension in the Extensions view. Shortcut Ctrl+Alt+R (macOS Cmd+Alt+R, Linux Ctrl+Shift+Alt+R), not active in the terminal or with the find widget open, where VS Code uses the same keys |
Settings
| Setting |
Default |
Meaning |
aiAutoResume.language |
auto |
Language: auto, en-US, en-GB, it, fr, de, es, pt |
aiAutoResume.message |
Continue from where you left off. |
Message sent when resuming |
aiAutoResume.delayAfterResetSeconds |
60 |
Wait after the reset before sending |
aiAutoResume.retryMinutes |
30 |
Wait before a new attempt when still limited or the reset is unknown |
aiAutoResume.maxAttempts |
3 |
Attempts for one limit |
aiAutoResume.showStatusBar |
true |
Next resume in the status bar |
aiAutoResume.logConversation |
false |
Write messages, answers and the title of the conversation in the output channel (off: only their length, and the id of the conversation) |
aiAutoResume.cli.claudeExecutable |
empty |
Path of claude (empty: automatic search) |
aiAutoResume.cli.codexExecutable |
empty |
Path of codex (empty: automatic search) |
aiAutoResume.cli.antigravityExecutable |
empty |
Path of agy (empty: automatic search) |
aiAutoResume.cli.permissionMode |
default |
default or acceptEdits |
aiAutoResume.cli.timeoutMinutes |
120 |
Maximum duration of a resume |
aiAutoResume.panel.enabled |
false |
Panel mode (use the command to enable it) |
aiAutoResume.panel.targets |
both |
claudeCode, codex |
aiAutoResume.panel.armByDefault |
true |
Automatic resume on in every panel |
Executable paths and the panel mode are machine settings: workspace settings cannot change them.
Languages
English (US and UK), Italian, French, German, Spanish and Portuguese. Notifications, lists, the status bar and the panel button follow aiAutoResume.language. Command titles and setting descriptions always follow the VS Code display language.
Data and privacy
- No telemetry. Nothing is sent anywhere by the extension itself.
- Reset times are read from local files and never written:
~/.claude.json (Claude Code), ~/.codex/sessions/**/rollout-*.jsonl (Codex), and the quota summary of the local Antigravity server on 127.0.0.1, with the port and token Antigravity writes in ~/.gemini/antigravity/daemon/.
- The CLIs you schedule talk to their own services with your existing sign-in, exactly as when you use them yourself.
- The output channel shows the text of messages and answers, and the title of the conversation (which can be your first prompt), only if you enable
aiAutoResume.logConversation.
- Files written: the list of scheduled resumes (VS Code workspace state), copies of the original panel files (extension storage), and, in panel mode only, the files of Claude Code and Codex described above.
Trademarks
Claude, Claude Code, Codex, ChatGPT, Gemini and Antigravity are trademarks of their respective owners. AI Auto Resume is not affiliated with or endorsed by them.
| |