What problem does it solve? Delegating coding work to the opencode CLI from an orchestrator requires knowing the correct headless invocation flags, session handling, yolo-mode permission rules, and output parsing, which vary across versions and are easy to get wrong. ## Core Features & Use Cases - Headless Execution: Runs opencode run with auto-approval, timeouts, and JSON (NDJSON) output for parsing text, tool use, tokens, and cost per event. - Session and Agent Control: Continues, forks, and names sessions, selects built-in or custom agents (build, plan, explore), and picks models across Anthropic, OpenAI, and Google providers. - Use Case: An orchestrator needs tests written for a module: it invokes opencode run --auto --format json in an isolated worktree with a scoped prompt, captures the sessionID from NDJSON events, and extracts token cost from step_finish events. ## Quick Start Ask the agent to run a scoped coding task through opencode in headless mode with auto-approval and JSON output, then parse the NDJSON stream for the final text and cost.