The OpenAI-compatible runner

A second agent runner drives any OpenAI-compatible chat endpoint (POST <base>/chat/completions) in a tool-use loop over the same six tools Claude Code has: Bash, Read, Edit, Write, Glob, Grep. The default is unchanged: without the switch below every run uses Claude Code.

Switch it on, in the forge's environment:

Without a base URL and a model a run ends as an error saying so. Read it as the run's result.

What it does: the file tools resolve every path inside the run's clone, following symlinks, and refuse anything outside. Bash runs under bubblewrap with the run's sandbox policy and needs an enforced sandbox: where the host cannot enforce one, Bash answers with a refusal and the model uses the file tools. The shell sees only PATH, HOME, TMPDIR and the run's env less anything named like a secret (OPENAI_*, FORGE_*, KEY, TOKEN, SECRET, PASSWORD). Bounds: an endpoint answer over 4 MB ends the run, a turn runs at most 16 tool calls, Bash is killed at 120 s and its output cut at 30 000 bytes, Grep skips files over 1 MB, reads 1 000 characters of a line and refuses a pattern with a repeated group that can backtrack without bound. A run ends at 60 turns.

Not carried over from the Claude runner: resuming a session (each run starts fresh), steering a run while it works, images, and cost: an endpoint reports tokens, not dollars, so cost is 0 and the turn limit holds the budget.

Pinned by test/openai-runner.test.ts; the code is src/crew/openai_runner.ts.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs