OneLoop

One coding agent for your OpenRouter, OpenCode, and ChatGPT subscriptions —
plus Claude Code and Antigravity through their binaries, and a local model through llama.cpp.

core idea

One Agent Loop

Think → call tools → feed results back → repeat.
No plugins, no hooks, no middleware.

User prompt
→
Model thinks
→
Tool calls
→
Model thinks
→
Response

Loops until the model stops calling tools. All calls in a single turn run in parallel.

agents

An agent is a value

One loop, one session file format, one tool trait.
A spec decides what each agent gets: where it works, what it may call, what it is told, whose conversation it keeps.

olEvery tool, the project's own conversation at .oneloop/
ol "…"The same agent, held in memory — no session file, no lock, no AGENTS.md

A second agent is a preset, not a second loop. The run mode is applied after the spec is built, because whether a conversation persists is a fact about the run.

multi-model

One session, many models

Switch mid-conversation. Plan with the expensive model,
implement with the cheap one, ask a third for a second opinion.

(nvidia)> /model luna; plan how to split the parser
(luna)> /model nvidia; implement step 1 of that plan
(nvidia)> /ca is the plan still consistent with the code?

Every /model rereads config.json first, so a model added or repriced mid-session is one command away — no restart, and a broken file only warns instead of taking the loaded models away.

optional CLI subscriptions

Claude Code and Antigravity

When the corresponding CLI is installed, /help lists its slash commands. Claude Code uses /cc, /ca, and /cn; Antigravity uses /ag, /aga, and /agn.

These commands use your existing CLI subscription and keep your selected OneLoop model unchanged. The answer comes back as a reference message in this session, so the current model can reason about it. OpenAI subscriptions are supported separately through the Codex provider and ./ol login openai.

no request

Your own commands

Lead a line with ! to run bash yourself. The output is printed, then recorded in the session as reference material — no request is made, so nothing is spent until you ask for something.

(nvidia)> !cargo test 2>&1 | tail -20
(nvidia)> those two failures are mine — fix them
tools

Six tools

read File contents
write Create or overwrite
edit One exact replacement, one file
bash Shell commands
elisp Live Emacs state
skill Load a playbook

Send all the changes you already know to one file in one message; calls on the same file apply in the order sent, so no write is lost. Copy an edit anchor from a current read; after a formatter or shell command changes a file, read it again before citing its text. A miss still writes nothing; when it can, it names the difference that would have matched.

The skill tool joins the other five only when a skill file exists, so a repository with none runs with five.

skills

Skills

Markdown playbooks the model loads on demand.
Not in the system prompt — pulled in only when needed.

~/.oneloop/skills/code-review/SKILL.md
.oneloop/skills/changelog/SKILL.md
.oneloop/skills/migration/SKILL.md

Project skills come first, then global ones — a project skill shadows a global skill of the same name, and listing order is search order.

The model sees names + each skill's own frontmatter description.
It calls skill("name") when the task matches — no user action needed.

reliability

Append-only sessions

Every message, tool call, and result is appended to a JSONL file.
No mutation, no corruption.

.oneloop/sessions/2025-07-11.jsonl
.oneloop/sessions/2025-07-11-001.jsonl
reliability

Handoff

When the server says the context is full, the turn ends.
The session rotates at once; the old one is summarized in the background.

render → tool results named, not quoted; a failure keeps both ends
chunk → half the window, between lines, each part saying which one
summarize → text in, handoff out. No tools, no session, no retry chatter
write → <date>-handoff.md beside the transcript it summarizes

The transcript is never deleted — only moved out of the window.
The handoff names it, and the model can read it if you ask.
A one-shot writes no transcript, so it reports the overflow and stops.

That message is not answered — resend it in the fresh session.
When the handoff is ready, a small line says where it landed.
If its model keeps failing, you pick another at the next prompt.
If it fails, the notice names the transcript that is still there.

reliability

Resilience

Retry with fallbackMakes up to 10 attempts by default on transient failures, then offers another model. The model you pick becomes active for the session once it answers, and config is never written; a rejected request fails at once
Bounded waitsConnections and finite responses time out; an active stream may run long, but a stalled one cannot
Parallel toolsMultiple calls execute concurrently
Atomic writeswrite and edit replace a file by way of a temporary file beside it, so a crash mid-write leaves the old bytes rather than half of the new ones. The mode is carried over, a symlink is followed, and a read-only file — or one in a directory that will not take a new one — is refused instead of replaced
Output truncationLarge outputs trimmed before re-entering context
Stop anywhereCtrl+C stops cleanly; session preserved
AGENTS.mdLoaded as system prompt if present
Engineering tenetsFive built-in rules — correct, look it up, verify, one way, don't break — carried into every prompt, with or without an AGENTS.md
get started

Quick start

# Install the release: oneloop plus the ol alias, into ~/.local/bin
curl --fail --silent --show-error --location \
  https://raw.githubusercontent.com/oneness/OneLoop/main/install.sh | bash
# Interactive REPL
ol
# Hosted model, only if you want one
ol login openrouter
ol login opencode-go
ol login openai  # ChatGPT Plus/Pro
# One-shot, or piped
ol "explain this codebase"
git diff | ol "summarise these changes"
# From a checkout: ./ols runs the pinned local model, ./ol runs the tree
./ols