Agents & Models
Supported agent backends, available models, and how to configure them.
Agentty delegates coding work to external AI agent CLIs running in session worktrees. Install and authenticate at least one backend.
Supported Backendsπ
Each backend's CLI must be on your PATH; Agentty fails at startup with an install hint when none is found.
- Codex (
codex, recommended; supports subscription usage): install the Codex CLI, then runcodex login. - Claude (
claude): install Claude Code, then runclaude auth login. - Antigravity (
agy1.5.8 or newer): install the Antigravity CLI, then runagyand follow its sign-in flow.
All CLI backends run their turns non-interactively inside the session worktree and accept pasted prompt images. Claude and Codex accept chat sent into a running turn; other backends read queued chat on their next turn. See Active Turns.
Agentty uses each provider's official non-interactive CLI or app-server surface (claude -p --input-format stream-json, agy --input-format stream-json, or codex app-server) after you authenticate with that provider's CLI. It does not implement OAuth flows, read provider OAuth tokens directly, or call private provider APIs. You are responsible for choosing an authentication method permitted for your account, plan, and usage pattern.
Permissionsπ
- Chat turns: Codex and Claude run commands with full access, outside the provider sandbox, so browser tests, local services, PTY tools, container runtimes, and tool caches work. Commands are therefore not confined to the session worktree; review the diff.
- Inspection work: Agentty runs reviews, planning, titles, and read-only graph nodes without write access. Codex denies filesystem writes and permission escalation but allows shell network requests. Claude runs without a shell, using
Read,Glob,Grep,WebSearch, andWebFetch. Antigravity denies shell commands and file writes. - Automatic orchestrator turns: a turn Agentty starts on graph events, without the user, runs read-only and keeps its own tools off the web and the network. A protocol repair of the turn runs in the same mode.
- Codex runs it with web search disabled and without shell network access. When the offline process starts, Agentty reads
codex mcp list --jsonandcodex features listfor the session folder, and starts the process with every listed MCP server switched off by name and every feature that is on switched off, including ChatGPT apps, browser and computer use, and plugins, exceptfast_modeandultrafast_mode, which only choose a service tier. A feature Agentty does not know is switched off too. When either list cannot be read, the turn does not start and the chat says why. The lists are read once per offline process. Not confirmed: which features a Codex thread needs to answer at all, so a Codex version that needs one may fail offline turns, which then stop at the cap. - Claude runs it with only
Read,Glob, andGrep, and no MCP server. Hooks in the user's Claude settings still run. Where a managed MCP configuration makes Claude refuse to start without its servers, the turn fails at startup with Claude's reason in the chat and stays counted, so such turns stop at the cap; the mode is never relaxed to start one. - Antigravity denies its commands, file writes, URL reads, page visits, downloads, and MCP tools.
- The in-process harness gives every read-only turn only its
readtool. - On every backend the turn's model requests still reach the provider, and the nodes of the graphs it directs run with their own permissions, network included.
- Codex runs it with web search disabled and without shell network access. When the offline process starts, Agentty reads
- Claude turns can always use
WebSearchandWebFetchwithout a permission prompt, and Claude's file-edit tool cannot edit the main checkout. Treat fetched web content as untrusted, keep web-backed prompts specific, and review the diff before merging. - Codex and Claude load the MCP servers configured for their CLI, including plugin servers and Claude.ai connectors. MCP tools follow the provider's own approval rules.
- Agentty instructs agents to keep project edits inside the worktree. When permissions allow writes, build, test, and recording commands may still use external caches, temporary files, and container storage.
Authentication and Usageπ
Codexπ
Codex supports signing in with ChatGPT through codex login for subscription-backed usage, and Agentty uses the supported codex app-server surface. Usage remains subject to the OpenAI Terms of Use. Other tools take the same route: OpenClaw documents ChatGPT sign-in for its Codex harness, and opencode documents using a ChatGPT Plus or Pro plan with its OpenAI provider.
Claudeπ
For Agentty usage through claude -p, use API-key authentication through Claude Console or a supported cloud provider instead of a Claude Free, Pro, or Max subscription sign-in. Anthropic's Claude Code legal and compliance documentation describes subscription OAuth as intended for Claude Code and native Anthropic applications, while developer integrations should use API keys or supported cloud providers. Theo's explanation video discusses the same uncertainty, but commentary does not guarantee that subscription-backed usage is safe for third-party tool invocation.
If Claude turns or utility prompts fail with authentication_error, Failed to authenticate, or OAuth token has expired, refresh the CLI session and retry:
claude auth login
claude auth statusAntigravityπ
For Agentty usage through agy headless mode, prefer authentication backed by a Google Cloud project or API key over a Google Account subscription sign-in. The Antigravity terms do not currently explain how subscription access applies when third-party tools invoke headless sessions.
Older agy versions are excluded from provider selection; if a session hits one, run agy update. Antigravity keeps conversation context between turns and after a restart.
Agentty no longer runs the Gemini CLI. Sessions and project defaults saved with the Gemini backend now use Antigravity with the same gemini-* models, starting a fresh conversation on their next turn. Install and authenticate agy (see Prepare an Agent Backend) to keep using them.
Project Instruction Filesπ
Agentty relies on each backend's native project-instruction discovery: Codex loads AGENTS.md, Claude Code loads CLAUDE.md, and Antigravity loads AGENTS.md and GEMINI.md. Symlink CLAUDE.md and GEMINI.md to a canonical AGENTS.md to give every backend the same guidance.
The ag-harness agent reads AGENTS.md, or CLAUDE.md when a folder has no AGENTS.md. When a session starts, it loads the global AGENTS.md from Agentty's data directory (~/.agentty/AGENTS.md by default) and the worktree root's file, together cut to 32 KiB. A file in a subfolder reaches the model the first time the session reads or writes a file in that folder or below it. Edits made after a session starts reach only new sessions, except for subfolder files that have not been loaded yet.
Selecting a Backendπ
Use /model to choose an installed backend, then one of its models.
The Projects tab shows installed CLI versions, and updating... while each CLI's native updater refreshes it at startup. If an Antigravity executable changes while Agentty is running, wait for discovery or restart before retrying a turn.
In Settings, choose a model and reasoning level for each project role; models that support fast mode also offer Normal or Fast speed. Other models keep Normal speed. Unavailable backend defaults fall back to an installed backend.
| Role | Used for |
|---|---|
| Smart | New sessions |
| Fast | Titles and commit messages |
| Review | Focused reviews |
Session overrides take precedence, and changing defaults does not alter existing sessions. Default Response Style starts new sessions as Concise, the default, Balanced, or Detailed.
Antigravity maps xhigh and max reasoning to high, except gemini-4-neon and gemini-4-hydrogen, which use xhigh; gpt-oss-120b always uses medium, and gemini-pro-orchestrator-g1-pro ignores the level. Claude maps both to max, which claude-opus-5-5 supports. Codex supports a distinct max effort.
Subagent Limitsπ
Agentty limits each Codex or Claude session to two concurrent subagents, excluding the parent. Change this with the global Max Subagents setting (1, 2, 4, or 8) and restart Agentty to apply it.
Codex limits concurrently open child-agent threads. Claude limits ordinary subagent spawning, though provider exceptions such as resumed subagents can exceed it. Enforcement depends on the installed CLI. Antigravity subagents are not capped. These are per-session provider limits, not host-wide CPU or memory limits.
Build Job Capsπ
A graph node that changes files runs its commands with parallel build and test work capped at your cores divided by the global Graph Writers setting, and at least one. The caps only ever lower what the environment you started Agentty with asks for:
CARGO_BUILD_JOBS,NEXTEST_TEST_THREADS,RUST_TEST_THREADS, andAGENTTY_BUILD_JOBSget the cap when they are unset or set to a larger whole number. A smaller number, and a value that is not a positive whole number, are left as they are.MAKEFLAGSgets-jwith the cap, keeping its other options and placed before any--, only when it asks for more jobs than the cap or for unlimited jobs. It is left as it is when it asks for fewer jobs or none, when it carries a runningmakejobserver, and when it cannot be read with certainty, such as with backslash escapes.
Wrappers of other toolchains can read AGENTTY_BUILD_JOBS. An environment variable overrides a configuration file, so a writer's cap also overrides a smaller job count pinned in a project's .cargo/config.toml or .config/nextest.toml. To keep such a limit, set the variable to it in the environment you start Agentty with, or lower Graph Writers until the cap is no larger.
| Backend | How commands receive the caps |
|---|---|
| Harness | Granted to bash in the native sandbox |
| Claude | Environment of the claude process, which its Bash tool inherits |
| Codex | Environment of codex app-server, also set in shell_environment_policy |
| Antigravity | Environment of the agy process; not verified to reach sandboxed commands |
Codex applies shell_environment_policy.include_only after the values Agentty sets, so an include_only list in your Codex configuration that omits these variables removes the caps from its commands. The values also appear on the codex app-server command line.
The caps are environment variables, not enforced limits: a command that picks its own job count, or a tool that reads none of them, is not capped. Only graph writer turns are capped, not chat turns, one-shot assistance such as commit messages and rebase help, or the Git commit hooks Agentty runs itself. A writer that is already running keeps the cap it started with when Graph Writers changes.
Token Usage Reportingπ
Agentty records the tokens each session uses per model, with the work they served: session turns, titles, commit assistance, focused reviews, rebase assistance, or other utility prompts. Input counts include prompt-cache reads and writes, matching the providers' own counts. A detail a backend does not report is kept as unknown, never as zero, and a turn that reports no counts is recorded as unreported with no charge. Estimated charges are not bills.
| Backend | Cache reads | Cache writes | Reasoning | Context window | Estimated charge |
|---|---|---|---|---|---|
| Harness | Yes | Anthropic | Not Anthropic | Yes | List price of cataloged models |
| Claude | Yes | Yes | Yes | Yes | Claude Code's own, or list price |
| Codex | Yes | Yes | Yes | Yes | OpenAI list price, when listed |
| Antigravity | Yes | No | Yes | No | None |
Claude Code reports each model's tokens and estimated cost, subagents included, as running totals that a resumed session carries over on Claude Code 2.1.277 and later. A resumed turn continues the most recent conversation in the session's worktree, which a chat turn, task agent, or utility prompt may have left. Agentty therefore keeps one set of totals per session, replaced by every Claude run in the worktree, and charges the next resumed turn the difference. Runs elsewhere, such as a draft title generated in the project folder, leave it unchanged. A model without a known price is charged at the Anthropic list price. When the difference cannot be trusted, the turn falls back to its main-conversation tokens at the Anthropic list price. This happens on the first resumed turn after upgrading Agentty, when the Claude Code release is unknown, or when the previous Claude run reported no totals. While a Claude turn runs, its live figures use the list price.
A model without a declared cache price has its cached input priced at the input price, so its estimate is an upper bound.
Subscription Loginsπ
Usage billed to a subscription plan has no per-token charge, so Agentty shows its API equivalent instead: the same tokens at the provider's API list prices.
| Backend | Detected when | Priced at |
|---|---|---|
| Harness | A chatgpt/ plan model runs. | Same-named OpenAI API model, else unknown |
| Claude | Claude Code uses no API key and Anthropic's own API. | Claude Code's own estimate, or Anthropic list prices |
| Codex | Codex reports a ChatGPT login. | OpenAI list prices |
A Claude run through a bearer token, a gateway, or a cloud provider such as Amazon Bedrock is charged per token and keeps a plain estimate: Agentty treats a run as metered when its environment sets ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, or a CLAUDE_CODE_USE_* switch. Claude Code releases that do not name the provider in their usage cannot be told apart from those, so their runs also keep a plain estimate. While a Claude turn without an API key runs, its live usage shows tokens without a cost until its result names the provider. Detection for Claude and Codex is tested against recorded protocol messages, not live logins.
Available Modelsπ
Pickers show only the models below. Stored project defaults and active sessions that reference a superseded model, such as gemini-3.1-pro-preview or gemini-3.5-flash-lite, are upgraded to its replacement; finished sessions keep their historical model.
Antigravity Modelsπ
gemini-4-neon(default): Gemini 4 Neon model with extra-high reasoning effort.gemini-4-argon: Gemini 4 Argon model.gemini-4-hydrogen: Gemini 4 Hydrogen model with extra-high reasoning effort.gemini-pro-orchestrator-g1-pro: Orchestrator (Argon) model that coordinates subagents.gemini-3.8-flash: Fast Gemini model for agentic and multimodal tasks.claude-opus-5-5andclaude-sonnet-5-5: Claude models served through Antigravity.gpt-oss-120b: Open-weight GPT-OSS 120B model served through Antigravity.
Claude Modelsπ
claude-fable-5-2(default): Claude Fable model for creative, narrative-heavy tasks.claude-opus-5-5: Latest Claude Opus model for complex agentic tasks.claude-sonnet-5-5: Balanced Claude model for quality and latency.claude-haiku-5-5: Fast Claude model for lighter tasks.
Codex Modelsπ
gpt-6-astra: Most capable Codex model for the hardest end-to-end work.gpt-6.1-sol(default): Near-Astra Codex model for complex work at a lower cost.gpt-6-luna: Efficient Codex model for focused, high-volume tasks.gpt-5.6-terra: Current Codex model for balanced coding performance.gpt-5.3-codex-spark: Codex spark model for quick coding iterations.
Harness Modelsπ
Listed under ag-harness in /model, alongside local models stored as openai-compatible/<model>:
- Muse:
muse-spark-1.3and the discountedmuse-spark-1.3-contributor. - Kimi:
kimi-k3(latest) andkimi-k2.6. - Qwen:
qwen3.8-max,qwen-plus,qwen3.8-flash, andqwen3.7-flash. - ChatGPT plan:
chatgpt/gpt-6.1-sol,chatgpt/gpt-6.1-terra,chatgpt/gpt-6-astra,chatgpt/gpt-6-sol,chatgpt/gpt-6-luna,chatgpt/gpt-5.6-sol,chatgpt/gpt-5.6-terra, andchatgpt/gpt-5.6-luna. - OpenAI API:
gpt-6.1-sol,gpt-6-astra,gpt-6-luna, andgpt-5.6-terra. - Anthropic API:
claude-sonnet-5-5,claude-opus-5-5,claude-fable-5-2, andclaude-haiku-5-5.
Each request fits within an input budget below the model's context window, leaving out older turns that no longer fit, including after switching to a smaller model. A turn whose task needs more than the window holds stops once it mostly re-reads the same results that had to be removed to fit, reporting that the task does not fit the model's context window: use a model with a larger window, or raise the window configured for a local server. A turn that also reaches something new for each result it re-reads is not stopped.
Switching Modelsπ
Use /model to change the current session's backend and model, /reasoning to change reasoning effort, and /style to choose answer length; see Slash Commands. While a turn runs, model and speed changes wait for queued work.
/fast toggles the session between Normal and Fast speed, which reduces latency at higher provider cost. It is supported by claude-opus-5-5 and every Codex model except gpt-5.3-codex-spark; on other models it shows an error and keeps the current model. Choosing an incompatible model resets speed to Normal. Antigravity has no speed control. See the provider guides for Codex fast mode and Claude Code fast mode.
Session changes do not alter project defaults; change those in Settings.
Harness Agentπ
/model lists an ag-harness agent after the installed agent CLIs. It runs Agentty's built-in agent loop instead of an external CLI, against a free local model server or a paid hosted provider:
| Provider | Cost | Key imported from | Endpoint |
|---|---|---|---|
| Local server | Free | Optional OPENAI_COMPATIBLE_API_KEY | Optional OPENAI_COMPATIBLE_BASE_URL |
| Muse | Paid | MODEL_API_KEY | Optional MODEL_API_BASE_URL |
| Kimi | Paid | KIMI_API_KEY | Optional KIMI_BASE_URL |
| Qwen | Paid | DASHSCOPE_API_KEY | Required DASHSCOPE_BASE_URL |
| OpenAI | Paid | OPENAI_API_KEY | Optional OPENAI_BASE_URL |
| Anthropic | Paid | ANTHROPIC_API_KEY | Optional ANTHROPIC_BASE_URL |
| ChatGPT plan | Plan | ag-harness login chatgpt sign-in | Optional CHATGPT_BASE_URL |
Kimi defaults to Moonshot AI's international endpoint, https://api.moonshot.ai/v1; set KIMI_BASE_URL to use another, such as https://api.moonshot.cn/v1.
Harness API keys live in ~/.agentty/auth/api_keys.json (or $AGENTTY_ROOT/auth/api_keys.json), readable only by you. Pressing Enter on a hosted /model row whose provider has no stored key opens a popup where you paste the key; Agentty saves it and switches the session to the model. A key exported in the table's variable is copied into the file the first time Agentty finds none stored for that provider; after that the file wins and the variable is ignored. To replace a key, edit its entry in the file, or remove the entry and select that provider's model in /model to paste a new key.
/model lists every hosted model, but one runs only once its key, sign-in, or local server is available: a model without its key asks for it, and a chatgpt/ model offers its sign-in. While an agent CLI is installed, new sessions keep starting on the configured CLI model. Without one, Agentty starts only when a harness model is ready or you picked a local model earlier, and new sessions start on it; a model that still needs a key or sign-in is never chosen as the default.
- Inspection turns can read the worktree. Chat turns can also write files and run
bash. Provider keys and endpoints are removed from thebashenvironment. -
bashruns in the operating system's sandbox where it is available: Seatbelt on macOS, Bubblewrap on Linux. Commands can read the disk but write only the session worktree's files and the session's own temporary directory. Credential stores such as~/.ssh,~/.aws,~/.config/gh, the keychains, and browser profiles stay hidden, and so do Agentty's database, pasted images, harness history, stored API keys, and ChatGPT sign-in. Agentty shows a[Sandbox]hint when a command may have been blocked, and never reruns one outside the sandbox on its own. Commands inside the sandbox haveAGENTTY_SANDBOX=1in their environment, so a project's checks can skip what cannot pass there; commands that run without the sandbox do not. - When a command needs to run outside the sandbox, such as one that uses the Podman machine, the agent asks with a reason. At the end of the turn the session asks Run outside the sandbox? as a question, showing the exact command and the reason. Choose Run it outside the sandbox to allow it once in the next turn, Always run this command outside the sandbox in this session to allow that exact command for the rest of the session, or Keep it in the sandbox. An allowed command runs with your full access and a minimal environment, without the session's temporary directory. Agentty shows only commands of printable ASCII characters, so what you approve is exactly what runs. Questions from graph nodes and task agents never offer this.
- Commands keep network access, including to services listening on
localhostsuch as local databases or a Docker TCP socket, but cannot reach Unix sockets: not Docker's, and not the SSH agent's, so Git over SSH with agent keys fails inside a session. Agentty pushes outside the sandbox itself. The Podman machine's SSH keys and container registry credentials are hidden too, sopodmancannot reach its machine from a session. - Environment variables that look like credentials (names containing
TOKEN,SECRET,PASSWORD, orCREDENTIAL, ending in_KEY, connection strings such asDATABASE_URL, the OpenTelemetry exporter'sOTEL_EXPORTER_OTLP_HEADERSand its per-signal forms such asOTEL_EXPORTER_OTLP_TRACES_HEADERS, and everyAWS_,GH_,GITHUB_, andGITLAB_variable) never reach commands, besides the model providers' keys. The GitHub CLI is therefore unauthenticated inside a session. - Git metadata is read-only: commands can run
git status,git diff, andgit log, butgit add,git commit,git stash, and creating or switching branches fail. Agentty commits the session's changes itself after each turn, so nothing is lost. A repository a command creates elsewhere, such as withgit initin the temporary directory, is its own and works normally. Agentty's own Git ignores replacement refs and grafts. Where commands run without the sandbox and the session's base branch moves or disappears during a turn, Agentty commits and publishes nothing and says how to restore it. A session turn still keeps its answer and questions, and its changes are committed after the next turn; a task or graph node fails. No turn starts while the base does not resolve. - The temporary directory,
~/.agentty/harness/<session>/tmp/, holds the Cargo (CARGO_HOME), npm, Go, pip, andXDG_CACHE_HOMEcaches of that session only, and is removed with the session; host tools and other sessions never read it. Commands can change anything inside it, but cannot move or remove the directory itself. - Rust projects keep a Cargo download cache in
~/.agentty/cache/cargo/, one per project. When a session's worktree has aCargo.locknaming crates.io packages the cache lacks, Agentty fetches them outside the sandbox in the background, when the session starts and before each turn, and shows a short note in the session. The fetch reads only the lockfile's crates.io entries, never the worktree's manifest, so Git dependencies, path dependencies, and other registries a session names are never fetched. It also reads none of your Cargo configuration or credentials: it runs your default toolchain'scargoin a fresh directory underXDG_RUNTIME_DIRorTMPDIR, used only when no other user can write above it (a shared/tmpdoes not qualify, so without such a directory Agentty does not cache), with its own empty Cargo home, passing on onlyPATH,HOME, therustupsettings, and proxy and certificate variables, and it keeps only archives from crates.io itself. If your network reaches crates.io only through a mirror, the fetch fails quietly and sessions keep downloading per session. From the next turn, Agentty copies the cached archives the session's lockfile names into its ownCARGO_HOME, each checked against the lockfile's checksum, so locked builds download only what the cache misses. Sandboxed commands cannot read or write the cache, and what one session changes in its ownCARGO_HOMEnever reaches another. The cache holds the crates.io archives your projects' lockfiles pinned, and Cargo removes those no fetch used for three months; delete~/.agentty/cache/cargo/to reclaim the space at any time. Projects that replace crates.io in their own.cargo/config.toml, Git dependencies, and other tools' caches are still downloaded per session, and a failed fetch only means the session downloads its dependencies itself. -
Share Host Caches, a project setting that is off by default, makes the next turn of every session in the project use your own Cargo registry and Git dependencies, Go module and build caches, pip cache, and npm cache instead, so dependencies download once. The setting is per project, but the caches are not: a session in this project could plant code that later runs in the builds of all your other projects and of your own terminal. Leave it off unless you trust every session in this project with that. - Cargo's programs, configuration, and credentials stay out of reach, and sessions do not clean the shared Cargo cache. Agentty creates Cargo's cache directories when they are missing; Go, pip, and npm caches that do not exist yet stay per session. A cache that is a link, lies outside your home directory, in its
Library, or onPATH, overlaps the worktree or another shared cache, or has a hard-linked lock file also stays per session, and the session says which. On macOS that includes the default Go build and pip caches under~/Library/Caches; pointGOCACHEorPIP_CACHE_DIRelsewhere in your home directory to share them. Commands can change what is inside a shared cache, but cannot move or remove the cache directory itself. One-shot utility prompts, such as titles and commit messages, never share caches; sync conflict assistance runs in the session and does. Turning the setting off returns later turns to the session's own caches. - While the setting shares your Cargo caches, it takes the place of the project's Cargo cache: your own registry already keeps every download, so nothing is copied in. When your Cargo caches cannot be shared, sessions use the project's Cargo cache, as with the setting off.
- Your Cargo configuration still applies: Cargo finds
~/.cargo/config.tomlabove a worktree in the home directory, and otherwise Agentty links yourCARGO_HOME's configuration into the sandbox before each turn, replacing whatever configuration or credential files commands left there. Other settings kept in~/.cargodo not reach sandboxed commands. - Commands cannot install toolchains or tools into the home directory:
rustuptoolchain installs (including those arust-toolchain.tomltriggers),go installinto~/go/bin, and Gradle, Maven, or pnpm homes in~/.gradle,~/.m2, or the pnpm store fail. Install them in a terminal outside the session, then run the session's commands again. - Where the sandbox cannot run, commands run without it, and the session shows a
[Sandbox Warning]as soon as the turn starts, naming what is missing and how to fix it. It appears once, and again when the reason changes or after the sandbox worked in between, which a[Sandbox]note confirms. On Linux, install Bubblewrap (for examplesudo apt install bubblewrap), allow unprivileged user namespaces, and run kernel 6.2 or later; on macOS, start Agentty outside other sandboxes. Restart Agentty after upgrading it, since the running process uses its own executable as the sandbox helper. Sync conflict assistance and execution-graph task turns in a session warn the same way. Merge conflict assistance, commit assistance, and other utility prompts never run commands without the sandbox: where it cannot run they fail with the same fix. - Messages and reasoning stream into the session's live timeline in the order the model makes them, and its tool calls are counted below them, with a
Preparing a tool callrow while tool arguments arrive; each call row shows what the call acted on: a path, a search query, or a command. A command counts as failed when its own exit status is nonzero, including a failing stage before a pipe such ascargo test | tail -20, or when it runs past its time limit, and so does a rejected edit. Streamed text is replaced by the saved answer when the turn ends, and only the saved answer is kept, below a summary of the turn's edits, failures and recoveries, and explorations; a stopped or failed turn keeps that summary and its error notice. - Each model response is capped at 32,000 tokens, or 30% of the model's output limit when that is larger, and never more than the model's output limit or the context the prompt leaves, so a runaway response stops in minutes.
chatgpt/plan models accept no cap, so their responses run uncapped. When a response hits its cap, the harness keeps what the model wrote and asks it to finish in smaller pieces, at most twice in a row. A tool call cut short never runs; the model is told to resend it smaller. A gateway such as OpenRouter may report a response cut off inside a tool call as an ordinary tool call; it is recognized as cut off when the provider's own finish reason reports the output limit or, without such a reason, the response used its whole cap. If the third response is still cut off, the turn ends with the partial answer under an[Incomplete Answer]notice instead of failing. Commit messages, titles, and other background prompts have no notice to show, so they fail instead. - A clarification question is checked before it is shown: its text must be nonempty and at most 2,000 characters, with at most 5 options of 1 to 300 characters each. The harness asks the model to correct a question outside these bounds, at most twice, and fails the turn if it still is.
- Commit messages, titles, and focused reviews use the project's default models when their agent CLI is installed, otherwise the session's harness model.
- History is stored per session under
~/.agentty/harness/and removed with the session. Pasted images are not supported yet; such prompts fail before reaching the model. - A content-free report of each turn, also one that failed but not one that was stopped while it ran (token usage, context fitting, corrections, and tool activity), is kept in the
harness_turn_reportdatabase table, including after the session is deleted. - A session can switch models between turns. A model from another provider sees earlier reasoning as short notes of at most 1 KiB each, and switching back restores it.
- Long sessions compact automatically: once earlier turns nearly fill the model's context window, or no longer fit the history the session replays (at most 256 KiB), the harness summarizes them before the turn and later turns carry the summary instead. The session view then shows a
[Context]notice naming the model that wrote the summary, or a[Context Warning]when summarizing failed and the oldest turns were dropped instead; after a failure the session waits one turn, then a doubling number up to 32, before summarizing again; switching the session's model ends the wait, and changing the Default Fast Model does not. These notices are never sent to models. The summary runs on the Default Fast Model when it is a ready harness model with structured output, such asmuse-spark-1.3-contributor,gpt-6-luna,claude-haiku-5-5, or achatgpt/model, and otherwise on the session's own model; Qwen, Kimi, and local models declare no structured output. Its tokens count toward the session's usage, and its report entry is priced at the summarizing model's prices. Task agents and graph nodes do not compact.
Settings β Default Fast Model also lists every ready harness model with its price class, such as harness/qwen3.8-flash Β· cheap, to run commit messages and titles for every session type, and to summarize long harness sessions when it has structured output, which this Qwen example lacks. Agentty never picks a harness model for this itself; while the chosen model is not ready, the Fast default falls back as if unset. Settings β Default Review Model lists the same ready harness models to run focused reviews; while the chosen one is not ready, reviews use the Default Smart Model.
Choosing a Modelπ
In any session, /model lists ag-harness after the installed agent CLIs. Choosing it lists every harness model: local models first, marked [local] with their context window and server, then hosted models marked [paid] with the same descriptions as the other agents' models, with OpenAI and Claude models last:
[local] qwen3:latest runs 32k ctx Β· Ollama
[local] gemma:latest no tool calls Β· Ollama
[paid] muse-spark-1.3-contributor Cheap Muse Spark tier; Meta may train on its promptsβ¦
[paid] kimi-k3 Latest Kimi model served through the native harness.
[paid] gpt-6.1-sol Near-Astra Codex model for complex work at a lower cost.
[paid] claude-opus-5-5 Latest Claude Opus model for complex agentic tasks.Switching a session between ag-harness and a CLI agent keeps the conversation: the next turn replays the session transcript to the new agent.
Price classes follow each provider's list price per million output tokens: cheap is at most $2.50, premium at least $15, and standard in between. The cheap models, muse-spark-1.3-contributor, qwen-plus, qwen3.8-flash, qwen3.7-flash, and gpt-6-luna, and claude-haiku-5-5, suit simple work such as titles and commit messages. Meta may train on prompts and completions sent to muse-spark-1.3-contributor.
Pressing Enter on a row that needs an API key or sign-in opens a popup to provide it. On a row that cannot run a turn otherwise, such as a model without tool calls or a provider without its base URL, it keeps the current model and shows what is missing, such as `qwen3.8-flash` needs `DASHSCOPE_BASE_URL`. The list refreshes each time you open it, so newly pulled models and started servers appear without a restart.
The harness model you pick never changes the project default model. It becomes the model new sessions start on when no backend CLI is installed. Until you pick one, those sessions prefer a ready local model, then the first ready paid model in list order. An imported API key, such as OPENAI_API_KEY or ANTHROPIC_API_KEY set for other tools, therefore never displaces a ready local model or a provider listed before it; when nothing else is ready, its first model, gpt-6.1-sol or claude-sonnet-5-5, becomes the default. A remembered local model stays the default while its server is stopped; a remembered paid model whose key is gone gives way to the next ready model.
OpenAI Modelsπ
The harness runs gpt-6.1-sol, gpt-6-astra, gpt-6-luna, and gpt-5.6-terra through OpenAI's Responses API with a paid OpenAI Platform API key: choose a gpt-* model under ag-harness in /model and paste the key, or export OPENAI_API_KEY before the first launch to import it.
- Usage is billed to the key's organization. To use a ChatGPT subscription instead, pick a
chatgpt/model (ChatGPT Plan Models) or run a Codex session. OPENAI_BASE_URL(defaulthttps://api.openai.com/v1) selects another Responses API endpoint.- Each request resends the session history, billed at OpenAI's cached-input rate where cached. Prompts over 272,000 input tokens cost twice the input rate, which long sessions can reach.
ChatGPT Plan Modelsπ
Models with a chatgpt/ prefix, such as chatgpt/gpt-6.1-sol, use the same Responses API billed to your ChatGPT plan instead of API credits. Sign in once; the harness stores and refreshes the sign-in in ~/.agentty/auth/chatgpt.json (or $AGENTTY_ROOT/auth/chatgpt.json, or CHATGPT_AUTH_FILE):
ag-harness login chatgpt
agentty # then choose a chatgpt/ model under ag-harness in /model- Usage counts against your plan's limits.
- Pressing
Enteron such a row, or sending a prompt on a signed-outchatgpt/model, opens a sign-in popup that opens your browser and then switches the session to the model. - A
chatgpt/model always uses the plan and a baregpt-*model always uses the stored OpenAI API key; neither falls back to the other.
Claude Modelsπ
The harness runs claude-sonnet-5-5, claude-opus-5-5, claude-fable-5-2, and claude-haiku-5-5 through Anthropic's Messages API with a Claude Console API key: choose a claude-* model under ag-harness in /model and paste the key, or export ANTHROPIC_API_KEY before the first launch to import it.
- Usage is billed to the key's Console organization at API rates, never to a Claude subscription.
ag-harnessand the claude agent share these model names and descriptions but not their backend:ag-harnessrows, badged[paid], always use the stored Anthropic API key, andclauderows always use theclaudeCLI; neither falls back to the other. Settings and the status bar show them asclaude/<model>andharness/<model>, and harness rows in Settings add their price class, such asharness/claude-haiku-5-5 Β· cheap.ANTHROPIC_BASE_URL(defaulthttps://api.anthropic.com/v1) selects another Messages API endpoint. It also accepts the origin alone, such ashttps://api.anthropic.com, as Anthropic's SDKs and Claude Code read it.- Each request resends the session history, billed at Anthropic's cache-read rate where cached. A
claude-haiku-5-5request whose prompt exceeds 100,000 tokens, cached tokens included, costs five times its listed rates, which long sessions can reach; reported costs include it. - When fitting a long session to the context window rewrites earlier turns, Anthropic may refuse the reasoning recorded after them: always for
claude-fable-5-2, and for the 5.5 models only on API keys of organizations created on or after August 31, 2026. The harness then has the API drop that reasoning, re-sending a refused 5.5 request once, and the model continues without it; older organizations keep it on the 5.5 models. ANTHROPIC_variables andCLAUDE_CODE_OAUTH_TOKENare removed from thebashenvironment.
Local and Self-Hosted Modelsπ
Agentty lists the models served by an OpenAI-compatible Chat Completions endpoint, by default Ollama at http://127.0.0.1:11434/v1, so a running Ollama needs no configuration. Other servers, such as llama.cpp llama-server, LM Studio, or vLLM, are listed through their models endpoint.
OLLAMA_CONTEXT_LENGTH=32768 ollama serve # or raise the Ollama app's context length
agentty| Variable | Default | Meaning |
|---|---|---|
OPENAI_COMPATIBLE_BASE_URL | http://127.0.0.1:11434/v1 | Endpoint including /v1; Ollama's default |
OPENAI_COMPATIBLE_API_KEY | None | Bearer token, such as vLLM's --api-key |
OPENAI_COMPATIBLE_MODEL | None | Model to list when the server lists none |
OPENAI_COMPATIBLE_CONTEXT_WINDOW | Reported, else 32768 | Tokens the server runs the model with |
OPENAI_COMPATIBLE_MAX_OUTPUT_TOKENS | A quarter of the window | Tokens reserved for each response, β€ 8192 |
OPENAI_COMPATIBLE_REPORTED_COST | 1 | 0 ignores the cost the endpoint reports |
- The model must support tool calls. Typical base URLs are
http://127.0.0.1:8080/v1forllama-server,http://127.0.0.1:1234/v1for LM Studio, andhttp://127.0.0.1:8000/v1for vLLM. - Ollama loads models with a 4,096-token window unless
OLLAMA_CONTEXT_LENGTHor the app setting raises it, and silently drops the start of longer requests. Agentty reads the window an Ollama model runs with before each turn, fits requests to it, and stops the turn below 16,384 tokens, asking you to raise the window. The picker shows a loaded model's running window, as inruns 4k ctx, needs 16k, or otherwise its maximum, as inup to 40k ctx. - Other servers, and hosted gateways such as OpenRouter, state the window in their models listing (
context_length,context_window,max_model_len, and similar fields). Agentty reads it before each turn, with the largest response the server writes, and the picker shows it asruns 1M ctx. A listing that cannot be read never fails the turn: Agentty reuses the window the server last reported while it runs. A listed window below 16,384 tokens stops the turn unless you set the window yourself. - For servers that report no window, Agentty assumes 32,768 tokens and the picker says so, as in
assumes 32k ctx. SetOPENAI_COMPATIBLE_CONTEXT_WINDOWto the window the server actually uses; the picker then showsset to 40k ctx. A set window replaces one a listing says the model supports, and is capped by a window the server enforces: the one Ollama has loaded, vLLM'smax_model_len, or a listedloaded_context_length. Agentty budgets input for these models with a 50% margin. - These models have no list price, so their usage shows tokens without a cost unless the endpoint reports what it charged: a gateway such as OpenRouter sends each response's cost as
usage.cost, and Agentty shows that amount, taking it to be US dollars. Agentty reads it only from the endpoint you configure inOPENAI_COMPATIBLE_BASE_URL, never from another provider. A response the gateway billed to your own provider key (is_byok) shows no cost, because the gateway's figure leaves out what the provider charges you directly. For a gateway that reports credits or another currency, setOPENAI_COMPATIBLE_REPORTED_COSTto0orfalse, and usage shows tokens only;1ortrueis the default, and any other value fails the turn. - The reasoning level is not sent; the model uses its server default.
- Reasoning models that write
<think>blocks into their reply, such as DeepSeek-R1, work as-is: Agentty drops the reasoning and accepts a plain-text reply as the answer.