jsonl-subprocess-runner

A framework reference for running coding-agent command-line programs as subprocesses that exchange newline-delimited JSON, one JSON object per line.

In plain words
What is it for?
Use it when adding or maintaining runners for Claude, Codex, OpenCode, or Pi, including their process lifecycle and progress events.
Why use it?
It centralises process management, event parsing, session locking, resuming, error handling, and concurrent session tracking.

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/jsonl-subprocess-runner
Any agent
npx skills add littlebearapps/untether --skill jsonl-subprocess-runner
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/untether

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,105 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.00052 $0.02105
Opus 5 $0.00026 $0.01052
Sonnet 5 $0.00010 $0.00421
Haiku 4.5 $0.00005 $0.00211

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

Security

Grade A, and why

jsonl-subprocess-runner 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 3d 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/jsonl-subprocess-runner/SKILL.md · 243 lines

How it starts

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

JSONL Subprocess Runner Framework

All Untether engine runners (Claude, Codex, OpenCode, Pi) extend JsonlSubprocessRunner, which manages subprocess lifecycle, JSONL parsing, session locking, and error handling.

Key files

File Purpose
src/untether/runner.py JsonlSubprocessRunner base class, Runner protocol, SessionLockMixin, ResumeTokenMixin
src/untether/model.py StartedEvent, ActionEvent, CompletedEvent, ResumeToken, Action, ActionKind
src/untether/events.py EventFactory — consistent event creation per engine
src/untether/backends.py EngineBackend dataclass, EngineConfig
src/untether/progress.py ProgressTracker — aggregates actions for UI rendering
src/untether/runner_bridge.py ProgressEdits, handle_message — connects runners to transport
src/untether/runners/ Engine-specific runner implementations

Class hierarchy

Runner (Protocol)
  BaseRunner (SessionLockMixin)
    JsonlSubprocessRunner
      CodexRunner
      OpenCodeRunner
      PiRunner
      ClaudeRunner (overrides run_impl for PTY support)

Template methods to override

When creating a new runner, override these methods on JsonlSubprocessRunner:

class MyRunner(JsonlSubprocessRunner):
    engine: EngineId = "myengine"

    def command(self) -> str:
        """CLI binary name (e.g. 'codex', 'opencode', 'pi')."""

    def build_args(self, prompt, resume, *, state) -> list[str]:
        """Build CLI arguments. Called once per run."""

    def translate(self, data, *, state, resume, found_session) -> list[UntetherEvent]:
        """Translate a decoded JSON dict to Untether events. Core logic."""

    def new_state(self, prompt, resume) -> Any:
        """Create per-run state (e.g. EventFactory, accumulators)."""

    # Optional overrides:
    def stdin_payload(self, prompt, resume, *, state) -> bytes | None:
        """Data to send on stdin. Default: prompt.encode()."""

    def env(self, *, state) -> dict[str, str] | None:
        """Extra environment variables for the subprocess."""

    def decode_jsonl(self, *, line: bytes) -> Any | None:
        """Custom JSON decoder. Default: json.loads."""

Read the full file on GitHub · 243 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. 3d ago First seen · 243 lines · 52 tokens per session scan A a89176c6270b

Subscribe to this mod's changes

jsonl-subprocess-runner is a skill published in the GitHub repository littlebearapps/untether (66 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 2,105 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

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup.

Yeachan-Heo/oh-my-claudecode · 16 tokens

reflect

Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.

alvinunreal/oh-my-opencode-slim · 53 tokens

codemap

Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping.

alvinunreal/oh-my-opencode-slim · 34 tokens

scientific-schematics

Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.1 Pro Preview for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways…

xintaofei/codeg · 68 tokens

openpets

Use when the user asks to install, configure, verify, troubleshoot, or understand OpenPets; install or select a pet; connect Claude Code, OpenCode, Cursor, Codex, or MCP clients; configure a project to use a specific pet; or debug openpetsstatus, openpetsreact, or openpetssay.

alvinunreal/openpets · 70 tokens

southwest

Search Southwest Airlines fares and points pricing via Patchright browser automation. SW is not in any GDS or API. Covers all fare classes, Companion Pass value, and fare drop monitoring.

borski/travel-hacking-toolkit · 40 tokens