Cross-environment resume
Resume a coding session you started in your terminal — from Telegram, while away from your desk.
Resume a coding session you started in your terminal — from Telegram, while away from your desk.
How it works
Each engine CLI stores sessions per directory. Untether projects map to directories. /continue tells the engine to resume the most recent session in the project directory, regardless of whether it was started from Untether or directly in the CLI.
Prerequisites
- Same directory — the Untether project must point to the same directory as the CLI session. Register it with
untether init. - Session finished — the CLI session must have completed (or been stopped). You cannot resume a session that is still actively running in another process.
Usage
/continue # resume with no new prompt
/continue add tests for the auth # resume with a follow-up prompt
Example workflow
-
On your laptop, start a coding session:
cd ~/myproject claude "refactor the auth module" -
The session finishes (or you stop it). You leave the house.
-
On your phone, open Telegram and go to the chat bound to
~/myproject:You
/continue now add tests for the refactored code
-
Untether passes
--continueto Claude Code, which finds the most recent session in~/myprojectand resumes it with your new prompt.
Engine support
| Engine | Supported | CLI flag used | Notes |
|---|---|---|---|
| Claude Code | ✅ | --continue | Tested, works reliably |
| Codex CLI | ✅ | resume --last | Tested, works reliably |
| Gemini CLI | ⚠️ | --resume latest | Deprecated; individual Google accounts can no longer sign in |
| OpenCode | ✅ | --continue | Tested via dev bot; requires latest OpenCode version |
| Pi | ✅ | --continue | Requires provider config for OAuth subscriptions (see below) |
| Antigravity CLI | ✅ | --conversation=<id> | Untether looks up the last conversation run from this exact project directory and resumes it by id. agy’s own --continue isn’t used, because it can also pick a conversation from a parent or child directory (#1039). With no conversation for this directory, nothing is started |
| Amp | — | N/A | Deprecated; requires explicit thread ID, no “most recent” mode |
Pi provider configuration
Pi stores OAuth subscription credentials under provider names like openai-codex, but its --print mode defaults to the openai API key provider. To use your ChatGPT subscription with /continue, set the provider in your Untether config:
[engines.pi]
provider = "openai-codex"
Or for Gemini CLI subscriptions: provider = "google-gemini-cli".
Handoff mode: terminal-first workflow
If you use handoff mode (session_mode = "stateless"), every Telegram message starts a fresh run and the resume line is always visible. This is designed for developers who switch between Telegram and terminal:
The workflow:
- Send a task from Telegram while away from desk
- Bot completes it and shows
codex resume abc123 - Back at desk: paste
codex resume abc123in terminal to continue with full IDE context - Later, from mobile: use
/continueto pick up where the terminal left off
This works because resume tokens are stored per-directory, not per-transport. Both Telegram and terminal sessions use the same underlying engine session store.
Tips
-
After a
/continue, Untether tracks the real session it resumed, so your next message (or a reply to the result) carries on in that session as usual. Before v0.36.0 a Claude/continuecould leave the session half-registered, so the next resume waited 30 seconds and then started fresh (#816, #817). -
Codex reports token usage as a running total for the thread. When you
/continuea thread that Untether hasn’t seen before, the footer can’t tell how much of that was this run, so it is labelled· thread total(#419). -
Use
/newfirst if you want to clear any stored Untether session before continuing a CLI session. -
If the most recent session in the directory was an Untether session (not a CLI one),
/continuewill resume that instead. To target a specific older session, use reply-to-continue instead.
Related
- Chat sessions — auto-resume within the same chat
- Routing & sessions — all four continuation methods
- Commands & directives