codex-opencode-pi

A reference for connecting Codex CLI, OpenCode CLI, and Pi CLI to Untether, including how they report events and continue sessions.

In plain words
What is it for?
Use it when implementing or troubleshooting runners that start these agents, read their JSONL output, translate events, or resume previous sessions.
Why use it?
It explains the differences between these command-line agents so their output and resumable sessions can be handled consistently.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/littlebearapps/untether/codex-opencode-pi
Any agent
npx skills add littlebearapps/untether --skill codex-opencode-pi
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/untether

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.02262
Opus 5 $0.00026 $0.01131
Sonnet 5 $0.00011 $0.00452
Haiku 4.5 $0.00005 $0.00226

Measured 2d ago against content hash a278a8b17922, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-opencode-pi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/codex-opencode-pi/SKILL.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex, OpenCode, and Pi Runner Protocols

These three engines are non-interactive only — no control channel, no permission prompts. They extend JsonlSubprocessRunner directly (unlike ClaudeRunner which overrides run_impl).

Quick comparison

Aspect Codex OpenCode Pi
CLI codex exec --json opencode run --format json pi --print --mode json
Event model Turn-based (items in turns) Step-based (tools in steps) Agent-based (messages + tools)
Resume line `codex resume <thread_id>` `opencode --session ses_XXX` `pi --session <token>`
Resume token thread_id (UUID) ses_XXXX (26+ chars) UUID short (8 chars) or path
Final answer agent_message item Accumulated text events message_end assistant content
Error signal turn.failed error event / missing step_finish stopReason in message_end

Codex

Key files

File Purpose
src/untether/runners/codex.py CodexRunner implementation
src/untether/schemas/codex.py msgspec structs for Codex events
docs/reference/runners/codex/exec-json-cheatsheet.md JSONL event shapes
docs/reference/runners/codex/untether-events.md Event mapping spec

CLI invocation

codex exec --json --skip-git-repo-check --color=never \
  [--model MODEL] [--session THREAD_ID -] [-]
  • Prompt on stdin (trailing - means read stdin)
  • Resume: --session <thread_id> -
  • --skip-git-repo-check --color=never for clean output

JSONL events

Event Untether mapping
thread.started StartedEvent(resume=thread_id)
item.started ActionEvent(phase="started")
item.updated ActionEvent(phase="updated")
item.completed ActionEvent(phase="completed")
turn.completed CompletedEvent(ok=True, answer=final_answer)
turn.failed CompletedEvent(ok=False, error=message)
error (transient) Progress note (reconnect handling)

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 240 lines · 53 tokens per session scan A a278a8b17922

Subscribe to this mod's changes

codex-opencode-pi is a skill published in the GitHub repository littlebearapps/untether (66 stars, last pushed 3d ago), licensed MIT. It adds 53 tokens to every session and 2,262 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cmux-localization

Localization rules and audit workflow for cmux UI strings, settings rows, menus, shortcuts, schema/config text, docs, command/help text, alerts, tooltips, and web messages. Use whenever changing user-facing text.

manaflow-ai/cmux · 49 tokens

translate-craft

Professional translation and localization for 8 languages (ES, JA, FR, DE, PT, ZH, KO, AR). Covers tone matrix, formality levels, i18n patterns (react-intl, i18next, ICU), RTL layout, cultural adaptation, and locale formatting. Use when user asks to translate text, localize an app, adapt tone, review translations, add…

EliasOulkadi/shokunin · 92 tokens

new-adapter

Add support for a new AI tool with adapters, CLI, completion, and tests.

lbb00/ai-rules-sync · 21 tokens

sync-readme

Synchronize English README.md with Chinese READMEZH.md, maintaining content parity.

lbb00/ai-rules-sync · 20 tokens

repo-readme-assets

README.md (EN) + localized mirror + local animated SVG header/footer for a repository. Generates assets/header.svg and assets/footer.svg with SMIL animation (4 presets: default/minimal/dark-first/monochrome), zero external services. Scripts: generateassets.py, validatesvg.py, extractcontext.py. Triggers: 'readme…

bestdeejay-design/agent-skills · 128 tokens

debug-bug

Systematically investigate and fix bugs using token-efficient context gathering. Reproduces the issue first, localizes with blame and history, traces the call path, then verifies the fix. Use when asked to fix a bug, investigate an error, or debug unexpected behavior.

edimuj/tokenlean · 57 tokens