HeadlinesBriefing HeadlinesBriefing.com

SIwithin: Run Agent CLIs Unattended, Fenced and Budgeted

Hacker News •
×

SIwithin is a tool that runs an agent command-line program unattended, on a brief, inside a fence around the folders you specify, and under a dollar budget, leaving one record per run. It enforces three guarantees with code rather than trust. First, a run can only touch the folders it was given; your home folder is refused for reading and writing. Second, a run cannot spend more than its allotted dollars, with a per-run budget, a cap across all runs, and a timer on every run. For the Claude adapter, a loopback proxy is the single door to the API: the run receives a per-run token rather than your key, and every request is metered and refused past the budget.

Every run writes one line recording what it cost and whether it finished. The tool works with the Claude Code and OpenAI Codex command-line tools. SIwithin is an independent project and is not made, endorsed or sponsored by Anthropic or OpenAI. Users remain bound by each vendor's terms of service when using their CLIs through SIwithin.

SIwithin runs only on macOS and refuses to run on Linux or Windows rather than operate without a fence. It is a single file requiring Python 3.10 or newer and the standard library only. It makes no network calls of its own and sends no telemetry. Users must install the CLI they want to drive and supply an API key for it.

The Codex adapter requires explicit flags, because that CLI reports tokens rather than cost and reports usage only when a turn ends. That adapter has been built from documentation but not yet tested against a live CLI.

Source: Hacker News · Summarized by HeadlinesBriefing