untether
AGENTS.md72 starsChanged 4 months agoMITView on GitHub
Telegram bridge for AI coding agents. Control Claude Code, Codex, OpenCode, Pi, Gemini CLI, and Amp from your phone or any device — agents run on your machine in the background while you're away from the terminal. Features interactive permissions, voice input, cost tracking, and live progress streaming. Every run MUST emit exactly: 1. StartedEvent — once, when session ID is known 2. ActionEvent(s) — zero or more 3. CompletedEvent — exactly once, always final Use EventFactory for event construction.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms-full.txtllms.txt
- llms.txtllms.txt
- claude-stream-jsonSkill
- codex-opencode-piSkill
- jsonl-subprocess-runnerSkill
- release-coordinationSkill
- telegram-bot-apiSkill
- untether-architectureSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Every run MUST emit exactly:
- Very specific: line 34
Use EventFactory for event construction.
- Very specific: line 38
ALL writes go through TelegramOutbox (never call Bot API directly)
- Very specific: line 40
Call answerCallbackQuery promptly to clear button spinners
- Distinctive: line 50
Use stub subprocess runners with fake CLI scripts
- Very specific: line 51
Use FakeTransport protocol doubles (not real Telegram clients)
- Distinctive: line 52
Verify 3-event contract in all runner tests
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Untether — Agent Instructions
Telegram bridge for AI coding agents. Control Claude Code, Codex, OpenCode, Pi, Gemini CLI, and Amp from your phone or any device — agents run on your machine in the background while you're away from the terminal. Features interactive permissions, voice input, cost tracking, and live progress streaming.
Architecture
Telegram <-> TelegramPresenter <-> RunnerBridge <-> Runner (claude/codex/opencode/pi/gemini/amp)
|
ProgressTracker- Runners (
src/untether/runners/) — engine-specific subprocess managers - RunnerBridge (
src/untether/runner_bridge.py) — connects runners to Telegram presenter - TelegramPresenter (
src/untether/telegram/bridge.py) — renders progress, inline keyboards, answers - Commands (
src/untether/telegram/commands/) — command/callback handlers - Schemas (
src/untether/schemas/) — msgspec structs for JSONL parsing
Key conventions
- Python 3.12+, anyio for async, msgspec for JSONL, structlog for logging
- Ruff for linting (
uv run ruff check src/), pytest with 80% coverage threshold - Australian English in user-facing text (realise, colour, behaviour, licence)
- Conventional commits:
feat:,fix:,docs:,refactor:,test: - Feature branches:
feature/*,fix/*,docs/*
Runner 3-event contract
Every run MUST emit exactly:
StartedEvent— once, when session ID is knownActionEvent(s)— zero or moreCompletedEvent— exactly once, always final
Use EventFactory for event construction. Never construct event dataclasses directly.
Telegram transport rules
- ALL writes go through
TelegramOutbox(never call Bot API directly) - Callback data max 64 bytes, format:
prefix:action:id - Call
answerCallbackQuerypromptly to clear button spinners - Message limit 4096 chars; Untether splits long responses across multiple messages by default
Testing
uv run pytest # all tests
uv run pytest tests/test_*.py -x # specific file- Use stub subprocess runners with fake CLI scripts
- Use
FakeTransportprotocol doubles (not real Telegram clients) - Verify 3-event contract in all runner tests
Commands
| Command | Description |
/cancel | Stop the running agent |
/agent | Show or set engine for this chat |
/model | Override the model for an engine |
/planmode | Toggle plan mode (on/auto/off) |
/usage | Show API costs for the current session |
/stats | Per-engine session statistics (today/week/all-time) |
/auth | Codex device re-authentication |
/export | Export session transcript |
/browse | Browse project files |
/config | Interactive settings menu |
/verbose | Toggle verbose progress mode |
/restart | Gracefully restart Untether |
Before committing
uv run ruff check src/
uv run pytest
uv lock --checkDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

