Skip to main content

๐Ÿค tandem

One coding session. Multiple AI agents. Shared context.

Use Claude Code, OpenAI Codex CLI, and opencode in one continuous coding session. Work in their native interfaces, press Ctrl-] to move to the next CLI, and continue without copying prompts or rebuilding context by hand.

CI PyPI Python 3.11+ License: MIT

tandem demo โ€” one session relayed across Claude Code, Codex and opencode

Quick start

You need Python 3.11+ and at least two supported CLIs installed and signed in: Claude Code, Codex CLI, or opencode.

uv tool install tandem-cli   # or: pip install tandem-cli
cd your-project
tandem

Work normally in the CLI that opens. Press Ctrl-] to continue the same session in the next CLI. If you press it while the model is working, tandem waits until the response finishes; press it again to cancel the switch.

Exit normally when you're done. Come back later with:

tandem resume      # resume the latest session in this directory
tandem sessions    # find recent sessions across directories

By default, tandem opens the first usable CLI in your configured order. Use tandem --active codex or tandem --active opencode to choose another.

Why tandem?

  • Keep going when a model hits its limit. Move to another CLI and continue with the same files and conversation history.
  • Bring different models to the same problem. Ask another CLI for a second opinion without copying a wall of context between terminals.
  • Keep the native tools you already use. Claude Code, Codex, and opencode retain their own interfaces, commands, keybindings, and MCP servers.
  • Work through a single-provider outage. If another configured CLI is available, switch and continue until the affected provider recovers.

Want GPT subagents inside Claude Code too? See the GPT subagents guide. For more use cases, see Why tandem?.

How it works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Work normally in a native coding CLI         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ tandem keeps the other sessions in sync      โ”‚
โ”‚ locally โ€” without calling another model      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Press Ctrl-] and continue in the next CLI    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Only the active model runs. tandem translates its growing conversation into the other CLIs' native session formats using local file access, so they are ready when you switch. Your session stays in the CLIs' own storage plus a small local database in ~/.tandem; tandem adds no cloud sync or telemetry.

See How tandem works for transcript translation, switching, crash safety, compatibility, and data locations.

Everyday commands

Command What it does
tandem Start a new session
Ctrl-] Continue in the next CLI
tandem resume [id] Resume the latest or a specific session in this directory
tandem sessions [-n N] List recent sessions across directories
tandem run --on codex "โ€ฆ" Send one contextual prompt to another CLI (claude, codex, or opencode)

Learn more

  • Why tandem? โ€” use cases, subscriptions, native tools, token visibility, and privacy
  • GPT subagents โ€” plugin setup, worker models, routing, and sandboxing
  • Configuration โ€” participants, startup arguments, the switch key, and the status bar
  • How tandem works โ€” synchronization, switching, compatibility, and local data
  • Developing tandem โ€” development setup and the harness adapter interface
  • Observed session formats โ€” Claude Code, Codex, and opencode storage formats

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tandem_cli-0.4.0.tar.gz (500.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tandem_cli-0.4.0-py3-none-any.whl (121.8 kB view details)

Uploaded Python 3

File details

Details for the file tandem_cli-0.4.0.tar.gz.

File metadata

  • Download URL: tandem_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 500.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tandem_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 92bf9ade95da744327f41d6c9f5ae85f4d6038155f4182171fbbd6705866c849
MD5 71bc46efe3d5a571bf0cb44d85fbd82f
BLAKE2b-256 b760c7964e53ce1f5d781ff655e13dfc202cff4f1ed84471956a32c557097f2d

See more details on using hashes here.

File details

Details for the file tandem_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tandem_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 121.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tandem_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d88e53cef70847e2a0bd404ead4bf4238fde7513d1c5c98ba295e7a8b4aab46
MD5 9cd795655b2a6f72663f774ba35c6ade
BLAKE2b-256 107c476c3f206d88ade603db34b9ab7375eb845a25c9f9580c2765b968d35a3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page