Codexmarathon
Reliable account limits rotator for Codex CLI
Install: git clone https://github.com/Lem0nTree/codexmarathon
Works with Codex · 30 GitHub stars
Install
git clone https://github.com/Lem0nTree/codexmarathonInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →CodexMarathon
CodexMarathon adds multi-account Marathon controls directly to a custom build
of the Codex CLI. Its release installer also installs and starts the private
codexmarathon-accountd user service automatically; users do not need to run
a controller command or configure a Marathon socket environment variable.
It stores managed account profiles, lets you sign in to more than one ChatGPT account, switches only at a safe boundary between turns, and can move selected profiles between CodexMarathon installations in a password-encrypted backup. Credential snapshots are treated as opaque, kept in owner-only local state, and never appear in status output, logs, or transition records.
Install
CodexMarathon is distributed as one package: the modified codex CLI, the
private account metadata daemon, and its systemd user units are installed and
started together.
curl -fsSL https://raw.githubusercontent.com/Lem0nTree/codexmarathon/main/scripts/install.sh | sh
No separate daemon, SDK, or plugin installation is required. The installer enables the user service and socket, enables user lingering for operation after logout, and verifies the account API before reporting success.
On Linux ARM64, the installer sets features.daemon_auto_start = false
using Codex's TOML editor, preserving other configuration settings. The ARM64
archive does not contain the complete package required by Codex's separate shared app-server daemon;
the interactive CLI uses its embedded app-server instead. This does not disable
the codexmarathon-accountd user service. On upgrade, the installer stops a
previously running shared app-server daemon when embedded mode is selected,
preventing the new CLI from attaching to an older server version. Reinstalling
also clears service start limits left by earlier failed installations.
To use a non-default Codex state directory, pass an absolute path:
curl -fsSL https://raw.githubusercontent.com/Lem0nTree/codexmarathon/main/scripts/install.sh \
| CODEXMARATHON_CODEX_HOME=/srv/codex-state sh
The installer records that selection in the owner-private
$XDG_CONFIG_HOME/codexmarathon/config.json (or
$HOME/.config/codexmarathon/config.json). The modified CLI and accountd use
it automatically on later invocations, so shell startup changes are not
required. An explicit CODEXMARATHON_CODEX_HOME or CODEX_HOME still takes
precedence; setting both to different paths is rejected. The default remains
$HOME/.codex. The local API socket always stays under $XDG_RUNTIME_DIR and
does not move with the state directory.
Native workflow
Use Marathon from the shell:
codex marathon status
codex marathon login personal --device-code
codex marathon login work --device-code
codex marathon on
codex marathon switch work
Or use it from an interactive Codex session:
/marathon
/marathon login personal
/marathon login work
/marathon on
/marathon switch work
Running /marathon displays the current native state and a help panel. It
also explains the available account, login, enabled-state, and switching
commands.
Sign in on a server
login supports a browser-link flow and a device-code flow.
For a headless machine such as an AWS instance, use a device code:
codex marathon login work --device-code
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code, like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…
A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.