Skip to content
dateoPublic

About

marathon runs Claude Code agents in Docker, each with its own Claude login, tmux and history, all working on the same repositories.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

232 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marathon by dateo

Let your Claude Code agents run, and answer them from your phone.

CI License: Apache-2.0 OpenSSF Baseline: prepared for Level 1

marathon runs Claude Code agents in Docker, each with its own Claude login, tmux and history, all working on the same repositories. Shared MCP services (GitLab, GitHub, Sentry, SonarQube, Playwright, Chrome DevTools) and MegaLinter run in their own containers, so their tokens stay out of the agents. Everything the agents wait for lands in one inbox that you answer from a web UI built for the phone, or from stackctl in the terminal. It is self-hosted and open source (Apache-2.0): it runs on your own Linux machine, and the web UI, its fonts and scripts are served from there.

Agents page: every agent as a card, every Claude session saying what it does Inbox on a phone with open points as buttons

What it does

Answer from your phone

  • One inbox for every agent. Permission prompts, AskUserQuestion questions, finished turns with their Still open: points, interrupted background tasks and ask_user questions from phei. Every item is an A2UI v1.0 surface; yes/no and either/or points become buttons.
  • The terminal keeps working. You can answer in tmux as before; the first answer wins.
  • Startup questions too. When Claude Code asks before a session starts, for example whether to trust a folder, the question shows in the inbox; the trust question is answered Yes after 30 seconds, because each agent is isolated in its own container.

Watch your agents

  • Agents page. Every agent as a card, every running session saying in plain words what it does and which step of its to-do list it is on. An agent that is not logged in yet has a Log in button that opens claude auth login in the browser.
  • Conversations. Markdown, tables and highlighted code with a Copy button; type or dictate a reply, add photos and files (paperclip, drop or paste), rename the session or stop a turn. The agent's tmux opens in the browser when you need the real terminal, with clickable links and copy to your clipboard.
  • Switch sessions fast. A rail beside the conversation and the terminal lists every session; on a keyboard, Alt+` goes back to the last one and Alt+K searches them all.
  • Sessions and usage. Every session with its tokens and state; usage per day, agent and model, plan limits, and a cost estimate at API list prices.

Work in teams, on your own model too

  • Teams. Agents work together through phei: a standing team has a leader that hands on tasks and can start sessions on the other agents, each in its own git worktree: after you allow each one, or without asking if you set the team so. See Work in teams.
  • Artifacts of every account. The Artifacts page and the agents' library tools show the claude.ai artifacts all accounts in the stack published, edited or read, without sharing each one (See the artifacts of the other accounts).
  • Channels. The Channels page shows how phei reaches you, and how to add Matrix, Rocket.Chat, mail or a cloud channel (Choose how phei reaches you).
  • Local-model agents. claude-local-1 runs Claude Code on your own vLLM through the broker, on a network with no way out, for data that must not leave your infrastructure (Run an agent on our own model server).
  • Agent links and ports. Every agent has ports 3000 to 3004 that the broker forwards behind the web UI's sign-in, and the web terminal opens a dev server's URL or an absolute file path with one click, the file in a viewer (Open what an agent shows me).
  • Docker for the agents. With DOCKER_FOR_AGENTS=on the agents run docker pull, run, build and testcontainers on a Docker daemon of the stack's own, shared by the agents and never with root on the repositories; each download and new container waits for your approval in the inbox (Let the agents use Docker).

Manage MCP servers

  • One list for all agents. config/mcp-servers.json (starting from the shipped default) holds the MCP servers every agent gets. The MCP page and stackctl show each server's status in every agent and add, edit, switch off or delete servers for all agents at once.

Operate the containers

  • Containers page. Status, update checks, restarts, logs and updates; operations that end agent sessions name them and ask first.
  • stackctl. The same features in the terminal, plus a setup wizard. On the host it runs the Docker operations the web UI asks for; the broker itself has no Docker socket.
  • Robust to restarts. Sessions a container restart stopped are listed on the Agents page and come back with one tap, in their team, continuing an interrupted task by themselves. Finished turns are restored from the transcripts, and agents keep their MCP session when the broker is redeployed.
Inbox Usage MCP servers
Inbox with a selected request Usage with plan limits and cost MCP servers with their status per agent
Sessions Containers Conversation on a phone
Sessions with tokens and state Containers with update status and the local model Open points in a conversation, with the session rail
Teams Channels Artifacts
Teams with their leader, members and spawned sessions Channels phei runs and how to add others Artifacts of every account with the state of their copy

Quick start

make tui            # builds stackctl; its Setup tab writes .env, builds, starts, logs in

or without stackctl:

./scripts/setup.sh  # creates .env (mode 0600) with random keys and your host paths
$EDITOR .env        # agent count, repository folder, MCP backend tokens
make build          # build the images
make up             # start the selected agents and services
make agent-1        # attach to agent 1's tmux, then /login in Claude (or Log in in the web UI)
make check          # status, MCP registrations, account labels, skills

Every agent logs in by itself (the local-model agent needs no login); never put ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN into .env. To use the web UI from your phone, choose a VPN interface for the broker and allow your phone's address in stackctl (Setup, "Web inbox access"), then press W and scan the QR code. The full walkthrough is in Set up the stack and Use the web UI from your phone.

Requirements

You need For
Linux with Docker Engine and Docker Compose v2 the agents, the broker and the MCP services
The Go SDK on the host (Go 1.26.2 or newer) building stackctl; the agents mount it as HOST_GOROOT
A Claude account per agent each agent logs in with /login in its own container
A vLLM server (optional) the local-model agent claude-local-1, through the broker
Network access from Docker builds Docker Hub (or DOCKER_REGISTRY), GitHub, npm, ghcr.io, mcr.microsoft.com, gcr.io
Tokens for the MCP backends you use GitLab, Sentry, SonarQube, GitHub (an empty token keeps a backend off)
Node.js 22 (development only) building and testing the web UI (make web, make test)

Everyday commands

Command Does
make tui Build and start stackctl
make up Write the agents from AGENT_COUNT and LOCAL_AGENT_COUNT, then start or reconcile the stack
make agent-N Attach to agent N's tmux (Ctrl-b d detaches)
make ps, make logs, make check Status, logs, smoke check
make build Rebuild the images (recreating agents ends their tmux sessions)
make down Stop everything, keep the logins (never use docker compose down -v)
make serve-install Install the host worker as a systemd user service

How it fits together

  • session-broker (Go, broker/) collects what the agents wait for and serves the web UI (React, broker/webui/, built into broker/web/ by make web and by the broker image).
  • Agent relay (agents/inbox-relay.py) runs in every agent: it types replies into tmux and reports activity, usage and MCP status.
  • stackctl (Go, tui/) is the terminal UI and the host worker for Docker operations.
  • phei (optional, github.com/dateo/phei) lets agents report work and ask you questions. Set PHEI_SRC in .env to build it; without it, marathon builds a placeholder.

The architecture overview has the Mermaid diagrams: services, data flows, the session inbox, the agent relay, the host worker and state and restarts. All documentation is in docs/, an OKF bundle.

Codebases

marathon is this repository. phei lives in its own repository and is optional: set PHEI_SRC in .env to build it into the stack. Everything else the stack runs (Claude Code, the MCP servers, MegaLinter) comes from its upstream project, at the versions set in compose.yaml and the Dockerfiles.

Security in short

Only the broker's web listener is published, on loopback by default. Anyone who can reach it and holds BROKER_TOKEN can approve commands and open a shell in your agents, so keep it on loopback or a VPN and list the allowed clients in BROKER_ALLOW. Instead of sharing the token, people can sign in through an OIDC provider such as Keycloak, limited to the roles, groups and e-mail addresses you allow. The web UI runs under a strict Content Security Policy, no container gets the Docker socket; with DOCKER_FOR_AGENTS=on a privileged dind runs the agents' containers, behind docker-gate. .env is mode 0600 and ignored by Git. See Security model. Report vulnerabilities privately, as SECURITY.md explains.

OpenSSF Baseline Level 1

marathon is prepared for Level 1 of the OpenSSF Open Source Project Security Baseline (OSPS Baseline, version 2026.08.28): CI treats pull request input as untrusted and scans every commit for secrets, build output and binaries stay out of Git, dependencies are pinned and listed, and the project documents its contribution process, defect reporting and security contact. Three GitHub settings still wait for an admin to apply them with scripts/github-settings.sh: the ruleset that lets main change only through pull requests, private vulnerability reporting, and secret scanning with push protection. OpenSSF Baseline Level 1 shows how each of the 24 controls is met and which are still open.

Contributing

Questions, bugs and proposals go into GitHub issues; CONTRIBUTING.md explains how to report a bug and how a change gets in.

make hooks   # commit hooks: no tooling attribution in commit messages or added lines
make test    # session-broker, stackctl and web UI tests (builds the web UI if missing)
python3 -m unittest discover -s tests   # compose, scripts and relay
make web     # rebuild the web UI into broker/web (build output, not in Git)

CI runs the same tests, checks the commit messages of every pull request, scans for secrets and rejects build output and binaries in Git. The developer guide explains the parts, how a change reaches a running stack and how to try it against a test broker; scripts/demo/ fills a test broker with demo data and retakes the screenshots above. The interface follows the dateo Design System, see UI design.

License

marathon is licensed under the Apache License 2.0 (Apache-2.0). NOTICE lists the third-party code and fonts it includes and their licences. Versions up to v1.0.0 were released under AGPL-3.0-only.

marathon is a dateo project. It is independent of Anthropic and not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.

About

marathon runs Claude Code agents in Docker, each with its own Claude login, tmux and history, all working on the same repositories.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages