<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Jed Arden</title><description>Everything published on jedarden.com — notes, guides, and TILs on headless LLM systems, agent orchestration, and platform engineering.</description><link>https://jedarden.com/</link><item><title>Claude Code Pricing: What It Costs, and How to Run It Free</title><link>https://jedarden.com/guides/claude-code-pricing/</link><guid isPermaLink="true">https://jedarden.com/guides/claude-code-pricing/</guid><description>Claude Code starts at $20/month with Pro. Free provider tiers and local models can power it too; here are the limits, setup steps, and trial results.</description><pubDate>Sat, 14 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Claude Code costs $20/month on Pro, $100 on Max, or $200 on Ultra; Team starts at $20 per seat per month with annual billing. You can also pay per API token. Anthropic&apos;s Free chat plan does not include Claude Code.&lt;/strong&gt; You can install the terminal client and connect a different model through a compatible endpoint, including some providers&apos; free APIs or a local model. That makes inference free within its allowance; it does not give you Claude&apos;s models free. These prices and the paid-plan inclusion were checked against &lt;a href=&quot;https://claude.com/pricing&quot;&gt;Anthropic&apos;s pricing&lt;/a&gt; and &lt;a href=&quot;https://code.claude.com/docs/en/costs&quot;&gt;Claude Code&apos;s cost documentation&lt;/a&gt; on &lt;strong&gt;November 14, 2026&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — &lt;strong&gt;Cost:&lt;/strong&gt; Pro $20/month, Max $100, Ultra $200; Team and per-token billing are other routes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Is it free?&lt;/strong&gt; Anthropic&apos;s Free chat plan does not include Claude Code. Other providers&apos; free models or a local model can power the client instead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What worked here:&lt;/strong&gt; OpenRouter&apos;s free model completed one small task, then rate limited; a small local model on a CPU connected but did not finish. &lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; Flash answered with a Coding Plan key; a free-only key was not tested.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Old free lists need checking:&lt;/strong&gt; Cerebras is now a card-backed trial, GitHub Models is retired, and OpenCode&apos;s free chat models require its own client.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you pay, use all of it:&lt;/strong&gt; the allowance is prepaid, and whatever is left at the reset is gone. Buy a small plan and run it to the limit, or buy Ultra and commit to filling it with finished work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The cheapest paid step up:&lt;/strong&gt; OpenCode Go is $10/month, documented for Claude Code but not run here; the fleet-tested GLM Coding Plan starts at $18. Pro at $20 buys a direct Anthropic subscription.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;lt;span id=&quot;paid-routes&quot;&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;div data-ccpricing=&quot;costs&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Monthly USD&lt;/th&gt;
&lt;th&gt;Terms, annual options and token rates&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Pro&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;$200 annual upfront, advertised $17/month equivalent; shared chat/code allowance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Max&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;5x Pro usage; $100 monthly API credits.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Ultra (formerly Max 20x)&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;10x Pro weekly; no five-hour limit for verified accounts; $200 API credits.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team Standard&lt;/td&gt;
&lt;td&gt;$25&lt;/td&gt;
&lt;td&gt;$20/seat/month annually; 2–150 people; Claude Code included.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team Premium&lt;/td&gt;
&lt;td&gt;$125&lt;/td&gt;
&lt;td&gt;$100/seat/month annually; 5x Standard usage.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic API&lt;/td&gt;
&lt;td&gt;Metered&lt;/td&gt;
&lt;td&gt;Per 1M tokens: Haiku 5.5 $0.10 input / $0.50 output for prompts up to 100K; $0.50 / $2.50 above. Sonnet 5.5 $2 / $10; Opus 5.5 $4 / $20. Caching/tools affect bill.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other-provider free tier / local&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;Non-Claude model; quotas, data policy, local hardware and compatibility apply.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode Go&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;Paid third-party route; vendor validates Claude Code but does not promise continued compatibility. Not run here; model-specific limits and data terms. Catalog also lists Claude Haiku 5.5.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM Coding Plan Lite&lt;/td&gt;
&lt;td&gt;$18&lt;/td&gt;
&lt;td&gt;From $18/month; native Claude Code pairing used by this fleet since July 2026. Credits and concurrency limits apply; GLM models.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Team is for two to 150 people. The $200 tier is &lt;strong&gt;Ultra, formerly Max 20x&lt;/strong&gt;; Max now names the $100 tier. Pro&apos;s annual price is advertised as $17/month, with $200 paid upfront. A subscription has usage limits, and chat shares its pool with code. See the &lt;a href=&quot;/guides/claude-pro-vs-max-vs-ultra/&quot;&gt;measured Pro, Max and Ultra comparison&lt;/a&gt; for choosing among those allowances.&lt;/p&gt;
&lt;p&gt;For API budgeting, Haiku 5.5 costs $0.10 input/$0.50 output per million tokens for prompts up to 100K tokens, rising to $0.50/$2.50 above that threshold. Opus 5.5 costs $4/$20. Those are standard uncached token prices, not a monthly bill prediction. The &lt;a href=&quot;https://platform.claude.com/docs/en/about-claude/pricing&quot;&gt;API price schedule&lt;/a&gt; covers cache writes, cache hits and other charges; the terminal&apos;s local cost estimate is not an invoice.&lt;/p&gt;
&lt;h2&gt;How a different provider can answer Claude Code&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;This fleet has run Claude Code against a non-Anthropic endpoint in production since July 2026, using these same endpoint, credential and model variables.&lt;/strong&gt; The &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;GLM Coding Plan study&lt;/a&gt; records about &lt;strong&gt;116,000 sessions and 1.5 million model calls&lt;/strong&gt;. Connecting another model is the same mechanism used by that paid production setup; a free model&apos;s allowance and entitlement are separate questions.&lt;/p&gt;
&lt;p&gt;Claude Code sends messages, tool definitions and tool results. The endpoint must understand that protocol; changing a URL alone does not translate it. There are two useful cases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Native Anthropic compatibility.&lt;/strong&gt; The provider exposes a Messages endpoint itself. OpenRouter and current Ollama do this, so Claude Code can connect directly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An OpenAI-compatible API.&lt;/strong&gt; Gemini&apos;s compatibility endpoint, Groq and several other providers speak a different message format. Put a translating gateway on &lt;code&gt;127.0.0.1&lt;/code&gt;; Claude Code speaks Anthropic to it, and it speaks the provider&apos;s format upstream.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The current &lt;a href=&quot;https://code.claude.com/docs/en/llm-gateway-connect&quot;&gt;gateway connection documentation&lt;/a&gt; names &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; for the destination, &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; for a bearer credential, and &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; for an &lt;code&gt;x-api-key&lt;/code&gt; credential. A settings file can set those under &lt;code&gt;env&lt;/code&gt;; a shell export works for processes launched in that terminal. Settings can override the shell, so inspect &lt;code&gt;/status&lt;/code&gt; if a change appears ineffective. Keep credentials out of shared settings.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://code.claude.com/docs/en/model-config&quot;&gt;model configuration documentation&lt;/a&gt; names &lt;code&gt;ANTHROPIC_DEFAULT_SONNET_MODEL&lt;/code&gt;, &lt;code&gt;ANTHROPIC_DEFAULT_OPUS_MODEL&lt;/code&gt;, &lt;code&gt;ANTHROPIC_DEFAULT_HAIKU_MODEL&lt;/code&gt; and &lt;code&gt;CLAUDE_CODE_SUBAGENT_MODEL&lt;/code&gt;. Pin every class to a model that exists upstream. The fleet&apos;s GLM adapters use these same destination, bearer-token and model overrides.&lt;/p&gt;
&lt;p&gt;Anthropic documents the connection mechanism, but &lt;a href=&quot;https://code.claude.com/docs/en/llm-gateway&quot;&gt;does not support routing to non-Claude models&lt;/a&gt;. A model advertising tool calling also does not establish that its tool loop works correctly with this particular client. The trial below separates those claims.&lt;/p&gt;
&lt;h2&gt;Which providers actually offer a free route today?&lt;/h2&gt;
&lt;p&gt;&amp;lt;span id=&quot;free-provider-table&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Every allowance below was re-read from the provider&apos;s own pages on &lt;strong&gt;November 14, 2026&lt;/strong&gt;. A dash means the vendor sends you to your account&apos;s limits page or does not publish a stable figure; it does not mean unlimited. Context is the selected model&apos;s advertised window, which can exceed your free account&apos;s request-size or token-rate limit. Tool support in this table is documented capability; the trial below shows which tool loops were exercised here.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ccpricing=&quot;allowances&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider / selected models&lt;/th&gt;
&lt;th&gt;Free allowance&lt;/th&gt;
&lt;th&gt;Agent turns/day&lt;/th&gt;
&lt;th&gt;Connection; tools&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;Data use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter: cohere/north-mini-code:free (trial); openrouter/free (automatic free-only router)&lt;/td&gt;
&lt;td&gt;20 requests/min; 50 requests/day without $10 lifetime credit purchases; 1,000/day after the threshold. Free model availability varies.&lt;/td&gt;
&lt;td&gt;50 ceiling&lt;/td&gt;
&lt;td&gt;Native Anthropic endpoint. Tool-aware router selects models that support requested tools; success still depends on model&lt;/td&gt;
&lt;td&gt;256,000 tokens for north-mini-code:free; router selection varies&lt;/td&gt;
&lt;td&gt;OpenRouter use/logging opt-in; upstream provider policies differ. Restrict routing to endpoints meeting your data policy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Gemini API: gemini-3.5-flash-lite; gemini-2.5-flash-lite for eligible existing users&lt;/td&gt;
&lt;td&gt;Free input/output on eligible models; current RPM/TPM/RPD are project-specific in AI Studio, not a universal public table.&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Local translating gateway. Function calling documented; translation and model must preserve tool results&lt;/td&gt;
&lt;td&gt;1,048,576 input / 65,536 output for Gemini 3.5 Flash-Lite&lt;/td&gt;
&lt;td&gt;Free-tier content used to improve Google products; paid-tier handling differs and regional terms apply.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Groq: openai/gpt-oss-120b; openai/gpt-oss-20b; qwen/qwen3.8-27b&lt;/td&gt;
&lt;td&gt;30 RPM; 1,000 RPD; 8,000 TPM; 200,000 TPD for GPT OSS 120B/20B and Qwen3.8 27B.&lt;/td&gt;
&lt;td&gt;25 ceiling (modeled)&lt;/td&gt;
&lt;td&gt;Local translating gateway. Local function calling documented; successful Claude Code tool loop must be tested&lt;/td&gt;
&lt;td&gt;131,072 tokens&lt;/td&gt;
&lt;td&gt;No inference retention by default; reliability/abuse logs up to 30 days with ZDR opt-out. Customer training data used only to provide service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cerebras: gpt-oss-120b; qwen-3.8-27b&lt;/td&gt;
&lt;td&gt;One-time $5 trial, valid payment method required; expires 30 days. Not a recurring no-card free tier.&lt;/td&gt;
&lt;td&gt;Unavailable for this pairing&lt;/td&gt;
&lt;td&gt;Local translating gateway. Tool calling documented; not established here through Claude Code&lt;/td&gt;
&lt;td&gt;Model/account dependent; inspect model card and console&lt;/td&gt;
&lt;td&gt;Policy says chatbot conversations do not train models and inference inputs/outputs are not retained; logs removed when no longer necessary.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral Studio: mistral-small-latest / ministral family subject to free-account access&lt;/td&gt;
&lt;td&gt;Free mode for evaluation; numeric quotas and permitted models shown in account Admin Limits, not fixed publicly.&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Local translating gateway. Function calling supported on named models; free entitlement and translated loop must be checked&lt;/td&gt;
&lt;td&gt;256K for Mistral Small 4 / Ministral 3; other models vary&lt;/td&gt;
&lt;td&gt;Free-mode inputs/outputs may train Mistral models; account opt-out available.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NVIDIA API Catalog: openai/gpt-oss-20b (current free catalog example)&lt;/td&gt;
&lt;td&gt;No-cost hosted evaluation; per-model/account/traffic rate limits shown in account. Old 1,000-credit figures are obsolete.&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Local translating gateway. GPT OSS 20B catalog states function calling supported; translated Claude Code loop untested&lt;/td&gt;
&lt;td&gt;131K advertised for GPT OSS 20B; free request limits may be lower&lt;/td&gt;
&lt;td&gt;Trial terms: no post-session content use/storage except stated service/security exceptions; confidential and sensitive data prohibited; evaluation only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Models: None&lt;/td&gt;
&lt;td&gt;None: fully retired July 30, 2026; inference API/catalog/playground unavailable.&lt;/td&gt;
&lt;td&gt;Unavailable for this pairing&lt;/td&gt;
&lt;td&gt;Unavailable. Not applicable&lt;/td&gt;
&lt;td&gt;Not applicable&lt;/td&gt;
&lt;td&gt;Not applicable: retired service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt;: glm-4.5-flash; glm-4.7-flash&lt;/td&gt;
&lt;td&gt;GLM-4.7-Flash and GLM-4.5-Flash input/output free; GLM-4.6V-Flash also free for vision. Public pricing gives no stable daily quota.&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Gateway example for ordinary free API; native fleet route answered with a Coding Plan key. A free-only key was not tested. Tool calls observed on the fleet route reporting glm-4.7-flash; free-only gateway configuration untested&lt;/td&gt;
&lt;td&gt;128K for GLM 4.5 family; confirm free model endpoint capabilities&lt;/td&gt;
&lt;td&gt;General privacy policy allows model improvement; API DPA has narrower business processing terms. Free personal API no-training guarantee not established.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode Zen / Console: GLM 5.3 Flash Free, DeepSeek V4.1 Flash Free, MiniMax M3.1 Flash Free, MiMo V2.6 Flash Free, Nemotron 3 Ultra / 3.5 Lightning / 3.5 Super VL Free, Big Pickle, Iceman, Inkling 2 Small Free, Beam Free, Flint 40B Free&lt;/td&gt;
&lt;td&gt;Twelve limited-time free chat models in OpenCode; free-tier chat requires OpenCode, not third-party clients.&lt;/td&gt;
&lt;td&gt;Unavailable for this pairing&lt;/td&gt;
&lt;td&gt;Free chat client restricted. Supported by OpenCode; not eligible for free Claude Code pairing&lt;/td&gt;
&lt;td&gt;Model dependent; not a free Claude Code route&lt;/td&gt;
&lt;td&gt;Model-specific: first 3 no training/ZDR; Inkling may train; Beam no training/30 day safety retention; several collect improvement feedback.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloudflare Workers AI: @cf/meta/llama-3.3-70b-instruct-fp8-fast; other Workers AI models&lt;/td&gt;
&lt;td&gt;10,000 neurons/day; daily reset 00:00 UTC; model-weighted, not a fixed token/request grant.&lt;/td&gt;
&lt;td&gt;21 ceiling (modeled)&lt;/td&gt;
&lt;td&gt;Local translating gateway. Selected model supports function calling; translated Claude Code compatibility untested&lt;/td&gt;
&lt;td&gt;24,000 tokens for selected Llama 3.3 endpoint&lt;/td&gt;
&lt;td&gt;No training on Workers AI Customer Content; standard inference zero retention subject to stated exceptions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local Ollama: qwen3:1.7b (trial); qwen3:4b (2.5 GB documented alternative)&lt;/td&gt;
&lt;td&gt;No hosted quota; limited by RAM, context, speed, electricity and model license.&lt;/td&gt;
&lt;td&gt;Hardware dependent&lt;/td&gt;
&lt;td&gt;Native Anthropic endpoint on localhost. Ollama supports tool_use/tool_result; small-model reliability must be measured&lt;/td&gt;
&lt;td&gt;32,768 configured in this trial; model/runtime limits vary&lt;/td&gt;
&lt;td&gt;Local inference stays on your machine when using a downloaded local model; cloud models are a different route.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Here &lt;strong&gt;one agent turn means one inference request&lt;/strong&gt;, not one task you type. Reading a file, editing it, receiving a test failure and fixing it can consume several turns. For a hypothetical ten-request task, 50 requests buys at most five tasks before retries or ancillary requests. This is arithmetic, not a measured daily productivity claim. Groq&apos;s modeled 25 turns assume 7K input plus 1K output tokens per request: its 200K daily token ceiling divided by 8K. The 8K minute ceiling leaves little room for a growing agent prompt. Cloudflare&apos;s estimate uses its published 26,668 neurons per million input tokens and 204,805 per million output tokens: &lt;code&gt;floor(10000 / (10000 × 26668/1e6 + 1000 × 204805/1e6)) = 21&lt;/code&gt;. Longer prompts reduce it.&lt;/p&gt;
&lt;p&gt;Some familiar free-tier lists are stale. &lt;a href=&quot;https://inference-docs.cerebras.ai/support/rate-limits&quot;&gt;Cerebras now describes trial credits&lt;/a&gt;, and its &lt;a href=&quot;https://www.cerebras.ai/pricing&quot;&gt;pricing footnote requires a payment method&lt;/a&gt;. &lt;a href=&quot;https://docs.github.com/en/github-models&quot;&gt;GitHub Models is fully retired&lt;/a&gt;. &lt;a href=&quot;https://opencode.ai/docs/console/models/&quot;&gt;OpenCode&apos;s current model page&lt;/a&gt; says free chat requires OpenCode; other clients must use paid models or Go. These are useful distinctions before spending an afternoon configuring a route that cannot be free in Claude Code.&lt;/p&gt;
&lt;h2&gt;Configure a pairing&lt;/h2&gt;
&lt;p&gt;Use a fresh terminal and a disposable project first. The examples use placeholders for keys. Do not paste a real key into a committed file. Do not disable the client&apos;s permission checks to make a provider work.&lt;/p&gt;
&lt;p&gt;This helper makes every model class use the selected route. Run it once in the terminal where you will launch Claude Code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cc_model() {
  export ANTHROPIC_MODEL=&quot;$1&quot;
  export ANTHROPIC_DEFAULT_SONNET_MODEL=&quot;$1&quot;
  export ANTHROPIC_DEFAULT_OPUS_MODEL=&quot;$1&quot;
  export ANTHROPIC_DEFAULT_HAIKU_MODEL=&quot;$1&quot;
  export CLAUDE_CODE_SUBAGENT_MODEL=&quot;$1&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;OpenRouter: direct connection&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-openrouter&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration&quot;&gt;OpenRouter&apos;s Claude Code instructions&lt;/a&gt; use this base URL and explicitly empty &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export OPENROUTER_API_KEY=&apos;&amp;lt;YOUR_OPENROUTER_KEY&amp;gt;&apos;
export ANTHROPIC_BASE_URL=&apos;https://openrouter.ai/api&apos;
export ANTHROPIC_AUTH_TOKEN=&quot;$OPENROUTER_API_KEY&quot;
export ANTHROPIC_API_KEY=&apos;&apos;
cc_model &apos;cohere/north-mini-code:free&apos;
claude --model &quot;$ANTHROPIC_MODEL&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;https://openrouter.ai/docs/guides/routing/routers/free-router&quot;&gt;free router&lt;/a&gt; chooses among available free models and filters for requested capabilities. The configuration pins the &lt;a href=&quot;https://openrouter.ai/cohere/north-mini-code:free&quot;&gt;North Mini Code free model&lt;/a&gt; used in this trial, with a 256K context window. To try the changing free pool instead, run &lt;code&gt;cc_model &apos;openrouter/free&apos;&lt;/code&gt; before launching the client. The &lt;a href=&quot;https://openrouter.ai/docs/guides/routing/model-variants/free&quot;&gt;free-variant documentation&lt;/a&gt; warns that a fallback array containing paid models can incur charges; use only free entries or the free router alone.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://openrouter.ai/docs/api_reference/limits.md&quot;&gt;limits page&lt;/a&gt; gives 50 daily requests below $10 lifetime purchased credits and 1,000 after that threshold, both at 20 per minute. The higher ceiling is not a never-paid offer. The &lt;a href=&quot;https://openrouter.ai/api/v1/models&quot;&gt;live catalog&lt;/a&gt; also listed free variants of Ling 3.2 Flash, ERNIE 5.5 Flash Preview, Inkling 2 Small, LFM 3 1.7B, Particle 1, Flint v1, Nemotron 3.5 Super VL and Lightning, Dots 3 Note Preview, Nemotron 3 Ultra and Nano Omni, and Gemma 4 26B/31B. These change; a catalog tools flag is not a tested Claude Code loop. Check both the &lt;a href=&quot;https://openrouter.ai/docs/guides/privacy/data-collection&quot;&gt;router&apos;s data policy&lt;/a&gt; and the chosen upstream&apos;s policy; disabling training can remove available free endpoints.&lt;/p&gt;
&lt;h3&gt;One localhost gateway for the OpenAI-compatible providers&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.litellm.ai/docs/tutorials/claude_non_anthropic_models&quot;&gt;LiteLLM documents translating non-Anthropic models for Claude Code&lt;/a&gt;. This gateway setup is configuration from documentation, not tested here. The following setup uses one upstream at a time. It keeps the key in an environment variable and binds the gateway to localhost. Run the server in one terminal; use the second-terminal exports afterwards.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 -m venv &quot;$HOME/.cache/cc-free-gateway&quot;
&quot;$HOME/.cache/cc-free-gateway/bin/pip&quot; install &apos;litellm[proxy]&apos;
export FREE_API_KEY=&apos;&amp;lt;YOUR_PROVIDER_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://api.groq.com/openai/v1&apos;
export FREE_MODEL=&apos;openai/openai/gpt-oss-120b&apos;
export LITELLM_MASTER_KEY=&apos;&amp;lt;CHOOSE_A_LOCAL_GATEWAY_KEY&amp;gt;&apos;

cat &amp;gt; &quot;$HOME/.cache/cc-free-gateway/config.yaml&quot; &amp;lt;&amp;lt;&apos;YAML&apos;
model_list:
  - model_name: free-coding
    litellm_params:
      model: os.environ/FREE_MODEL
      api_base: os.environ/FREE_API_BASE
      api_key: os.environ/FREE_API_KEY
litellm_settings:
  drop_params: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
YAML

&quot;$HOME/.cache/cc-free-gateway/bin/litellm&quot; \
  --config &quot;$HOME/.cache/cc-free-gateway/config.yaml&quot; \
  --host 127.0.0.1 --port 4000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In another terminal, define &lt;code&gt;cc_model&lt;/code&gt; as above, then:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export ANTHROPIC_BASE_URL=&apos;http://127.0.0.1:4000&apos;
export ANTHROPIC_AUTH_TOKEN=&apos;&amp;lt;THE_SAME_LOCAL_GATEWAY_KEY&amp;gt;&apos;
export ANTHROPIC_API_KEY=&apos;&apos;
cc_model &apos;free-coding&apos;
claude --model &quot;$ANTHROPIC_MODEL&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;openai/&lt;/code&gt; prefix below is LiteLLM&apos;s provider selector; the remaining model ID is sent upstream. Stop the gateway before changing its provider variables, then restart it. &lt;code&gt;drop_params&lt;/code&gt; can discard unsupported optional parameters; it cannot add missing tool support or recover a model&apos;s broken tool arguments. Keep public test prompts small before giving the route a real edit.&lt;/p&gt;
&lt;h3&gt;Google Gemini API&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-gemini&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Configuration from the provider&apos;s documentation, not tested here unless the trial table explicitly says otherwise. Replace the three upstream exports before starting the gateway:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_GEMINI_API_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://generativelanguage.googleapis.com/v1beta/openai&apos;
export FREE_MODEL=&apos;openai/gemini-3.5-flash-lite&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Google documents the &lt;a href=&quot;https://aistudio.google.com/docs/openai&quot;&gt;OpenAI endpoint&lt;/a&gt;, &lt;a href=&quot;https://aistudio.google.com/docs/models/gemini-3.5-flash-lite&quot;&gt;Flash-Lite&apos;s context and capabilities&lt;/a&gt;, and &lt;a href=&quot;https://aistudio.google.com/docs/pricing&quot;&gt;free input/output&lt;/a&gt;. Check your project&apos;s &lt;a href=&quot;https://aistudio.google.com/docs/rate-limits&quot;&gt;active quotas&lt;/a&gt; before running an agent. Older 2.5 models are restricted to prior active users; use current models for a new project. Google&apos;s &lt;a href=&quot;https://aistudio.google.com/docs/terms&quot;&gt;terms&lt;/a&gt; distinguish free-service data handling and regional exceptions. Do not treat a free account as confidential inference by default.&lt;/p&gt;
&lt;h3&gt;Groq&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-groq&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Configuration from the provider&apos;s documentation, not tested here unless listed below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_GROQ_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://api.groq.com/openai/v1&apos;
export FREE_MODEL=&apos;openai/openai/gpt-oss-120b&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The double &lt;code&gt;openai/&lt;/code&gt; is intentional: the first selects the gateway&apos;s compatible provider, and &lt;code&gt;openai/gpt-oss-120b&lt;/code&gt; is &lt;a href=&quot;https://console.groq.com/docs/models&quot;&gt;Groq&apos;s model ID&lt;/a&gt;. Its &lt;a href=&quot;https://console.groq.com/docs/rate-limits&quot;&gt;rate limits&lt;/a&gt; include only 8K tokens per minute on the free tier, despite a 131K model context. A client with a long system prompt may be rejected immediately. &lt;a href=&quot;https://console.groq.com/docs/tool-use&quot;&gt;Local tool calling&lt;/a&gt; is a provider capability, not a guarantee of a successful translated coding run. &lt;a href=&quot;https://console.groq.com/docs/your-data&quot;&gt;Data controls&lt;/a&gt; cover inference retention and the exceptions; the &lt;a href=&quot;https://console.groq.com/docs/legal/services-agreement&quot;&gt;services agreement&lt;/a&gt; limits use of customer training data to providing the service.&lt;/p&gt;
&lt;h3&gt;Mistral Studio&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-mistral&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Configuration from the provider&apos;s documentation, not tested here unless listed below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_MISTRAL_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://api.mistral.ai/v1&apos;
export FREE_MODEL=&apos;openai/mistral-small-latest&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check &lt;a href=&quot;https://docs.mistral.ai/admin/billing-usage/usage-limits&quot;&gt;your organization&apos;s limits and model access&lt;/a&gt;. Mistral&apos;s &lt;a href=&quot;https://help.mistral.ai/en/articles/698531-why-am-i-hitting-api-rate-limits-and-how-do-i-increase-them&quot;&gt;free-mode explanation&lt;/a&gt; gives no universal numeric grant. The model must be available to your account and support &lt;a href=&quot;https://docs.mistral.ai/inference/conversations/function-calling&quot;&gt;function calling&lt;/a&gt;. Its &lt;a href=&quot;https://help.mistral.ai/en/articles/347617-do-you-use-my-user-data-to-train-your-artificial-intelligence-models&quot;&gt;data-use policy&lt;/a&gt; says free inputs and outputs may train models, with an opt-out; its &lt;a href=&quot;https://docs.mistral.ai/resources/known-limitations&quot;&gt;context table&lt;/a&gt; is separate from free access.&lt;/p&gt;
&lt;h3&gt;NVIDIA&apos;s hosted API Catalog&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-nvidia&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Configuration from the provider&apos;s documentation, not tested here unless listed below. Select a currently available tool-capable model from the catalog:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_NVIDIA_API_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://integrate.api.nvidia.com/v1&apos;
export FREE_MODEL=&apos;openai/openai/gpt-oss-20b&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;https://build.nvidia.com/openai/gpt-oss-20b&quot;&gt;current GPT OSS 20B catalog card&lt;/a&gt; lists a free endpoint, function calling and 131K context. The extra &lt;code&gt;openai/&lt;/code&gt; selects the gateway provider; the upstream model ID is &lt;code&gt;openai/gpt-oss-20b&lt;/code&gt;. The older &lt;a href=&quot;https://build.nvidia.com/meta/llama-3_3-70b-instruct&quot;&gt;Llama 3.3 70B free endpoint is deprecated&lt;/a&gt;, which is why the example uses a currently available model. The &lt;a href=&quot;https://docs.api.nvidia.com/nim/docs/api-quickstart&quot;&gt;quickstart&lt;/a&gt; explains key access. NVIDIA&apos;s &lt;a href=&quot;https://forums.developer.nvidia.com/t/nvidia-nim-faq/300317&quot;&gt;official FAQ&lt;/a&gt; says rate limits vary by model and current demand and are shown in the account. A &lt;a href=&quot;https://forums.developer.nvidia.com/t/request-more-4-000-credits-option-on-build-nvidia-com/344567&quot;&gt;staff clarification&lt;/a&gt; says the old credit system was replaced. The &lt;a href=&quot;https://assets.ngc.nvidia.com/products/api-catalog/legal/NVIDIA%20API%20Trial%20Terms%20of%20Service.pdf&quot;&gt;API Trial Terms&lt;/a&gt; limit this service to testing/evaluation, prohibit confidential or sensitive content, and describe content processing and security exceptions. This is a public-code experiment route, not a free production service.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt;&apos;s free Flash models&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-zai&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Free-only API configuration from documentation, not tested here.&lt;/strong&gt; The Coding Plan key test below used a different, private Anthropic-compatible endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_ZAI_API_KEY&amp;gt;&apos;
export FREE_API_BASE=&apos;https://api.z.ai/api/paas/v4&apos;
export FREE_MODEL=&apos;openai/glm-4.5-flash&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;https://docs.z.ai/guides/overview/pricing&quot;&gt;price page&lt;/a&gt; lists GLM-4.5-Flash and GLM-4.7-Flash as free. GLM-5.3-Flash is paid. The &lt;a href=&quot;https://docs.z.ai/guides/llm/glm-4.5&quot;&gt;GLM-4.5 documentation&lt;/a&gt; describes agent tools and 128K context. The native Anthropic endpoint in &lt;a href=&quot;https://docs.z.ai/devpack/tool/claude&quot;&gt;Z.ai&apos;s Claude Code instructions&lt;/a&gt; is documented for its paid Coding Plan; do not assume an ordinary free Flash key has that entitlement. This free example uses the standard API through translation. The &lt;a href=&quot;https://docs.z.ai/legal-agreement/privacy-policy&quot;&gt;privacy policy&lt;/a&gt; includes model improvement and a separate business API DPA; I have not established a no-training commitment for free personal API use.&lt;/p&gt;
&lt;h3&gt;Cloudflare Workers AI&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-cloudflare&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Configuration from the provider&apos;s documentation, not tested here unless listed below. You need an account ID and a token with Workers AI permission; the ID is not a secret:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FREE_API_KEY=&apos;&amp;lt;YOUR_WORKERS_AI_TOKEN&amp;gt;&apos;
export FREE_API_BASE=&apos;https://api.cloudflare.com/client/v4/accounts/&amp;lt;YOUR_ACCOUNT_ID&amp;gt;/ai/v1&apos;
export FREE_MODEL=&apos;openai/@cf/meta/llama-3.3-70b-instruct-fp8-fast&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cloudflare documents its &lt;a href=&quot;https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/&quot;&gt;compatible API&lt;/a&gt;, &lt;a href=&quot;https://developers.cloudflare.com/workers-ai/platform/pricing/&quot;&gt;neuron allocation&lt;/a&gt;, &lt;a href=&quot;https://developers.cloudflare.com/workers-ai/models/llama-3.3-70b-instruct-fp8-fast/&quot;&gt;selected model&apos;s 24K context and function calling&lt;/a&gt;, and &lt;a href=&quot;https://developers.cloudflare.com/workers-ai/platform/data-usage/&quot;&gt;no-training/data-retention commitments&lt;/a&gt;. Keep the account on Workers Free for a hard stop at the daily grant; Workers Paid can bill usage beyond it.&lt;/p&gt;
&lt;h3&gt;Local Ollama&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-ollama&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;With a current Ollama installed, its &lt;a href=&quot;https://docs.ollama.com/api/anthropic-compatibility&quot;&gt;native Anthropic endpoint&lt;/a&gt; removes the gateway step. In one terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export OLLAMA_HOST=&apos;127.0.0.1:11434&apos;
export OLLAMA_NO_CLOUD=1
export OLLAMA_CONTEXT_LENGTH=32768
ollama serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In another terminal, after defining &lt;code&gt;cc_model&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull qwen3:1.7b
export ANTHROPIC_BASE_URL=&apos;http://127.0.0.1:11434&apos;
export ANTHROPIC_AUTH_TOKEN=&apos;ollama&apos;
export ANTHROPIC_API_KEY=&apos;&apos;
cc_model &apos;qwen3:1.7b&apos;
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=32768
claude --model &quot;$ANTHROPIC_MODEL&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;https://ollama.com/library/qwen3:1.7b&quot;&gt;1.7B model&lt;/a&gt; is advertised as a 1.4GB download and supports tools. The &lt;a href=&quot;https://ollama.com/library/qwen3:4b&quot;&gt;4B alternative&lt;/a&gt; is 2.5GB; it was not the model in this trial. It is deliberately a small-machine example, not a claim that it matches Claude on repository work. The example sets both runtime and client to 32K tokens. Allocate a smaller window if your RAM cannot support it; context requires memory beyond the model&apos;s download. Ollama&apos;s &lt;a href=&quot;https://docs.ollama.com/faq&quot;&gt;local FAQ&lt;/a&gt; explains local-only mode and says local prompts are not sent back to Ollama. A cloud-tagged model is a different route.&lt;/p&gt;
&lt;h3&gt;Routes excluded from the free Claude Code setup&lt;/h3&gt;
&lt;p&gt;&amp;lt;span id=&quot;provider-cerebras&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span id=&quot;provider-github-models&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span id=&quot;provider-opencode-zen&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;Cerebras publishes &lt;a href=&quot;https://www.cerebras.ai/policies&quot;&gt;inference retention and training commitments&lt;/a&gt; and a &lt;a href=&quot;https://www.cerebras.ai/privacy-policy&quot;&gt;privacy policy&lt;/a&gt;, but eligibility is the reason it is excluded here. It can use the same gateway with &lt;code&gt;FREE_API_BASE=&apos;https://api.cerebras.ai/v1&apos;&lt;/code&gt; and &lt;code&gt;FREE_MODEL=&apos;openai/gpt-oss-120b&apos;&lt;/code&gt;, but its current card-backed promotional credit is not a recurring no-card free tier. GitHub Models has no working configuration after retirement. OpenCode&apos;s current free chat models are for its own client; use &lt;a href=&quot;/guides/opencode-vs-claude-code/&quot;&gt;OpenCode&lt;/a&gt; for that offer, or pay for models that permit other clients. Changing environment variables does not change those eligibility rules.&lt;/p&gt;
&lt;h2&gt;A small headless trial&lt;/h2&gt;
&lt;p&gt;I ran Claude Code 2.1.325 against OpenRouter&apos;s native Messages endpoint on &lt;code&gt;cohere/north-mini-code:free&lt;/code&gt;, and Ollama 0.32.3 on a CPU-only Qwen3 1.7B model. Both delivered tool calls. A successful connection did not always deliver an acceptable change.&lt;/p&gt;
&lt;p&gt;The tasks and source baseline match the &lt;a href=&quot;/guides/opencode-vs-claude-code/&quot;&gt;OpenCode comparison&lt;/a&gt;: add edge-case unit tests, fix an injected ledger bug, and write a README section from the implementation. Each attempt starts from the same snapshot. The full Python suite and an inspection of the diff determine acceptability; an existing green suite alone cannot certify that requested tests or prose were added.&lt;/p&gt;
&lt;p&gt;The first pass used an &lt;strong&gt;18-turn cap&lt;/strong&gt; and produced &lt;strong&gt;0 acceptable changes in 3 tasks&lt;/strong&gt;. The test-writing task made no edit before the cap. The bug fix removed cross-cluster collisions but introduced three failures when a cluster field was absent; 724 tests passed. The README edit landed in the right place but omitted most of the required normalization behavior.&lt;/p&gt;
&lt;p&gt;I then ran the test-writing task again with the &lt;strong&gt;60-turn and 900-second caps&lt;/strong&gt; used by the OpenCode study. It added &lt;strong&gt;eight correct test cases, with all 735 tests passing&lt;/strong&gt;, then Claude Code ended after &lt;strong&gt;fifteen HTTP 429 retry responses&lt;/strong&gt;. The change was acceptable even though the CLI exit was an error. The remaining two tasks were not repeated after rate limiting.&lt;/p&gt;
&lt;p&gt;For a buyer, that is the practical limit: &lt;strong&gt;on the free allowance, one small task can use up the session&lt;/strong&gt;. A usable diff does not mean enough capacity remains for the next edit. The run does not establish which quota caused the 429s or when it resets.&lt;/p&gt;
&lt;p&gt;These runs used isolated settings, five available tools and a short system prompt. That differs from the earlier study&apos;s full fleet configuration, so compare small-task outcomes rather than treating the timings as a model ranking. CLI turns include bookkeeping and are not exact HTTP-request counts. The repeated task&apos;s wall time includes retry backoff.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; Flash: answered on the native endpoint with a Coding Plan key; a free-only key was not tested.&lt;/strong&gt; The successful route was the fleet&apos;s private Anthropic-compatible gateway and reported &lt;code&gt;glm-4.7-flash&lt;/code&gt;. A separate probe of &lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt;&apos;s public native endpoint returned HTTP 529 without an answer. The private-route result does not establish free-only access to the public endpoint.&lt;/p&gt;
&lt;p&gt;The same three tasks ran sequentially with the 60-turn and 900-second caps. Test writing added eleven cases, with &lt;strong&gt;738 tests passing&lt;/strong&gt;. The bug repair passed the existing 727 tests but changed explicit-null cluster handling, so it was not acceptable. The README task added a correct 160-word section. That makes &lt;strong&gt;2 acceptable changes in 3 tasks&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There were &lt;strong&gt;at least 36 observed HTTP 529 overload retries&lt;/strong&gt;. Seven other retries did not retain a numeric status and are not included in that count. These are availability errors, not proof that the model or key was refused. Cached input is shown separately from uncached input; the token totals do not establish what the Coding Plan charged.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ccpricing=&quot;trials&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pairing&lt;/th&gt;
&lt;th&gt;Acceptable / attempted&lt;/th&gt;
&lt;th&gt;Wall seconds&lt;/th&gt;
&lt;th&gt;CLI turns&lt;/th&gt;
&lt;th&gt;Tool failures&lt;/th&gt;
&lt;th&gt;429 / 529 retries&lt;/th&gt;
&lt;th&gt;Uncached input / output tokens&lt;/th&gt;
&lt;th&gt;Cache read / write tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local CPU: README task&lt;/td&gt;
&lt;td&gt;0 / 1&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;Not reported&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0 / Not reported&lt;/td&gt;
&lt;td&gt;Not reported / Not reported&lt;/td&gt;
&lt;td&gt;Not reported / Not reported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter: test task repeated, 60 turns&lt;/td&gt;
&lt;td&gt;1 / 1&lt;/td&gt;
&lt;td&gt;228.9&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;15 / Not reported&lt;/td&gt;
&lt;td&gt;69,610 / 3,487&lt;/td&gt;
&lt;td&gt;0 / 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter: first three tasks, 18 turns&lt;/td&gt;
&lt;td&gt;0 / 3&lt;/td&gt;
&lt;td&gt;108.9&lt;/td&gt;
&lt;td&gt;51&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;0 / Not reported&lt;/td&gt;
&lt;td&gt;297,142 / 9,106&lt;/td&gt;
&lt;td&gt;0 / 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; Flash: fleet Coding Plan key&lt;/td&gt;
&lt;td&gt;2 / 3&lt;/td&gt;
&lt;td&gt;644.3&lt;/td&gt;
&lt;td&gt;59&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;0 / ≥36&lt;/td&gt;
&lt;td&gt;38,199 / 6,203&lt;/td&gt;
&lt;td&gt;328,769 / 0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Local first-generation decode: observed &lt;strong&gt;4.82 tokens/second&lt;/strong&gt; (1,247 tokens in about 259 seconds), excluding prompt processing and the later interrupted request. This is not whole-task throughput.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;The local README attempt ran for 300 seconds, made one rejected edit against text that did not exist, and timed out without a usable change or final usage response. The downloaded model was about 1.36 GB, with a 32K runtime context, under a four-CPU quota and 12 GB memory ceiling. It was the only local task attempted on this busy machine without a GPU. That result describes this small model and hardware allocation, not local inference as a whole.&lt;/p&gt;
&lt;p&gt;Gemini, Groq, Mistral and NVIDIA remain &lt;strong&gt;configuration from the provider&apos;s documentation, not tested here&lt;/strong&gt;: usable inference credentials were not available for these trials. Extending the trial would require their respective developer/API accounts and eligible keys; NVIDIA also needs an evaluation entitlement. An existing Cloudflare token failed an actual Workers AI request with HTTP 401; it needs Workers AI access and a correctly scoped token. Cerebras needs a card-backed promotional account, GitHub Models is retired, and OpenCode&apos;s free chat is client restricted. None was counted as a working Claude Code pairing.&lt;/p&gt;
&lt;p&gt;OpenRouter used explicit free-model selection with no paid fallback. OpenRouter and Ollama connected directly. The &lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; test used the existing private fleet gateway; the free-only translating-gateway examples above remain documentation-derived. This is a compatibility and small-edit study, not a general model ranking.&lt;/p&gt;
&lt;h2&gt;When free runs out: the cheapest paid routes behind Claude Code&lt;/h2&gt;
&lt;p&gt;These are the next three price steps, checked against the vendors&apos; pages on November 14, 2026:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Monthly price&lt;/th&gt;
&lt;th&gt;What the evidence supports&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://opencode.ai/docs/console/go/&quot;&gt;OpenCode Go&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;The vendor lists Claude Code among validated clients, while expressly declining to promise continued compatibility. &lt;strong&gt;Not run here.&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://docs.z.ai/devpack/overview&quot;&gt;GLM Coding Plan&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;From $18&lt;/td&gt;
&lt;td&gt;The native pairing this fleet has used since July; GLM models, plan credits and concurrency limits.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://claude.com/pricing&quot;&gt;Claude Pro&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;A direct Anthropic subscription with Claude Code and shared chat/code usage.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Go&apos;s current catalog also lists Claude Haiku 5.5, so Pro is the only &lt;strong&gt;direct Anthropic plan&lt;/strong&gt; in this comparison, not the only way to reach an Anthropic model. Go&apos;s model-specific usage windows and privacy rules still apply, and a validated client can stop working after an update. The &lt;a href=&quot;/guides/opencode-vs-claude-code/#opencode-go-what-10-buys&quot;&gt;OpenCode Go section&lt;/a&gt; explains what its $10 allowance buys. The &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;first-hand GLM study&lt;/a&gt; shows what the $18-and-up alternative delivered under fleet load. Choose &lt;a href=&quot;/guides/claude-pro-vs-max-vs-ultra/&quot;&gt;Pro&lt;/a&gt; when you want Anthropic&apos;s own plan and model integration.&lt;/p&gt;
&lt;h2&gt;What the free route gives up&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-ccpricing=&quot;tradeoffs&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Capacity&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;Tools and edits&lt;/th&gt;
&lt;th&gt;Data use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free hosted model&lt;/td&gt;
&lt;td&gt;$0 within quota&lt;/td&gt;
&lt;td&gt;Shared, small or account-specific limits&lt;/td&gt;
&lt;td&gt;Free token throughput can be lower than the advertised model window&lt;/td&gt;
&lt;td&gt;Tools and long edits depend on the model and gateway&lt;/td&gt;
&lt;td&gt;Provider-specific; several free tiers permit training&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Pro&lt;/td&gt;
&lt;td&gt;$20 monthly&lt;/td&gt;
&lt;td&gt;Claude and Claude Code share usage windows&lt;/td&gt;
&lt;td&gt;Model dependent; the client compacts long sessions&lt;/td&gt;
&lt;td&gt;Anthropic models and supported native tooling&lt;/td&gt;
&lt;td&gt;Consumer improvement preference; check and opt out if needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local model&lt;/td&gt;
&lt;td&gt;Hardware and electricity&lt;/td&gt;
&lt;td&gt;Your memory, CPU/GPU and patience&lt;/td&gt;
&lt;td&gt;Model and runtime allocation; context consumes additional RAM&lt;/td&gt;
&lt;td&gt;Small models can miss multi-step edits and tool schemas&lt;/td&gt;
&lt;td&gt;Prompts stay local when the runtime stays local&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;An agent repeatedly sends its growing conversation. A generous request count can therefore hide a restrictive token ceiling. A model may accept a tool schema and still return malformed arguments, repeat an unsuccessful tool, or claim a file changed when it did not. Read the diff and run the task&apos;s acceptance check. No gateway fixes those reasoning errors.&lt;/p&gt;
&lt;p&gt;“Free” also moves the cost into waiting and maintenance. At a time value of $30/hour, &lt;strong&gt;40 minutes of avoidable setup, retries or reset-watching costs $20&lt;/strong&gt;. At $60/hour it takes 20 minutes. That is a decision model, not a measured labor saving: use your own rate, and compare recurring monthly friction with the bill. Pro is usually the simpler purchase once an agent becomes daily work; a cheap coding plan may make sense when you want a different model and enough quota to finish. The &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;GLM coding-plan study&lt;/a&gt; covers that trade, while &lt;a href=&quot;/guides/codex-vs-claude-code/&quot;&gt;Codex vs Claude Code&lt;/a&gt; compares the harnesses and their measured behavior.&lt;/p&gt;
&lt;h2&gt;If you pay, use all of it&lt;/h2&gt;
&lt;p&gt;A subscription is prepaid inference. Pro costs $20 whether I use a tenth of its allowance or all of it, and the allowance resets on schedule whether I used it or not. Whatever is left at the reset is money I spent on nothing. Once free stops being enough, I would buy in one of two ways, and pick one on purpose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Buy low and run it out.&lt;/strong&gt; Take Pro at $20, or one of the $10 to $18 coding plans above, and plan to reach the limit in every window. A small allowance makes me decide which work deserves a session, and the limit arrives soon enough that I learn where it is. If I run out early most weeks, I have my evidence for Max, collected for $20 instead of a month of a larger plan I half use.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Or buy high and commit.&lt;/strong&gt; If the budget allows, take Ultra at $200 and treat the allowance as a quota to fill. That is more work than one person can steer by hand. Filling it means learning to write a task an agent can finish alone, to run several at once, to leave work going overnight, and to check results I did not watch being made. I think this is the fastest and cheapest way to learn agentic coding: each mistake costs a few percent of a week I had already paid for.&lt;/p&gt;
&lt;p&gt;I do not hit the limit every week myself. In the eight weeks of my &lt;a href=&quot;/guides/claude-pro-vs-max-vs-ultra/&quot;&gt;measured Pro, Max and Ultra comparison&lt;/a&gt;, the $200 account reached its cap once and peaked between 30% and 80% in the other seven. That happens when the agents finish the backlog of work I have left for them, and the rest of the allowance has nothing to run on. Keeping enough profitable, impactful work queued to fill a plan this size is a gap I still need to close.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fill it with work, not tokens.&lt;/strong&gt; There is a way to cheat: run the largest model at its highest effort setting for every request, and the meter reaches 100% with little effort from me. The API prices above show the gap between the models: Opus 5.5 at $4 input and $20 output per million tokens, Sonnet 5.5 at $2 and $10, and Haiku 5.5 at $0.10 and $0.50 for prompts up to 100K tokens. A larger model at a higher effort setting uses an allowance faster; it does not finish more tasks. The target is finished work, so I choose the smallest model that completes the task and spend the rest of the allowance on more tasks.&lt;/p&gt;
&lt;p&gt;I would argue that choice costs little. Today&apos;s mid-tier models are better than the frontier models of the previous generation, and the least they can do is approaching, if it has not already passed, the hardest thing most coding projects ask of them. That is my judgment from using them; this page does not measure it. It also has a floor. It covers a vendor&apos;s mid-tier model, such as Sonnet. It does not cover the smallest free models in the trial above: the 1.7B local model did not finish its one task.&lt;/p&gt;
&lt;h2&gt;Pick a route for your constraints&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-ccpricing=&quot;picker&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;The picker asks your monthly budget (including $0), whether training on prompts is acceptable, daily inference-request need, and whether you have a capable local machine. Without JavaScript: prefer a local-only model for private work at $0 when the hardware is already yours; try a small hosted free quota for public experiments; move to a paid plan when daily work and time spent on limits justify the bill. Unknown quotas and unclear data policies require checking the provider account, not an automatic recommendation.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;For current alternatives beyond this snapshot, the &lt;a href=&quot;/data/inference-plans/&quot;&gt;inference-plan comparison&lt;/a&gt; keeps the model and paid-plan choices together. Choose the route that can finish your task under its actual allowance and data terms. A zero price is useful only while the remaining constraints fit.&lt;/p&gt;
&lt;h2&gt;Tested with&lt;/h2&gt;
&lt;p&gt;The headless trials used &lt;strong&gt;Claude Code 2.1.325&lt;/strong&gt; and &lt;strong&gt;Ollama 0.32.3&lt;/strong&gt; with Qwen3 1.7B on a CPU. The local model had a 32K context and a four-CPU, 12 GB allocation. Codex CLI 0.169.0 is recorded for comparison with the companion studies; it did not run this trial. &lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; Flash was also tested through the private fleet gateway with a Coding Plan key, one request stream at a time. A free-only key was not tested, and direct public-native access was not established. No translating gateway was used in the OpenRouter or local pairings. The LiteLLM configurations above are documentation-derived, not measured integrations.&lt;/p&gt;
&lt;p&gt;Prices, limits and provider terms were checked on &lt;strong&gt;November 14, 2026&lt;/strong&gt;. The original three tasks, the repeated test-writing task and the single local task are identified separately because their caps differ. Preserve those distinctions when comparing results. Re-check the provider model list and allowance before relying on a free route, and refresh this study 28 days after publication.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>claude-code</category><category>pricing</category><category>free-tiers</category><category>local-models</category><category>agents</category></item><item><title>Codex Pricing and Usage Limits: What Each Plan Delivers, Measured</title><link>https://jedarden.com/guides/codex-pricing-and-limits/</link><guid isPermaLink="true">https://jedarden.com/guides/codex-pricing-and-limits/</guid><description>Codex costs $0–$500 a month. My $200 account recorded $2,409 of API-priced work in four weeks; here are the limits and the tier I would buy.</description><pubDate>Sat, 14 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&amp;lt;!-- cp-facts:lead:start --&amp;gt;
&lt;strong&gt;Codex costs $0 on Free, $8 on Go, $20 on Plus, and $100, $200 or $500 a month on Pro. In the four complete weeks from Oct 12 to Nov 8, my $200 account recorded $2,409 of work at today’s API rates, roughly 12 times its monthly price.&lt;/strong&gt; Roughly 97% to 98% of the input was cached: I was paying for a coding workflow that repeatedly reused context, rather than buying that much fresh text.
&amp;lt;!-- cp-facts:lead:end --&amp;gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — &lt;strong&gt;Buy a tier and use all of it:&lt;/strong&gt; the allowance is prepaid, and whatever is left at the weekly reset is gone. Either start on &lt;strong&gt;Free, Go or Plus&lt;/strong&gt; and run it to the limit in every window, or, budget permitting, take &lt;strong&gt;Pro 200 or Pro 500&lt;/strong&gt; and commit to filling it, which I think is the fastest and cheapest way to learn this kind of work. In between, buy &lt;strong&gt;Pro 100&lt;/strong&gt; when the five-hour window interrupts daily work. Fill the allowance with finished work on the smallest model that does the job, not with Astra at maximum reasoning. Choose &lt;strong&gt;Business&lt;/strong&gt; for managed seats and one bill. For a small, occasional job, I would pay per token before taking on a monthly fee.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A script on this machine has read the account’s usage meter every few minutes since Oct 11, alongside readings saved by my coding sessions since Sep 5. I use those readings to answer the question I had before paying: what kind of working week does each price buy?&lt;/p&gt;
&lt;h2&gt;What Codex costs today&lt;/h2&gt;
&lt;p&gt;I re-read these US dollar prices on &lt;strong&gt;Nov 14, 2026&lt;/strong&gt;. &lt;a href=&quot;https://learn.chatgpt.com/docs/pricing&quot;&gt;OpenAI’s Codex pricing&lt;/a&gt; lists the individual plans and included features.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cp-exhibit=&quot;prices&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-table:prices:start --&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;USD/month&lt;/th&gt;
&lt;th&gt;What I get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;Lightweight trial; Luna desktop access subject to rollout&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;$8&lt;/td&gt;
&lt;td&gt;Lightweight coding; Luna desktop access subject to rollout&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plus&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;Five-hour and weekly controls; focused sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro 100&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;No five-hour limit; weekly allowance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro 200&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;More usage than Pro 100; no five-hour limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro 500&lt;/td&gt;
&lt;td&gt;$500&lt;/td&gt;
&lt;td&gt;Highest Pro allowance; Ultrafast included&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business Standard&lt;/td&gt;
&lt;td&gt;$25 per seat; monthly&lt;/td&gt;
&lt;td&gt;Per seat; five-hour control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business Premium&lt;/td&gt;
&lt;td&gt;$125 per seat; monthly&lt;/td&gt;
&lt;td&gt;Per seat; no five-hour limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise / Edu&lt;/td&gt;
&lt;td&gt;Contact sales&lt;/td&gt;
&lt;td&gt;Contact sales; contract-specific usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!-- cp-table:prices:end --&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pro 200 is open to new subscribers again.&lt;/strong&gt; OpenAI says Pro 100 and Pro 500 now have twice their earlier allowance, while the lower Pro 200 allowance doubled to match the higher one. All three Pro tiers have no five-hour limit; Pro 500 adds Ultrafast. &lt;a href=&quot;https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers&quot;&gt;Current Pro tiers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Business Standard is &lt;strong&gt;$25 per seat monthly&lt;/strong&gt;, or &lt;strong&gt;$20 a month billed annually&lt;/strong&gt;. Premium is &lt;strong&gt;$125 monthly&lt;/strong&gt;, or &lt;strong&gt;$100 annually&lt;/strong&gt;, with more usage and no five-hour limit. I would budget for at least two paid seats: two Standard seats start at $40 a month equivalent on annual billing, and mixed Standard/Premium seats are allowed. Enterprise and Edu are quoted separately. &lt;a href=&quot;https://help.openai.com/en/articles/8980713-sign-up-for-chatgpt-business&quot;&gt;Business seats and billing&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Who each tier fits&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Free and Go:&lt;/strong&gt; I would start here for lightweight Luna sessions and occasional small edits; Go costs $8 a month. Move to Plus when available access or the amount of work gets in the way, and stay free when coding is an occasional experiment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plus:&lt;/strong&gt; I would buy the $20 plan for a few focused sessions a week. Move to Pro 100 if the five-hour reset repeatedly interrupts a working day; move down when a small API budget covers the month’s work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pro 100:&lt;/strong&gt; I would buy it for regular steering without a five-hour clock, at half the Pro 200 bill. Move to Pro 200 when the weekly allowance keeps running out; move to Plus when most weeks are short and interruptible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pro 200:&lt;/strong&gt; This is my reference for a busy week of pairing and unattended runs. I would move to Pro 500 when the weekly cap repeatedly stops useful work, and back to Pro 100 if I stop leaving workers running or regularly finish with plenty unused.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pro 500:&lt;/strong&gt; I would pay for the largest Pro allowance when overnight work needs more room or Ultrafast saves enough of my time to justify it. I would move back to Pro 200 when I stop using that extra capacity or speed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business:&lt;/strong&gt; I would choose it for member management, workspace controls and one bill, then assign Premium seats to people who need more usage and no five-hour limit. If I only need a personal coding plan, I would keep the individual subscription instead of buying two seats.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Buy a tier, then use all of it&lt;/h2&gt;
&lt;p&gt;A subscription is prepaid inference. The bill is the same at 30% used and at 100%, and the included allowance resets each week whether I used it or not. Whatever is left at the reset is money I spent on nothing. That leaves two sensible ways to buy, and I would pick one on purpose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Buy low and run it out.&lt;/strong&gt; Take Go or Plus and plan to reach the limit in every window. A small allowance makes me decide which work deserves a session, and the limit arrives soon enough that I learn where it is. If I run out early most weeks, I have my evidence for the next tier, collected for $8 or $20 instead of a month of a larger plan I half use.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Or buy high and commit.&lt;/strong&gt; If the budget allows, take Pro 200 or Pro 500 and treat the allowance as a quota to fill. That is more work than one person can steer by hand. Filling it means learning to write a task an agent can finish alone, to run several at once, to leave work going overnight, and to check results I did not watch being made. I think this is the fastest and cheapest way to learn agentic coding: each mistake costs a few percent of a week I had already paid for. The four weeks in my records would have cost $2,409 at API rates.&lt;/p&gt;
&lt;p&gt;I do not hit the limit every week myself. The Nov 4 to Nov 11 window, the one complete week in the reset table below that ran its full seven days, peaked at 82%, and I paid for the other 18% without using it. That happened because the agents finished the backlog of work I had left for them, and the rest of the allowance had nothing to run on. Keeping enough profitable, impactful work queued to fill a plan this size is a gap I still need to close.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fill it with work, not tokens.&lt;/strong&gt; There is a way to cheat: run Astra at the highest reasoning setting for everything, and the meter reaches 100% with little effort from me. On Plus, OpenAI estimates &lt;strong&gt;5–45 local messages per five hours on GPT-6 Astra, 15–160 on GPT-6.1 Sol, 35–285 on GPT-6.1 Terra and 350–3,000 on GPT-6 Luna&lt;/strong&gt;. &lt;a href=&quot;https://learn.chatgpt.com/docs/pricing#what-are-the-usage-limits-for-my-plan&quot;&gt;Current usage limits&lt;/a&gt;. An allowance emptied on Astra holds a fraction of the tasks the same allowance holds on Terra. The target is finished work, so I choose the smallest model that completes the task and spend the rest of the allowance on more tasks.&lt;/p&gt;
&lt;p&gt;I would argue that choice costs little. Today’s smaller models are better than the frontier models of the previous generation, and the least they can do is approaching, if it has not already passed, the hardest thing most coding projects ask of them. That is my judgment from using them; this page does not measure it. The price list points the same way: the API still lists the previous generation’s GPT-5.5 at $5 input and $30 output per million tokens, against $2 and $10 for Sol and $1 and $5 for Terra. &lt;a href=&quot;https://developers.openai.com/api/docs/pricing&quot;&gt;OpenAI’s API pricing&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Put your week into the picker&lt;/h2&gt;
&lt;p&gt;I enter the hours I actively steer, the workers I leave running all week, and the most I want to spend each month. One worker means a process alive for the week, including its idle time; I turn it down when runs are only occasional.&lt;/p&gt;
&lt;p&gt;The picker chooses a plan within my budget and tells me when I need to pace the work.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cp-exhibit=&quot;picker&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-table:picker:start --&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Steering h/week&lt;/th&gt;
&lt;th&gt;Workers all week&lt;/th&gt;
&lt;th&gt;Budget/month&lt;/th&gt;
&lt;th&gt;My pick&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;Plus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;Pro 100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;Pro 200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;Pro 200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;$500&lt;/td&gt;
&lt;td&gt;Pro 500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!-- cp-table:picker:end --&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;How the five-hour and weekly limits behave&lt;/h2&gt;
&lt;p&gt;The five-hour window limits work within a short period; it is not five hours of keyboard time. The weekly balance has its own reset. On Plus and Standard Business, OpenAI currently estimates &lt;strong&gt;15–160 local GPT-6.1 Sol messages per five hours&lt;/strong&gt;. Pro removes that short window, which is the first reason I would move up from Plus. &lt;a href=&quot;https://learn.chatgpt.com/docs/pricing#what-are-the-usage-limits-for-my-plan&quot;&gt;Current usage limits&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:windows:start --&amp;gt;
My Pro account reported a weekly limit and no five-hour limit. The complete &lt;strong&gt;Nov 4 to Nov 11&lt;/strong&gt; window peaked at &lt;strong&gt;82%&lt;/strong&gt;; the current window is at &lt;strong&gt;42%&lt;/strong&gt; through &lt;strong&gt;Nov 14&lt;/strong&gt;. Here are the last twelve reset windows.
&amp;lt;!-- cp-facts:windows:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cp-exhibit=&quot;windows&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-table:windows:start --&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dates&lt;/th&gt;
&lt;th&gt;Peak used&lt;/th&gt;
&lt;th&gt;Ended early&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Oct 11 to Oct 13&lt;/td&gt;
&lt;td&gt;53%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 13 to Oct 15&lt;/td&gt;
&lt;td&gt;15%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 15 to Oct 17&lt;/td&gt;
&lt;td&gt;96%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 17 to Oct 20&lt;/td&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 20 to Oct 22&lt;/td&gt;
&lt;td&gt;18%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 22 to Oct 23&lt;/td&gt;
&lt;td&gt;16%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 23 to Oct 25&lt;/td&gt;
&lt;td&gt;7%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 25 to Oct 25&lt;/td&gt;
&lt;td&gt;8%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 26 to Oct 28&lt;/td&gt;
&lt;td&gt;35%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 28 to Nov 4&lt;/td&gt;
&lt;td&gt;99%&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 4 to Nov 11&lt;/td&gt;
&lt;td&gt;82%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 11 to Nov 14 (open)&lt;/td&gt;
&lt;td&gt;42%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!-- cp-table:windows:end --&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:early:start --&amp;gt;
&lt;strong&gt;10 of the twelve windows ended early.&lt;/strong&gt; The account held banked reset credits, and I still had &lt;strong&gt;3 unused&lt;/strong&gt; on Nov 14. My saved credit counts cover Nov 13 and Nov 14 and stay at three; they do not identify which earlier restarts used a banked credit and which came from OpenAI.
&amp;lt;!-- cp-facts:early:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;I read the next reset time on the account rather than assuming Monday morning or exactly seven days after the last session. When the date changes, the spending plan for the rest of my week changes with it.&lt;/p&gt;
&lt;h2&gt;What a week of work consumed&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:work:start --&amp;gt;
In &lt;strong&gt;Nov 2 to Nov 8&lt;/strong&gt;, I started &lt;strong&gt;412 sessions&lt;/strong&gt; and recorded &lt;strong&gt;2.11B input tokens&lt;/strong&gt; and &lt;strong&gt;7.7M output tokens&lt;/strong&gt;, worth &lt;strong&gt;$370&lt;/strong&gt; at today’s Sol API rates. The usage meter consumed &lt;strong&gt;0.99 weekly allowances&lt;/strong&gt; across two reset windows. In the table, &lt;strong&gt;1.83&lt;/strong&gt; means &lt;strong&gt;1.83 allowances&lt;/strong&gt;, or &lt;strong&gt;183%&lt;/strong&gt;: that week’s window was reset early, so I could spend more than one allowance in seven calendar days.
&amp;lt;!-- cp-facts:work:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cp-exhibit=&quot;work&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-table:work:start --&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Week of&lt;/th&gt;
&lt;th&gt;Sessions&lt;/th&gt;
&lt;th&gt;Input tokens&lt;/th&gt;
&lt;th&gt;Cached&lt;/th&gt;
&lt;th&gt;Output tokens&lt;/th&gt;
&lt;th&gt;At API rates&lt;/th&gt;
&lt;th&gt;Weekly allowances used&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Oct 12&lt;/td&gt;
&lt;td&gt;6,863&lt;/td&gt;
&lt;td&gt;4.7B&lt;/td&gt;
&lt;td&gt;96.7%&lt;/td&gt;
&lt;td&gt;19.3M&lt;/td&gt;
&lt;td&gt;$957&lt;/td&gt;
&lt;td&gt;1.83&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 19&lt;/td&gt;
&lt;td&gt;5,125&lt;/td&gt;
&lt;td&gt;2.78B&lt;/td&gt;
&lt;td&gt;96.8%&lt;/td&gt;
&lt;td&gt;7.7M&lt;/td&gt;
&lt;td&gt;$525&lt;/td&gt;
&lt;td&gt;0.85&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 26&lt;/td&gt;
&lt;td&gt;506&lt;/td&gt;
&lt;td&gt;3.47B&lt;/td&gt;
&lt;td&gt;98.4%&lt;/td&gt;
&lt;td&gt;10.3M&lt;/td&gt;
&lt;td&gt;$558&lt;/td&gt;
&lt;td&gt;0.96&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 2&lt;/td&gt;
&lt;td&gt;412&lt;/td&gt;
&lt;td&gt;2.11B&lt;/td&gt;
&lt;td&gt;98.0%&lt;/td&gt;
&lt;td&gt;7.7M&lt;/td&gt;
&lt;td&gt;$370&lt;/td&gt;
&lt;td&gt;0.99&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 9 (partial)&lt;/td&gt;
&lt;td&gt;267&lt;/td&gt;
&lt;td&gt;1.57B&lt;/td&gt;
&lt;td&gt;98.3%&lt;/td&gt;
&lt;td&gt;5M&lt;/td&gt;
&lt;td&gt;$257&lt;/td&gt;
&lt;td&gt;0.62&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!-- cp-table:work:end --&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Those weeks make the $200 plan easy to justify for the way I work: I repeatedly use an agent in a large codebase, then let other runs continue unattended. A person making a handful of small edits has a different bill and may get better value from Plus or the API.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;/guides/codex-vs-claude-code/&quot;&gt;Codex vs Claude Code comparison&lt;/a&gt; looks at the work the agents delivered. For the other subscription ladder, the $200 Claude tier is &lt;strong&gt;Ultra (formerly Max 20x)&lt;/strong&gt;; my &lt;a href=&quot;/guides/claude-pro-vs-max-vs-ultra/&quot;&gt;measured Claude plans guide&lt;/a&gt; follows its usage windows. The &lt;a href=&quot;/data/inference-plans/&quot;&gt;inference plan comparison&lt;/a&gt; puts these choices beside other plans and API prices.&lt;/p&gt;
&lt;h2&gt;How I check Codex usage&lt;/h2&gt;
&lt;p&gt;In an active CLI session I enter &lt;strong&gt;&lt;code&gt;/status&lt;/code&gt;&lt;/strong&gt;. In the app I open &lt;strong&gt;Settings → Usage&lt;/strong&gt;, or the &lt;a href=&quot;https://chatgpt.com/codex/settings/usage&quot;&gt;Codex usage dashboard&lt;/a&gt;. I write down the allowance, percentage, reset time and credit balance. I check the label: 20% remaining is 80% used. The context-window percentage is conversation space, a separate meter. &lt;a href=&quot;https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan#usage-limits-by-plan&quot;&gt;OpenAI’s usage instructions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before buying a larger tier, I take readings before and after representative sessions over several days. I keep the model and speed fixed and include anything that ran overnight. If both windows appear, I record both; a short-window reset does not refill the weekly one. I compare readings within the same reset window, then start a new row when it resets.&lt;/p&gt;
&lt;p&gt;I also check the speed setting. &lt;strong&gt;Fast spends included usage at 2.5 times Standard; Ultrafast at 8 times&lt;/strong&gt; for the same model. A change there can explain why a familiar week starts hitting the cap sooner. &lt;a href=&quot;https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers#usage-and-limits&quot;&gt;Speed and usage&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What happens at the cap, and what a banked reset buys&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:cap:start --&amp;gt;
I have seen both outcomes at the cap. In my August to October records, &lt;strong&gt;826 requests were refused&lt;/strong&gt; at the usage limit, mostly before any work began. After I added paid usage credits, two later windows stayed at 100% while work continued and the credit balance fell.
&amp;lt;!-- cp-facts:cap:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;Under today’s rules, an active turn can finish after the included allowance runs out, subject to fair use. For the next turn I check the notice: I can wait, buy extra credits, use an available reset, or change plans. Support does not reset the limit on request. A &lt;strong&gt;banked full reset refreshes both the five-hour and weekly windows and moves the weekly reset date&lt;/strong&gt;. &lt;a href=&quot;https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan&quot;&gt;Limit and reset rules&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:banked:start --&amp;gt;
The &lt;strong&gt;3 banked resets&lt;/strong&gt; I still held on Nov 14 expire on &lt;strong&gt;Nov 30, Dec 1, Dec 12&lt;/strong&gt;. I check both the expiry and the next natural reset before spending one: if the natural reset arrives first, the saved reset may add little useful time.
&amp;lt;!-- cp-facts:banked:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;Paid credits and banked resets solve different problems: credits pay for more work after included usage, while a reset refills the allowance. I check which one the account is offering before spending money or using a saved reset.&lt;/p&gt;
&lt;h2&gt;When I would pay per token&lt;/h2&gt;
&lt;p&gt;For a small, irregular job or a CI run with a dollar ceiling, I would price the API first. For daily work like the four weeks above, I would buy the subscription. My Sol Standard calculation is:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;API dollars = uncached input millions × $2 + cached input millions × $0.10 + output millions × $10.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I subtract cached input from total input before applying the first rate. &lt;a href=&quot;https://developers.openai.com/api/docs/pricing&quot;&gt;OpenAI’s API pricing&lt;/a&gt; is separate from subscription credits.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:api:start --&amp;gt;
A small run with &lt;strong&gt;100,000 input tokens, 90,000 cached, and 10,000 output&lt;/strong&gt; costs &lt;strong&gt;$0.129&lt;/strong&gt; under that formula; ten cost &lt;strong&gt;$1.29&lt;/strong&gt;. If I were buying a subscription only for those runs, $20 would pay for about &lt;strong&gt;155&lt;/strong&gt; of them through the API, $100 about &lt;strong&gt;775&lt;/strong&gt;, and $200 about &lt;strong&gt;1,550&lt;/strong&gt;. Below that volume I would pay per token; above it I would check whether the subscription’s allowance holds the work.
&amp;lt;!-- cp-facts:api:end --&amp;gt;&lt;/p&gt;
&lt;p&gt;If I already have unused Plus capacity, a small job adds no subscription fee. I then compare the API with the cost of extra credits or upgrading, rather than charging the whole subscription to that job again. When I only want one small run, the API avoids the monthly minimum.&lt;/p&gt;
&lt;h2&gt;How I measured this&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- cp-facts:method:start --&amp;gt;
I used &lt;strong&gt;316,401 usage readings&lt;/strong&gt; covering &lt;strong&gt;18 reset windows&lt;/strong&gt; from &lt;strong&gt;Sep 5 to Nov 14&lt;/strong&gt;, and &lt;strong&gt;22,227 saved sessions&lt;/strong&gt;. The meter covers the whole account, so I cannot separate steering from workers. For the picker I apply the busiest measured three-hour pace, &lt;strong&gt;6.939 percentage points an hour&lt;/strong&gt;, to steering, and the account-wide average of &lt;strong&gt;0.297 points per worker-hour&lt;/strong&gt; to workers; the two overlap, making this a conservative planning model. A worker means 168 hours alive per week, including idle time. I measured Pro 200; for the other tiers I scale recommendations along OpenAI’s published ordering, which gives no numeric quota ratios.&lt;/p&gt;
&lt;p&gt;I counted tokens by the week in which they were recorded and left out sessions spawned or copied from other sessions to reduce repeated history. Session starts and tool calls are activity, not completed tasks. Some older sessions have disappeared since my earlier measurement, so I retain its cap findings separately and never add overlapping totals. Nov 14 and the last week are partial. I group reset times within twenty minutes and fill sample gaps only up to six hours; the Nov 2 week has &lt;strong&gt;94.11%&lt;/strong&gt; coverage. Allowances used are lower bounds on the meter changes I observed.&lt;/p&gt;
&lt;p&gt;The API comparison prices my recorded token mix at GPT-6.1 Sol Standard, short-context rates; it is not an invoice or a claim that Sol would finish the same tasks identically. I exclude explicit cache writes, long context and tool charges, and do not add reasoning tokens again because they are already in output. I calculate totals before rounding the displayed weekly dollars. The account’s allowance changed during the measurement period, and paid credits and early resets also affected what it could finish. I did not redeem a reset as part of this study.
&amp;lt;!-- cp-facts:method:end --&amp;gt;&lt;/p&gt;
&lt;h2&gt;Tested with&lt;/h2&gt;
&lt;p&gt;I checked this with &lt;strong&gt;Codex CLI 0.169.0&lt;/strong&gt; and &lt;strong&gt;Claude Code 2.1.325&lt;/strong&gt; installed. The usage readings run from Sep 5 to Nov 14, 2026, with cap history from my earlier August to October measurement. I re-opened every cited OpenAI pricing and limits page on Nov 14 and confirmed the listed prices and rules.&lt;/p&gt;
&lt;p&gt;A weekly check compares the installed clients with the versions here and flags a refresh when either moves a minor version or the data passes ninety days. I also refresh when pricing or limits change. If you want the full readings behind the tables, ask me through the &lt;a href=&quot;/contact/&quot;&gt;contact page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>codex</category><category>subscriptions</category><category>cost</category><category>agents</category><category>fleet-ops</category></item><item><title>Claude Pro vs Max vs Ultra: Which Plan Is Worth It, Measured</title><link>https://jedarden.com/guides/claude-pro-vs-max-vs-ultra/</link><guid isPermaLink="true">https://jedarden.com/guides/claude-pro-vs-max-vs-ultra/</guid><description>Is Max worth it? Four months on a metered $200 account, scaled to Pro and Max: Pro limits, the Team plan, pay per token, and a plan picker.</description><pubDate>Thu, 12 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;The question is not which Claude plan is best. It is how many points of a
weekly allowance your week burns, and nobody publishes that number, so I
measured mine.&lt;/strong&gt; Claude sells four tiers for Claude Code: Pro at $20, Max at
$100, Ultra at $200, and Team seats at $20 or $100 a head; the pricing page
describes them as multiples of each other and never says what the base
multiple is. Since September 2026 a governor on this machine has polled the
usage endpoint of one $200 account every five minutes while I steered Claude
Code from a terminal and one or two unattended workers shared the account.
That gives eight complete weekly windows, seventeen five-hour windows from
the last week the five-hour window existed on the account, and one real cap.
Scaled by the vendor&apos;s own multipliers, those weeks say which tier would have
held them, and the picker below applies the same arithmetic to yours.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Buy &lt;strong&gt;Pro&lt;/strong&gt; if the agent gets about four busy hours a week
from you or less, and you are happy to wait for a reset. By the measured
rates a busy hour at the keyboard is about a quarter of a Pro week, and
every one of my eight weeks would have capped on Pro, most of them by
Thursday. Is Max worth it? Buy &lt;strong&gt;Max&lt;/strong&gt; if you work with the agent most
days and nothing runs while you sleep: five of my eight weeks would still
have capped on Max, but three fit, and one always-on worker sits at about
84% of a Max week. Buy &lt;strong&gt;Ultra&lt;/strong&gt; if you run anything unattended or you
steer for thirty hours a week; on my account it held every week at 30 to
80%, and the five-hour window stopped existing on October 31, which is
the tier&apos;s one structural difference. &lt;strong&gt;Team Premium&lt;/strong&gt; seats, billed
annually, cost the same as Max per person and buy roughly the same
allowance with one bill; &lt;strong&gt;pay per token&lt;/strong&gt; wins below about five busy
hours a week with no plan in hand, and nowhere else.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Which plan fits you?&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-plan-exhibit=&quot;picker&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If your week is…&lt;/th&gt;
&lt;th&gt;Ultra week used&lt;/th&gt;
&lt;th&gt;Max&lt;/th&gt;
&lt;th&gt;Pro&lt;/th&gt;
&lt;th&gt;Smallest plan that fits&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A few evenings (5 busy hours)&lt;/td&gt;
&lt;td&gt;12%&lt;/td&gt;
&lt;td&gt;23%&lt;/td&gt;
&lt;td&gt;cap by day 7&lt;/td&gt;
&lt;td&gt;Max&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A working week of pairing (30 hours)&lt;/td&gt;
&lt;td&gt;70%&lt;/td&gt;
&lt;td&gt;cap on day 6&lt;/td&gt;
&lt;td&gt;cap at hour 24&lt;/td&gt;
&lt;td&gt;Ultra&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One always-on worker&lt;/td&gt;
&lt;td&gt;42%&lt;/td&gt;
&lt;td&gt;84%, tight&lt;/td&gt;
&lt;td&gt;cap at hour 40&lt;/td&gt;
&lt;td&gt;Max&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;This machine: a day of steering plus two workers&lt;/td&gt;
&lt;td&gt;103%&lt;/td&gt;
&lt;td&gt;cap on day 4&lt;/td&gt;
&lt;td&gt;cap at hour 16&lt;/td&gt;
&lt;td&gt;over every plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four people, a working week each&lt;/td&gt;
&lt;td&gt;70% each&lt;/td&gt;
&lt;td&gt;cap on day 6 each&lt;/td&gt;
&lt;td&gt;cap at hour 24 each&lt;/td&gt;
&lt;td&gt;Ultra per person; Team Premium seats cap&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;If the picker does not load, these are its three questions, and the
sections below give the rates behind them: how many busy hours a week you
spend at the keyboard with the agent (0 to 60); how many agents you keep
running unattended, all week (0 to 4); and how many people would share the
bill on Team seats (1 to 10). It answers with the share of each tier&apos;s
weekly allowance your week would use, the hour the cap would land where it
would, and what the same week costs at list price through the API.&lt;/p&gt;
&lt;h2&gt;What was measured&lt;/h2&gt;
&lt;p&gt;One Claude account on the $200 tier, from one machine, September 16 to
November 12, 2026. Four kinds of evidence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The usage meter.&lt;/strong&gt; A governor polled the vendor&apos;s usage endpoint every
five minutes and kept each window&apos;s reading, its reset time and how many
unattended workers were alive: 5,000 readings of the weekly window across
nine windows, 813 of the five-hour window across its last seventeen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The transcripts.&lt;/strong&gt; Every Claude Code session on the machine from July 9
to October 31, read once for the earlier &lt;a href=&quot;/guides/codex-vs-claude-code/&quot;&gt;Codex vs Claude Code&lt;/a&gt;
study: 3,000 terminal sessions on Anthropic&apos;s models, 700 of them an hour
or longer, with the CLI&apos;s own list-price estimate per session and every
usage-limit error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The caps.&lt;/strong&gt; Three alerts from August, when the account was driven hard
by hand, and one real weekly cap on October 12 and 13, which the
transcripts record as 118 usage-limit errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The pricing page&lt;/strong&gt;, read twice on 2026-11-11.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Three caveats before a number. First, the fleet was throttled: the governor
held the unattended side to two Claude workers, and most of the account&apos;s
use was a person steering, so the weekly peaks are a picture of one
developer plus a small fleet, not of a tier&apos;s ceiling. Second, the
multipliers are the vendor&apos;s. The pricing page says Max is five times Pro
and Ultra ten times, and never says what Pro is, so the Ultra row below is
observed and the Pro and Max rows are modelled from it. Third, the account
changed shape during the study, which turned out to be the most useful
thing it did.&lt;/p&gt;
&lt;h2&gt;What each tier buys&lt;/h2&gt;
&lt;p&gt;The $200 tier is called &lt;strong&gt;Ultra&lt;/strong&gt; on the pricing page as it reads today.
&lt;strong&gt;Max 20x is the old name of that tier&lt;/strong&gt;: when I subscribed, the $200 plan
was sold as Max at twenty times Pro&apos;s usage, with a five-hour window and a
weekly one. The page now describes it as ten times Pro&apos;s &lt;em&gt;weekly&lt;/em&gt; usage with
no five-hour limit for verified accounts, and the name Max belongs to the
$100 tier alone. Nothing in the price changed. What changed is the shape of
the allowance, and my account&apos;s meter shows the day it happened.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-plan-exhibit=&quot;ladder&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;What the page says it buys&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;limited usage; a five-hour window and a weekly cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro&lt;/td&gt;
&lt;td&gt;$20/mo, $17 billed annually&lt;/td&gt;
&lt;td&gt;more usage than Free; five-hour and weekly windows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team Standard&lt;/td&gt;
&lt;td&gt;$20/seat/mo annual, $25 monthly&lt;/td&gt;
&lt;td&gt;more usage than Pro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;td&gt;$20/seat/mo annual, 20-seat minimum&lt;/td&gt;
&lt;td&gt;usage billed at API rates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max&lt;/td&gt;
&lt;td&gt;$100/mo&lt;/td&gt;
&lt;td&gt;5x Pro every five hours and every week; $100 of API credits a month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team Premium&lt;/td&gt;
&lt;td&gt;$100/seat/mo annual, $125 monthly&lt;/td&gt;
&lt;td&gt;5x a standard seat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ultra (formerly Max 20x)&lt;/td&gt;
&lt;td&gt;$200/mo&lt;/td&gt;
&lt;td&gt;10x Pro weekly; no five-hour limit; $200 of API credits a month&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Four mechanics decide what those rows mean in practice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The five-hour window.&lt;/strong&gt; On Pro and Max, usage is metered inside a rolling
five-hour session as well as across the week. This is the limit a single
busy afternoon hits: it fills fast and it resets fast. On Ultra it is gone,
and on my account it vanished mid-study.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The weekly window.&lt;/strong&gt; Every paid tier has one. On my account it reset every
Wednesday at the same local hour, 01:00Z through October and 00:00Z after
the US clocks changed on November 1, and a second weekly window tracks it
reading for reading; the vendor has renamed that second window twice since
September, so I call it only the second weekly window. The weekly window is
the one that caps a sustained week, and the one the exhibits below are
about.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One pool across surfaces.&lt;/strong&gt; The allowance is the account&apos;s, not Claude
Code&apos;s. The terminal, the desktop app, the browser and any unattended worker
logged in as you all draw from the same windows, which is why my &quot;steering&quot;
weeks include the workers that were alive beside me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Past the cap.&lt;/strong&gt; When a window fills, the tier stops until the reset unless
you buy usage credits, which Max and Ultra can; both also include a monthly
API credit, $100 and $200, that pays for overflow through the API at list
price rather than through the plan.&lt;/p&gt;
&lt;h2&gt;How the windows behaved on the $200 tier&lt;/h2&gt;
&lt;p&gt;Eight completed weekly windows and one open one. The observed peaks were 80,
46, 30, 100, 71, 51, 48 and 55%, and the open week stood at 20% after a day
and a half. The 80 is a window first sampled when it was already at 52%;
the 100 is the week of October 7, when the governor&apos;s telemetry had stopped
on the 10th at 15% and the transcripts record the cap being hit in
interactive sessions on the 12th and 13th. That is the only weekly cap the
account produced in the period. The August caps were earlier and different:
a five-hour alert at 98% on August 22, a weekly alert at 95% on August 25
and a model-scoped weekly alert at 97% on August 30, all during heavy
hand-driven use before any retained series began.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-plan-exhibit=&quot;weeks&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Window&lt;/th&gt;
&lt;th&gt;Ultra, observed&lt;/th&gt;
&lt;th&gt;Max, x2&lt;/th&gt;
&lt;th&gt;Pro, x10&lt;/th&gt;
&lt;th&gt;Workers alive&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sep 16–23&lt;/td&gt;
&lt;td&gt;80% (first sampled at 52%)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 23–30&lt;/td&gt;
&lt;td&gt;46%&lt;/td&gt;
&lt;td&gt;92%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 30–Oct 7&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;td&gt;60%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 7–14&lt;/td&gt;
&lt;td&gt;100% (cap hit Oct 12–13)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 14–21&lt;/td&gt;
&lt;td&gt;71%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 21–28&lt;/td&gt;
&lt;td&gt;51%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 28–Nov 4&lt;/td&gt;
&lt;td&gt;48%&lt;/td&gt;
&lt;td&gt;96%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 4–11&lt;/td&gt;
&lt;td&gt;55%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nov 11–18 (open)&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Two rates fall out of these windows and they are the rates the picker uses.
The busiest pace any completed window sustained for three hours was 2.3
points of the weekly allowance an hour, in the week of October 28 with two
workers alive, so a busy hour at the keyboard costs up to 2.3% of an Ultra
week and one Ultra allowance is about 43 such hours. Over the four
governor-era windows the account consumed 210 points across 837 alive
worker-hours, a quarter of a point per worker-hour, so an always-on worker
costs about 42% of an Ultra week; two fit, four do not. Both rates include
my own typing, because the account is one meter, so both are upper bounds
per worker and per hour.&lt;/p&gt;
&lt;p&gt;The five-hour window is the other half of the story, and on this account it
has an ending.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-plan-exhibit=&quot;five-hour&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Five-hour window, Oct 26–31&lt;/th&gt;
&lt;th&gt;Observed&lt;/th&gt;
&lt;th&gt;Max, x4&lt;/th&gt;
&lt;th&gt;Pro, x20&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Windows sampled (1–2 workers alive)&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median peak&lt;/td&gt;
&lt;td&gt;4%&lt;/td&gt;
&lt;td&gt;16%&lt;/td&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Highest peak&lt;/td&gt;
&lt;td&gt;23%&lt;/td&gt;
&lt;td&gt;92%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows over the cap&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;6 of 17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Last reading with a five-hour window&lt;/td&gt;
&lt;td&gt;2026-10-31 02:28Z&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Seventeen windows in the last week it existed, median 4%, the worst 23%
from one busy afternoon. At one or two workers the five-hour window was
never the constraint. Its last reading was at 02:28Z on October 31. The
same state file carried weekly readings for another twelve hours with no
five-hour window beside them, and no reading since, through November 12,
has had one. The governor drops a window the moment the vendor stops
reporting it, so there is no later file that could hold one. The account
that was Max 20x, with three windows, now has the Ultra shape the pricing
page describes, with the weekly windows alone. I did not change the
subscription; the tier changed under it.&lt;/p&gt;
&lt;p&gt;What the weeks held, in human terms, is the last exhibit. Fourteen ISO weeks
from late July: how many terminal sessions on Anthropic&apos;s models ran an hour
or longer, what the CLI estimated the week&apos;s sessions would have cost at
list price, and what the weekly window reached.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-plan-exhibit=&quot;what-a-week-held&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ISO week&lt;/th&gt;
&lt;th&gt;Sessions ≥ 1 h&lt;/th&gt;
&lt;th&gt;List-price estimate&lt;/th&gt;
&lt;th&gt;Weekly window peak&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;W31&lt;/td&gt;
&lt;td&gt;98&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W32&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W33&lt;/td&gt;
&lt;td&gt;75&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W34&lt;/td&gt;
&lt;td&gt;55&lt;/td&gt;
&lt;td&gt;$4&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W35&lt;/td&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;$1,536&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W36&lt;/td&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;$4,318&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W37&lt;/td&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;$2,606&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W38&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;$2,292&lt;/td&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W39&lt;/td&gt;
&lt;td&gt;52&lt;/td&gt;
&lt;td&gt;$1,507&lt;/td&gt;
&lt;td&gt;46%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W40&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;$923&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W41&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;$2,018&lt;/td&gt;
&lt;td&gt;100% (cap)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W42&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;$1,072&lt;/td&gt;
&lt;td&gt;71%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W43&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;$183&lt;/td&gt;
&lt;td&gt;51%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W44&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;$55&lt;/td&gt;
&lt;td&gt;48%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;The line does not follow the bars tidily, and that is the point: the one or
two workers alive all week, and which models the sessions used, matter as
much as the hours. The dollar column is what one plan-dollar bought. Ultra
costs $46 a week; in the weeks with more than $500 of estimated use the
account drew between 20 and 94 times that in list-price inference, and
the quietest week over $100 still drew four times. Per
point of the weekly allowance the estimate ranged from $8 in October to $33
in late September, a four-fold spread that comes down to which models were
in the mix, and the picker shows a range for that reason rather than a
number.&lt;/p&gt;
&lt;h2&gt;What Pro and Max would have done with the same weeks&lt;/h2&gt;
&lt;p&gt;Take the vendor at its word. Ultra is ten units a week, Max five, Pro one,
so a week that used 51% of my allowance would have used 102% of a Max week
and 510% of a Pro week. Capping the modelled rows at 100 and spreading each
week&apos;s use evenly across its 168 hours gives the hour the cap would have
landed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On Max&lt;/strong&gt;, five of the eight completed weeks cap. The 71% week caps late on
day five, the 51% and 48% weeks are a coin toss either side of the line,
and only the 30% and 46% weeks, the quietest of the period, fit with room.
The five-hour window, with a quarter of the allowance my account had,
would not have bound once in the seventeen windows sampled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On Pro&lt;/strong&gt;, all eight weeks cap, most of them by Thursday. The 30% week, my
lightest, reaches a Pro cap at hour 56, and the 71% week at hour 24. The
five-hour window would have bound in six of seventeen windows at one or two
workers, and the 23% afternoon would have been a stop at 100%. Pro&apos;s limits
are the limits of a tool you use in sessions, not of one you leave running.&lt;/p&gt;
&lt;p&gt;These are modelled rows. If the real Pro allowance is more generous than a
tenth of Ultra&apos;s the cap hours move later; if the model-scoped windows bite
differently at the smaller tiers they move earlier. Treat the shape as the
finding, the hour as the estimate.&lt;/p&gt;
&lt;h2&gt;Where Pro is the right plan, and what its limits are&lt;/h2&gt;
&lt;p&gt;Pro is right when the agent is a tool you pick up, not a worker you leave
running: a few evenings a week, a problem at a time, with a human reading
every diff. Pro&apos;s limits are two windows, five hours and a week, and the
measured rate puts the weekly one at about four busy hours: five busy hours
a week is about 12% of an Ultra week, which is 116% of a Pro week, so at
that pace the Pro cap lands around the last day, and anything lighter fits. It is also the right plan
to find out whether you like the loop at all, because the five-hour window
will tell you within a week whether you are a Pro-shaped user: if it stops
you more than once a week, you are not. Annual billing takes it to $17 a
month, paid up front.&lt;/p&gt;
&lt;h2&gt;Where Max is, and whether it is worth it&lt;/h2&gt;
&lt;p&gt;Max is right when you work with the agent most days and nothing runs while
you sleep. Is Max worth it over Pro? If the five-hour window has stopped you
more than once in a week, yes, and the step is the cheapest one on the
ladder: five times the allowance for five times the price, plus the API
credits. Three of my eight weeks fit it, and those were weeks of 30 to 46%
on Ultra: a working week with real multi-hour sessions and one worker
alive. One always-on worker alone is about 84% of a Max week, which is
tight but holds; a worker and a working week of steering does not. The
five-hour window on Max never bound in anything I measured, so Max&apos;s
practical limit is the weekly one. Max also includes $100 of API credits a
month, which is a quiet way of saying the overflow is already paid for at
list price. If you would pay $200 for Ultra mainly for the headroom, try Max
for a month and read the meter on Wednesday morning.&lt;/p&gt;
&lt;h2&gt;Where Ultra is&lt;/h2&gt;
&lt;p&gt;Ultra is right when anything runs unattended, or when you steer for thirty
hours a week, or when a cap mid-task costs you more than $100 a month would.
On my account it held every week at 30 to 80% with one or two workers
alive and a person typing, and it capped once in eight weeks, in a week
the governor was not watching. The structural difference is the one the
pricing page footnotes: no five-hour window. For a single developer that
means the busy afternoon is never the problem; for anyone running an agent
through a backlog it means the only meter to watch is the weekly one, and
it resets on a fixed day. Two always-on workers is where Ultra gets tight,
and four is over, so Ultra is one developer and a small fleet, not a large
one. Beyond that you want a second account or the API.&lt;/p&gt;
&lt;h2&gt;When Team seats beat two Max plans&lt;/h2&gt;
&lt;p&gt;Team pricing is per person. A Standard seat is $20 a month billed annually
or $25 monthly and the page says only &quot;more usage than Pro&quot;; a Premium seat
is $100 annual or $125 monthly and five times a Standard seat. Priced
annually, a Premium seat costs exactly what Max costs, and buys roughly the
same allowance, so for two people who each need a Max-sized week the choice
is not about usage at all. Team wins when you want one bill, central
administration and shared conventions; two Max plans win when each person
wants their own API credits, which the page lists on Max and Ultra and not
on Team seats, or when one of the two actually needs Ultra, which Team does
not sell. The Standard seat is the interesting one: it is Pro&apos;s price with
&quot;more usage than Pro&quot;, so for a team of occasional users it is the cheapest
way to put several people on a plan. In the picker the Team rows give every
person the same hours and split the always-on workers across the seats; the
Standard row is a floor, because the page gives it no multiplier.
Enterprise is $20 a seat at twenty seats minimum with usage billed at API
rates, which is a different product: predictable per-seat cost and a
metered bill, no windows.&lt;/p&gt;
&lt;h2&gt;When pay-per-token wins&lt;/h2&gt;
&lt;p&gt;Below about five busy hours a week with no plan already in hand, pay per
token. Five hours of the kind of session I run is $100 to $380 a week at
list price by the CLI&apos;s own estimate, which is already past Pro&apos;s monthly
price in a week, so the break-even arrives early; but a lighter user, one
who asks and reads rather than steers, can spend a month under $20. The
API has no windows and no five-hour clock, which also makes it the right
answer for anything that must not pause: a scheduled job, a hook, a review
bot. For everything else the plans are cheaper by a wide margin. Ultra&apos;s
$46 a week bought 20 to 94 times that in list-price inference in my busy
weeks, and even the quiet weeks cleared the plan price. The
&lt;a href=&quot;/data/inference-plans/&quot;&gt;plan finder&lt;/a&gt; puts these tiers next to the other
vendors&apos; plans on the same tokens-per-dollar axis if you want the wider
comparison.&lt;/p&gt;
&lt;h2&gt;Tested with&lt;/h2&gt;
&lt;p&gt;Claude Code 2.1.322 and Codex CLI 0.167.0 were the installed versions when
this was written. The usage telemetry runs from September 16 to November 12,
2026, on one $200 account; the transcript tables run from July 9 to October
31 and come from the earlier Codex study. The plan names, prices and
multipliers are &lt;a href=&quot;http://claude.com/pricing&quot;&gt;claude.com/pricing&lt;/a&gt; as it read on 2026-11-11, on two reads
the same day; the page changes without a dated changelog, and the Max 20x
to Ultra rename is the proof. The five-hour window&apos;s last reading on the
account was 2026-10-31 02:28Z, and the latest reading, 2026-11-12, reports
weekly windows only. A weekly check compares the installed versions and the
age of the telemetry against this page and flags it for a refresh when
either tool moves by a minor version or the data passes ninety days. Every
number in this guide comes from the tables under the charts above, which
are the account&apos;s own readings; if you want the full set of readings behind
them, ask me through the &lt;a href=&quot;/contact/&quot;&gt;contact page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>claude-code</category><category>subscriptions</category><category>cost</category><category>agents</category><category>fleet-ops</category></item><item><title>OpenCode vs Claude Code: Is the Open-Source Agent a Real Alternative?</title><link>https://jedarden.com/guides/opencode-vs-claude-code/</link><guid isPermaLink="true">https://jedarden.com/guides/opencode-vs-claude-code/</guid><description>OpenCode vs Claude Code measured on the same tasks and a fleet record: what you give up leaving the Anthropic box, what you gain, and when to run both.</description><pubDate>Thu, 12 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;OpenCode is a real alternative to Claude Code, and the two are not really
competing for the same dollar.&lt;/strong&gt; Claude Code is a harness sold with a set of
models: you pay Anthropic $20, $100 or $200 a month and the agent is included.
OpenCode is a harness with no models in the box: the program is free and
open source, and you bring a provider, a subscription of theirs, a
pay-per-token key, a local runtime, or one of a dozen free models that come
and go. Both read the same instructions file and run the same shell-centred loop,
and in September 2026 both ran unattended on this machine against the same
backlog. The question behind the search is practical: what do I give up and
gain if I leave the Anthropic box, and when is the answer to keep one foot
in each? The installed binaries, two months of fleet telemetry, a small
headless trial and the vendors&apos; price pages answer it better than another
opinion would.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Yes, OpenCode is a real alternative, with two caveats: the
version I ran is a major release behind its own documentation, and my
hands-on use of it was headless, never interactive. Pick &lt;strong&gt;Claude Code
first&lt;/strong&gt; for Anthropic&apos;s models on a flat monthly price, a terminal you
steer, or guardrails a team can pin without writing code. Pick &lt;strong&gt;OpenCode
first&lt;/strong&gt; if the model is the thing you want to choose, open source is a
requirement, you want a free lane for public work, or you want to hook the
loop from inside in TypeScript. Run &lt;strong&gt;both&lt;/strong&gt; when work is parallel or
unattended and a second meter on a second provider is worth having; one
&lt;code&gt;AGENTS.md&lt;/code&gt; serves both. Stay on &lt;strong&gt;a free model or a metered key&lt;/strong&gt; under
five hours a week. Leaving Claude Code costs you the plan economics and a
mature permission system; it buys you every other model and a bill that is
only the model&apos;s price.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Which one fits you?&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-harness-quiz=&quot;opencode-vs-claude-code&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;If the quiz does not load, the questions it asks are these, and the sections
below answer each one:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What do you want to spend on a coding agent each month: nothing, $10 to $20, $100 to $200, or whatever the meter says?&lt;/li&gt;
&lt;li&gt;Which models do you want behind it: Anthropic&apos;s, several switched by task, the cheapest capable one, or local?&lt;/li&gt;
&lt;li&gt;Does the agent have to be open source?&lt;/li&gt;
&lt;li&gt;Do you steer every step, hand off and come back, run it headless in scripts, or run several at once?&lt;/li&gt;
&lt;li&gt;What do your guardrails need to do: nothing special, block a few commands, block or rewrite as a subprocess a team controls, or hook the loop in code?&lt;/li&gt;
&lt;li&gt;Who else uses it: just you, a small team sharing conventions, or a platform team setting rules?&lt;/li&gt;
&lt;li&gt;How do you feel about depending on one provider?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;What was measured&lt;/h2&gt;
&lt;p&gt;Everything here comes from one machine. Claude Code has run on it since
March 2026, interactively on an Anthropic plan and, from July, unattended on
GLM models through a gateway, the fleet &lt;a href=&quot;/guides/codex-vs-claude-code/&quot;&gt;the Codex
guide&lt;/a&gt; and &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;the GLM plan
review&lt;/a&gt; measured. OpenCode 1.18.29 was installed in
September 2026 for the same fleet, ran for two days on a free stealth model
across nine public repositories, 170 attempts, and then sat idle, because the
gateway it was meant to use for GLM never worked through it. Four kinds of
evidence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The fleet record.&lt;/strong&gt; Every unattended attempt since September 12 leaves a
trace with its adapter, outcome, duration and failure reason: 18,380
attempts across 85 repositories, 170 of them OpenCode&apos;s, re-read with the
same outcome classifier the Codex guide used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The binaries and the docs.&lt;/strong&gt; OpenCode&apos;s CLI, config, agents, permissions
and plugin contract, probed on the installed version and read on the
vendor&apos;s pages on 2026-11-12, next to Claude Code&apos;s.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A hands-on trial.&lt;/strong&gt; Three small tasks on one public Python repository,
headless, in four harness-and-model lanes, each capped at fifteen minutes,
each diff read.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The vendors&apos; price pages&lt;/strong&gt;, captured the day this was written.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Two caveats before any number. The OpenCode fleet record is small: two days,
one stealth model, nine repositories, against two months and thousands of
attempts for the other harnesses. And I have never used OpenCode&apos;s terminal
interface; every sentence about its TUI, sharing and agents comes from the
documentation and the CLI&apos;s own help. The Claude Code side has four months of
interactive use behind it, an asymmetry to keep in mind when I sound surer
about one than the other.&lt;/p&gt;
&lt;h2&gt;How a turn runs in each&lt;/h2&gt;
&lt;p&gt;Read an OpenCode run next to a Claude Code run and the skeleton is the one
every agent of this generation has: load the instructions file, read, run
shell commands, patch, run the tests, write a summary. OpenCode even reads
Claude Code&apos;s files. Its rules page says &lt;code&gt;CLAUDE.md&lt;/code&gt; in the project is &quot;used
if no &lt;code&gt;AGENTS.md&lt;/code&gt; exists&quot; and &lt;code&gt;~/.claude/CLAUDE.md&lt;/code&gt; is used if there is no
global OpenCode &lt;code&gt;AGENTS.md&lt;/code&gt;, and it loads skills from &lt;code&gt;~/.claude/skills/&lt;/code&gt;. On
this machine that meant both tools arrived at the trial with the same
standing instructions. The differences are in what wraps the loop, and the
first exhibit puts them side by side.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ocv-exhibit=&quot;anatomy&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;OpenCode 1.18.29&lt;/th&gt;
&lt;th&gt;Claude Code 2.1.322&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The program&lt;/td&gt;
&lt;td&gt;Open source (MIT), free; TUI, desktop and web from one binary&lt;/td&gt;
&lt;td&gt;Proprietary; free to install, needs an Anthropic plan, key or compatible endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instructions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;, falling back to &lt;code&gt;CLAUDE.md&lt;/code&gt;; &lt;code&gt;instructions&lt;/code&gt; globs and URLs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; from home, parents and repo, plus &lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tools&lt;/td&gt;
&lt;td&gt;bash, read, write, edit, patch, glob, grep, webfetch, websearch, task, MCP&lt;/td&gt;
&lt;td&gt;Bash, Read, Edit, Write, Glob, Grep, Agent, WebFetch, WebSearch, Monitor, MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Permissions&lt;/td&gt;
&lt;td&gt;Allow all by default, ask on loops and outside the project; &lt;code&gt;--auto&lt;/code&gt; headless. 2.x: ordered allow/ask/deny rules with a shell scanner&lt;/td&gt;
&lt;td&gt;Six modes from default to bypass; &lt;code&gt;--allowedTools&lt;/code&gt; rules; managed settings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hooks&lt;/td&gt;
&lt;td&gt;In-process plugin: rewrite tool args in place or throw to deny; 2.x adds permission.evaluate, session.context, shell hooks&lt;/td&gt;
&lt;td&gt;Subprocess hooks on some thirty events; PreToolUse returns allow, deny, ask or defer and can rewrite the input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subagents&lt;/td&gt;
&lt;td&gt;build, plan, general, explore; custom agents as Markdown, each with its own provider and model&lt;/td&gt;
&lt;td&gt;Agent tool and &lt;code&gt;.claude/agents&lt;/code&gt;; full standing context re-read per call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Records&lt;/td&gt;
&lt;td&gt;SQLite database, never pruned here; export and import; share links; &lt;code&gt;opencode stats&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;JSONL transcripts, deleted after 30 days; JSON result with usage and cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Models&lt;/td&gt;
&lt;td&gt;Any provider in the models.dev catalog or any OpenAI-compatible endpoint; twelve free models&lt;/td&gt;
&lt;td&gt;Anthropic&apos;s models, or a compatible endpoint via &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;$0 software plus the model&apos;s price; Go at $10 or $40&lt;/td&gt;
&lt;td&gt;Pro $20, Max $100, Ultra $200, or API tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Instructions.&lt;/strong&gt; Both attach a repository &lt;code&gt;AGENTS.md&lt;/code&gt;. Claude Code also
attaches &lt;code&gt;CLAUDE.md&lt;/code&gt; from your home directory and every directory above the
checkout; OpenCode reads those files only as a fallback, and its
&lt;code&gt;instructions&lt;/code&gt; key takes globs and remote URLs. Keep one &lt;code&gt;AGENTS.md&lt;/code&gt;, have
&lt;code&gt;CLAUDE.md&lt;/code&gt; point at it, and both read the same rules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tools.&lt;/strong&gt; The two tool sets are near-identical in kind. OpenCode adds a
&lt;code&gt;patch&lt;/code&gt; tool and a &lt;code&gt;question&lt;/code&gt; tool for asking the user; Claude Code adds
&lt;code&gt;Monitor&lt;/code&gt; for watching a long command. In the trial both spent most of their
calls in the shell and the file reader.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Permissions and hooks.&lt;/strong&gt; This is the largest real difference, and it cuts
both ways. On the installed OpenCode the &lt;code&gt;build&lt;/code&gt; agent&apos;s permission table is
one rule, allow everything, then ask on a detected loop and ask when leaving
the project directory; &lt;code&gt;--auto&lt;/code&gt; approves the rest for a headless run. The
2.x documentation describes something much richer, ordered allow/ask/deny
rules per action with a shell scanner that applies them to every subcommand
and organisation policies no saved approval can override, but I have not run
that version. Claude Code&apos;s permission modes and &lt;code&gt;--allowedTools&lt;/code&gt; rules have
been there for a year and the fleet leans on them daily.&lt;/p&gt;
&lt;p&gt;Guardrails are where the architectures differ. OpenCode&apos;s plugin runs
in-process, in TypeScript, and its &lt;code&gt;tool.execute.before&lt;/code&gt; hook gets the live
arguments object: the house plugin rewrites a command by mutating that object
in place and denies one by throwing, whose message the model sees as a
failed tool call and routes around. The 2.x API goes further inward, with a
&lt;code&gt;permission.evaluate&lt;/code&gt; hook that sets allow, ask or deny and a
&lt;code&gt;session.context&lt;/code&gt; hook that edits the system prompt, the messages and the
tool set before every model call. Claude Code&apos;s hooks are subprocesses in any
language on some thirty events; a &lt;code&gt;PreToolUse&lt;/code&gt; hook returns allow, deny, ask
or defer and can rewrite the input, and managed settings pin that for a
team. The choice is between a hook system a platform team can write in
Python and distribute as policy, and a plugin API that lets one person reach
much deeper into the loop. On this machine the same rule engine runs under
both, as a subprocess hook for Claude Code and as a plugin for OpenCode.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Delegation.&lt;/strong&gt; OpenCode agents come in two kinds: the primary ones you talk
to, &lt;code&gt;build&lt;/code&gt; and &lt;code&gt;plan&lt;/code&gt;, and subagents, &lt;code&gt;general&lt;/code&gt; and &lt;code&gt;explore&lt;/code&gt;, built in; a
custom agent is a Markdown file whose header names a model, so a subagent
can run on a different provider from its parent. Claude Code&apos;s subagents can
pick a different Anthropic model, not a different provider, and it matters
for cost: in the Codex guide&apos;s telemetry its subagents
consumed 17% of interactive tokens for 4% of the output. I did not measure
OpenCode subagents; the fleet&apos;s headless runs never spawned one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Records.&lt;/strong&gt; OpenCode keeps every session in a local SQLite database; on
this machine &lt;code&gt;opencode session list&lt;/code&gt; still shows the fleet&apos;s September
sessions, and &lt;code&gt;opencode stats&lt;/code&gt; sums tokens and cost per model from the same
database. Claude Code&apos;s transcript is richer, with its own running dollar
estimate, but it is deleted thirty days after its last write unless you
raise &lt;code&gt;cleanupPeriodDays&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Headless use.&lt;/strong&gt; Both run from a pipe: &lt;code&gt;opencode run --format json --auto&lt;/code&gt;
emits one JSON event per line with tokens and cost per step; &lt;code&gt;claude -p --output-format json&lt;/code&gt; emits one result object with usage, a cost estimate
and the turn count. The difference I hit was in what the provider returned
through them, and the trial section has it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Versions.&lt;/strong&gt; The installed OpenCode is from September; the release page
showed v2.2.7 on 2026-11-10 and the documentation describes that 2.x line,
whose config keys, permission model and plugin API all differ from what is
installed. Claude Code ships just as often. Anything here about how a turn
runs is true of the versions in the &quot;Tested with&quot; line.&lt;/p&gt;
&lt;h2&gt;What the fleet record says&lt;/h2&gt;
&lt;p&gt;The caveat first. These are unattended workers on a shared backlog, the
harnesses ran different models on different repositories, and OpenCode&apos;s row
is two days against two months. What the record can say is that OpenCode on
a free stealth model did the job the fleet gave it.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ocv-exhibit=&quot;fleet&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Harness, 90 days to 2026-11-12&lt;/th&gt;
&lt;th&gt;Attempts&lt;/th&gt;
&lt;th&gt;Verified&lt;/th&gt;
&lt;th&gt;Yield&lt;/th&gt;
&lt;th&gt;Excluding splits&lt;/th&gt;
&lt;th&gt;Median attempt&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI (ChatGPT Pro)&lt;/td&gt;
&lt;td&gt;9,879&lt;/td&gt;
&lt;td&gt;4,939&lt;/td&gt;
&lt;td&gt;50.0%&lt;/td&gt;
&lt;td&gt;63.3%&lt;/td&gt;
&lt;td&gt;6.0 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code on GLM&lt;/td&gt;
&lt;td&gt;8,176&lt;/td&gt;
&lt;td&gt;3,252&lt;/td&gt;
&lt;td&gt;39.8%&lt;/td&gt;
&lt;td&gt;53.1%&lt;/td&gt;
&lt;td&gt;27.9 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code on Anthropic&lt;/td&gt;
&lt;td&gt;85&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;16.5%&lt;/td&gt;
&lt;td&gt;22.6%&lt;/td&gt;
&lt;td&gt;3.4 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode on a free Zen model&lt;/td&gt;
&lt;td&gt;170&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;60.0%&lt;/td&gt;
&lt;td&gt;71.8%&lt;/td&gt;
&lt;td&gt;7.5 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;OpenCode&apos;s 170 attempts all ran on &lt;code&gt;opencode/space-bunny-free&lt;/code&gt; on September
23 and 24 across nine public repositories.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What OpenCode did.&lt;/strong&gt; On September 23 the fleet was pointed at OpenCode
with a free stealth model, &lt;code&gt;space-bunny-free&lt;/code&gt;, on a short allow-list of
public repositories, because a free model&apos;s data terms are not something to
test on private code. In two days it made 170 attempts, 102 passed
verification and 128 commits landed: a 60% yield, 72% excluding the attempts
that split a task into smaller ones, a median of seven and a half minutes.
Its failures were ordinary: 22 &lt;code&gt;go build&lt;/code&gt; gate failures, 13 of them in one
repository where it verified nothing, nine &lt;code&gt;npm test&lt;/code&gt; failures, six
infrastructure. The Codex guide&apos;s deeper pass found the highest reopen rate
of any harness for those closures, 27%, the pattern of a fast worker that
closes before the paperwork is done. The model has since been retired from
the free catalog; stealth models are loaned, not sold.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What OpenCode did not do.&lt;/strong&gt; The fleet also had an OpenCode adapter for
GLM-5.3-Flash through the Claude Code workers&apos; gateway, and not one attempt
trace carries it. The trial explains why.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The context rows.&lt;/strong&gt; Codex and Claude Code on GLM are the fleet&apos;s
workhorses and their numbers are the earlier guides&apos; numbers: Codex fast and
inclined to close early, Claude Code on GLM slower and more often killed by
its provider than by the task. Claude Code on Anthropic&apos;s models barely
appears because those models were spent where a person was watching. Read
the rows as &quot;each harness did the work it was given&quot;, not as a ranking.&lt;/p&gt;
&lt;h2&gt;The hands-on trial&lt;/h2&gt;
&lt;p&gt;The fleet record compares different work on different repositories, so I
ran both harnesses on the same work: three small tasks on one public Python
repository of mine, 727 tests in eighteen seconds, headless, one run per
cell, fifteen-minute cap, every diff read afterwards. The tasks were to add
unit tests for a function that had none, to find and fix a bug I had
injected into the ledger key (five failing tests), and to write a README
section from two source files with five facts it had to get right. Four
lanes: OpenCode on a free Zen stealth model, OpenCode on GLM-5.3-Flash
through the fleet&apos;s gateway, Claude Code on the same GLM through the same
gateway, and Claude Code on my Anthropic plan, which answered with Fable
5.2.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ocv-exhibit=&quot;trial&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;OpenCode, free Zen model&lt;/th&gt;
&lt;th&gt;OpenCode, GLM-5.3-Flash&lt;/th&gt;
&lt;th&gt;Claude Code, GLM-5.3-Flash&lt;/th&gt;
&lt;th&gt;Claude Code, Anthropic plan&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Add tests&lt;/td&gt;
&lt;td&gt;48 s, 6 tool calls, 733 pass, acceptable&lt;/td&gt;
&lt;td&gt;timed out at 15 min, no change&lt;/td&gt;
&lt;td&gt;133 s, 5 calls, 735 pass, acceptable&lt;/td&gt;
&lt;td&gt;38 s, 2 calls, 741 pass, acceptable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fix the injected bug&lt;/td&gt;
&lt;td&gt;46 s, 7 calls, 727 pass, acceptable&lt;/td&gt;
&lt;td&gt;timed out, bug still in place&lt;/td&gt;
&lt;td&gt;114 s, 5 calls, exact revert, acceptable&lt;/td&gt;
&lt;td&gt;30 s, 3 calls, exact revert, acceptable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Write a README section&lt;/td&gt;
&lt;td&gt;21 s, 5 calls, 171 words, acceptable&lt;/td&gt;
&lt;td&gt;timed out, no change&lt;/td&gt;
&lt;td&gt;128 s, 5 calls, 168 words, acceptable&lt;/td&gt;
&lt;td&gt;15 s, 2 calls, 181 words, acceptable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokens per task, as reported&lt;/td&gt;
&lt;td&gt;19k to 34k input, 41k to 77k cache read, 0.5k to 0.7k output, cost $0&lt;/td&gt;
&lt;td&gt;none reported&lt;/td&gt;
&lt;td&gt;18k to 59k input, 45k to 68k cache read, 0.7k to 2k output&lt;/td&gt;
&lt;td&gt;6 input, 69k to 77k cache read, 0.7k to 1.3k output, $0.35 to $0.43 estimated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Nine of the nine cells where a lane worked were acceptable, and the three
that were not belong to one pair. OpenCode on the fleet&apos;s GLM gateway never
produced a token: each run emitted empty steps, 125 to 974 of them, until
the cap, with no error anywhere, while Claude Code on the same model through
the same gateway did every task. That is the practical meaning of &quot;any
provider&quot;: the provider package has to agree with the endpoint&apos;s wire
format, and nothing tells you when it does not. Speed ordered the same way
in every task, Fable fastest, the free model close behind, GLM three to four
times slower, which is the model and gateway rather than the harness. Claude
Code on Fable did each task in two or three tool calls and wrote the longest
diffs, thirteen test cases to OpenCode&apos;s six; the free model fixed the bug
with a line a shade weaker than the original, which both Claude lanes
restored exactly; on the README all three got all five facts right.&lt;/p&gt;
&lt;p&gt;The standing context dominates input on this machine, 69k to 77k cached
tokens per Claude call and a comparable amount for OpenCode, which read the
same home &lt;code&gt;CLAUDE.md&lt;/code&gt; through its fallback; a clean machine would spend far
less. And a free stealth model doing three small tasks acceptably for
nothing is the most useful fact here for someone deciding whether to try
OpenCode at all. One run per cell on one small repository shows which pairs
work and roughly how fast; it does not rank quality.&lt;/p&gt;
&lt;h2&gt;What you pay&lt;/h2&gt;
&lt;p&gt;OpenCode&apos;s price is the model&apos;s price: the program is free, and the vendor&apos;s
own paid surface is OpenCode Zen, its hosted model gateway, with a
pay-as-you-go console, the free models, and a $10 Go subscription; anything
else is between you and the provider you bring. Claude Code&apos;s price
is a Claude plan, models included, or an Anthropic API key at list rates.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-ocv-exhibit=&quot;pay&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rung&lt;/th&gt;
&lt;th&gt;Harness&lt;/th&gt;
&lt;th&gt;Monthly&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A free Zen model&lt;/td&gt;
&lt;td&gt;OpenCode&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;Twelve models on the read date, each with its own retention and training terms; free-tier chat models require OpenCode as the client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode Go&lt;/td&gt;
&lt;td&gt;OpenCode&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;A basket of non-frontier models with per-model 5-hour (20%), weekly (50%) and monthly (100%) dollar caps; Go Plus $40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Pro&lt;/td&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;$20 ($17 annual)&lt;/td&gt;
&lt;td&gt;Anthropic&apos;s models with a 5-hour window and a weekly cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Max&lt;/td&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;5x Pro every 5 hours and every week; $100 of API credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Ultra&lt;/td&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;10x Pro weekly, no 5-hour limit for verified accounts; $200 of API credits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Per-token list rates on the OpenCode console, per million tokens in and
out: GLM 5.3 Flash $0.15 and $0.50; DeepSeek V4.1 Flash $0.30 and $1.20;
GPT 6 Luna $0.10 and $0.50; GLM 5.3 $1.40 and $4.40; Claude Sonnet 5.5 $2
and $10; Claude Opus 5.5 $4 and $20; Claude Fable 5.2 $8 and $40. Credit
purchases carry a 4.6% plus $0.31 fee.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Three things the ladder does not show. The free models are a rotating loan:
the one the fleet ran in September was gone by November, and the twelve on
the catalog today carry different data terms, from &quot;zero retention, no
training&quot; for the GLM, DeepSeek and MiniMax entries to &quot;data may be used to
improve the model&quot; for the stealth ones. Read the terms per model and keep
free models to public code, as the fleet did. The cheapest way to keep either
harness busy around the clock is still a GLM coding plan behind it, which
&lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;has its own measured review&lt;/a&gt; and lists both tools
as supported. And Claude Code on a plan is the only rung where the harness
and the frontier models come in one price; put Anthropic&apos;s models behind
OpenCode and you pay per token, with no window and no cap.&lt;/p&gt;
&lt;h2&gt;OpenCode Go: what $10 buys&lt;/h2&gt;
&lt;p&gt;OpenCode Go is the subscription rung on that ladder: $10 a month, with Go
Plus at $40 and Go Teams at $20 a member. It is not a bucket of tokens and
not a count of messages. Every model in the basket has a monthly limit in
dollars, spent at that model&apos;s per-token console price, with a fifth of it
available in any five hours and half of it in any week. The vendor&apos;s page
says each model&apos;s limit &quot;determines how its usage counts toward those
allowances&quot;, and every response reports what it counted. These are ten of
the thirty-two models, as the page read on 2026-11-14:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Go limit&lt;/th&gt;
&lt;th&gt;Per 1M in / out&lt;/th&gt;
&lt;th&gt;Requests a month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;$0.30 / $1.20&lt;/td&gt;
&lt;td&gt;216,670&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;$60&lt;/td&gt;
&lt;td&gt;$0.15 / $0.50&lt;/td&gt;
&lt;td&gt;31,580&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MiniMax M3&lt;/td&gt;
&lt;td&gt;$60&lt;/td&gt;
&lt;td&gt;$0.30 / $1.20&lt;/td&gt;
&lt;td&gt;16,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi K2.7 Code&lt;/td&gt;
&lt;td&gt;$60&lt;/td&gt;
&lt;td&gt;$0.95 / $4.00&lt;/td&gt;
&lt;td&gt;6,750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.8 Flash&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;$0.15 / $0.47&lt;/td&gt;
&lt;td&gt;27,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT 6 Luna&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$0.10 / $0.50&lt;/td&gt;
&lt;td&gt;21,130&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 5.5&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$0.10 / $0.50&lt;/td&gt;
&lt;td&gt;19,230&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$1.40 / $4.40&lt;/td&gt;
&lt;td&gt;1,080&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grok 4.7&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$2.00 / $6.00&lt;/td&gt;
&lt;td&gt;845&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi K3.1 Pro&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$2.00 / $10.00&lt;/td&gt;
&lt;td&gt;735&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The last column is the vendor&apos;s own estimate of requests per month; a fifth
of it is the five-hour allowance and half of it the weekly one. DeepSeek&apos;s
price is the peak rate and halves off-peak.&lt;/p&gt;
&lt;p&gt;So $10 buys between $15 and $100 of list-price tokens depending on the
model: ten times the fee at the top of the table, one and a half times on
the $15 models. The vendor explains the spread itself. Where it has a bulk
discount or its own capacity it passes that on as a higher limit; where it
has neither, you get &quot;a little more than if you paid the model providers
directly&quot;. Anthropic&apos;s only entry is Claude Haiku 5.5. Sonnet, Opus and
Fable are not in the basket, at any Go tier.&lt;/p&gt;
&lt;p&gt;The request estimates are the vendor&apos;s, and they assume a particular
request: for GLM-5.3-Flash, 1,000 fresh input tokens, 55,000 cached and 200
out, which prices at $0.0019 and is how $60 becomes 31,580 requests. I can
set that beside a pace I have measured. An always-on worker in this fleet
makes about 21 model calls an hour, so 31,580 Flash requests is roughly
1,500 worker-hours, two workers running all month. The fleet&apos;s own GLM calls
were heavier than the vendor&apos;s assumption, about 69,000 tokens each in
September, which brings it nearer one and a half. On GLM-5.3 the same $10
is 1,080 requests, about 51 worker-hours, two days of one worker. For
scale: the &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;GLM Coding Plan&lt;/a&gt; covered one
always-on worker on either model at its $80 tier, and on
&lt;a href=&quot;/guides/claude-pro-vs-max-vs-ultra/&quot;&gt;a Claude plan&lt;/a&gt; one always-on worker
cost about 42% of a $200 Ultra week.&lt;/p&gt;
&lt;p&gt;On that arithmetic Go&apos;s allowance on a Flash-class model is the most
unattended throughput per dollar on this page, and its allowance on the
stronger models is a taster. Two cautions before leaning on it. I have not
run a worker on Go: the fleet&apos;s OpenCode record is on free console models
and a GLM gateway, so the paragraph above is the vendor&apos;s table carried
through my pace, not a result. And the Go page states no concurrency limit,
which is the wall the fleet actually hit on the GLM plan; a limit nobody
has published is one you find by running into it.&lt;/p&gt;
&lt;p&gt;At the limit, requests are blocked unless you switch on Extra Usage, which
bills the pay-as-you-go balance instead, and the free models keep working
either way. Most of the basket is listed as not used for training with zero
retention; the OpenAI, xAI and Anthropic entries keep requests for thirty
days, and the two &quot;Contributor&quot; models are discounted in exchange for
training on your prompts, which the default privacy setting blocks until an
owner turns them on.&lt;/p&gt;
&lt;p&gt;Go is also not an OpenCode-only decision. The vendor lists Claude Code and
Codex among the clients it has validated against Go, with the caveat that it
does not promise they will keep working, so the $10 basket can sit behind
either harness on this page.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go fits&lt;/strong&gt; one person who wants a paid, capped lane on open-weight
models for less than any frontier plan; one or two unattended workers on
a Flash-class model, on work with tests to catch the model; and anyone
who wants to try several model families under one key before choosing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go does not fit&lt;/strong&gt; work that needs a frontier model, which the basket
does not hold; a fleet that needs a stated concurrency; or a long task on
one of the $15 models: 220 requests in five hours on GLM-5.3 is an
afternoon of steady use.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Where OpenCode is the better fit&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The model is the decision.&lt;/strong&gt; A cheap model for chores and a frontier
model when it matters, a local model on private code, whatever is new this
week: OpenCode&apos;s catalog and per-agent model setting are the point. Claude
Code can be pointed at one compatible endpoint; OpenCode is built around
having many.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open source is a requirement.&lt;/strong&gt; The program is MIT-licensed and you can
read the loop you are trusting with your shell; the guard plugin here was
designed around exactly how the hook and the executor share an object.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A free lane for public work.&lt;/strong&gt; Twelve free models on the day of
writing; the fleet&apos;s two days on one of them delivered a 60% yield for
nothing but the data terms. For open-source maintenance or a first week of
learning what an agent does, that is hard to argue with.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You want to hook the loop from inside.&lt;/strong&gt; A plugin that edits the system
prompt, the message list or the outgoing request before each model call
has no equivalent in Claude Code&apos;s subprocess hooks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You already pay someone else.&lt;/strong&gt; If you have a ChatGPT plan, a Copilot
seat or a GLM coding plan, OpenCode runs on it; trying it costs an
&lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You would switch, or add Claude Code, when you want Anthropic&apos;s frontier
models on a flat monthly price with a predictable weekly reset, or when a
platform team needs to pin guardrails for many people without writing
TypeScript.&lt;/p&gt;
&lt;h2&gt;Where Claude Code is the better fit&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You want Anthropic&apos;s models and a flat bill.&lt;/strong&gt; A plan buys the harness
and the models together, with windows you can plan a week around. Behind
OpenCode the same models are metered per token.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A team shares conventions, or a platform team sets rules.&lt;/strong&gt; Hooks in
any language, a &lt;code&gt;PreToolUse&lt;/code&gt; hook that can allow, deny, ask or rewrite,
and managed settings that pin them for everyone. On this machine that hook
is why no agent has committed a workflow file or a floating image tag; the
same engine gates OpenCode too, but it had to be written as a plugin first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A mature permission system today.&lt;/strong&gt; Six modes, allow rules by tool and
prefix, a classifier mode. The installed OpenCode is allow-everything plus
&lt;code&gt;--auto&lt;/code&gt;; the richer model is in a version I have not run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You steer from the terminal.&lt;/strong&gt; Here my evidence is one-sided: four
months of interactive Claude Code sessions and none in OpenCode&apos;s TUI. I
will not claim the comparison, only that Claude Code&apos;s interactive loop,
plan mode and named tools are what I reach for when something needs
steering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage accounting you can trust.&lt;/strong&gt; Claude Code&apos;s JSON result carried
tokens and a cost estimate in every trial run, on both providers. OpenCode
reported tokens on its own Zen model and nothing at all through the GLM
gateway, so one lane of the trial has no usage figure.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You would switch, or add OpenCode, when you need a model Claude Code cannot
reach, a free lane for a public repository, or an in-process hook that edits
the prompt or the request itself.&lt;/p&gt;
&lt;h2&gt;When you want both, and when you want neither&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Both, each with a job.&lt;/strong&gt; The fleet already runs this way: Claude Code
where a person steers and Anthropic&apos;s models earn their price, cheaper
harness-and-model pairs for the unattended lane. OpenCode slots into the
second role at no editorial cost, because one &lt;code&gt;AGENTS.md&lt;/code&gt; serves both and the
same rule engine can gate both. Give each harness a named class of work, run
one shared acceptance check, and compare finished work rather than tokens. A
second provider behind a second harness is also a second meter that does not
fail with the first. Drop one when its lane sits idle for three weeks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Neither, for now.&lt;/strong&gt; Under five hours a week, with no plan in hand, run
OpenCode on a free model against a public repository to learn the loop at no
cost, then put a pay-per-token key behind whichever harness you preferred.
Read the bill after a month and buy a plan when it crosses the plan price
twice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The $10 and $20 tiers.&lt;/strong&gt; OpenCode Go buys a basket of non-frontier models
with per-model caps and falls back to the free models at the limit; Claude
Pro buys Anthropic&apos;s models with a five-hour window a busy afternoon will
hit. Either is the way to find out which loop you prefer, not the plan to
run a long task on while you are away.&lt;/p&gt;
&lt;h2&gt;Tested with&lt;/h2&gt;
&lt;p&gt;OpenCode 1.18.29 and Claude Code 2.1.322 were the installed versions when
this was written; Codex CLI 0.167.0 appears only in the fleet table. The
fleet record runs from 2026-09-12, the first day attempt traces exist,
through 2026-11-12; OpenCode&apos;s share of it is September 23 and 24. The
trial, the CLI probes and the price captures were made on 2026-11-12.
OpenCode&apos;s documentation on that date described the 2.x line (v2.2.7 shipped
on 2026-11-10); where the installed version and the docs disagree I have said
which is which, and a refresh should re-run the trial on the current release
before trusting any sentence about permissions or plugins. The prices are
the vendors&apos; pages as they read on 2026-11-12, and the OpenCode Go section
is the vendor&apos;s Go page as it read on 2026-11-14; none carries a dated
changelog. A weekly check compares the installed versions and the age of the
telemetry against this page and flags it for a refresh when either tool
moves by a minor version or the data passes ninety days. The &quot;Tested with&quot;
line under the title is the one to trust.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>claude-code</category><category>opencode</category><category>agents</category><category>open-source</category><category>subscriptions</category><category>fleet-ops</category></item><item><title>GLM Coding Plan Review: Four Months of GLM-5.3 Behind Claude Code</title><link>https://jedarden.com/guides/glm-coding-plan/</link><guid isPermaLink="true">https://jedarden.com/guides/glm-coding-plan/</guid><description>Z.ai&apos;s GLM Coding Plan measured from the inside: what a Max tier delivered to a fleet of unattended Claude Code workers from July to November 2026, which meter actually stops you (it is not the credits), what the attempts died of, what the same tokens cost at list price, and which tier fits which kind of week.</description><pubDate>Mon, 09 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;The GLM Coding Plan is the cheapest way I know to keep a coding agent
busy around the clock, and the thing that stops you is not the thing on the
pricing page.&lt;/strong&gt; &lt;a href=&quot;http://Z.ai&quot;&gt;Z.ai&lt;/a&gt; sells a subscription that lets Claude Code, Codex,
OpenCode, Cline and about twenty other tools run GLM-5.3 and GLM-5.3-Flash
instead of the vendor&apos;s own models, for $18, $80 or $168 a month. Since
July 2026 a fleet of unattended Claude Code workers on my machines has run
on it: about 116,000 sessions, a billion output tokens, and 1.5 million
model calls that the vendor&apos;s own usage dashboard counted. This is what that
bought, what it broke, and who should buy which tier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Buy it if you want &lt;strong&gt;cheap, unattended throughput&lt;/strong&gt; on work
that has a test suite to catch the model: the fleet closed about 40% of
its attempts on GLM against 50% for Codex at a reasoning budget that costs
ten times more. &lt;strong&gt;Lite&lt;/strong&gt; covers a person pairing with one agent all week.
&lt;strong&gt;Pro&lt;/strong&gt; covers one always-on worker on either model. &lt;strong&gt;Max&lt;/strong&gt; covers a
fleet of roughly eight to sixteen Flash workers by credits, which is also
about where its &lt;strong&gt;concurrency cap&lt;/strong&gt; sits, and that cap, not the credit
meter, is the wall you will actually hit. Do not buy it as a replacement
for a frontier model where a person is steering and every minute of their
time counts: attempts took five times longer than Codex and a quarter of
failures were the model running out of road. The &lt;strong&gt;five-hour credit
window never bound&lt;/strong&gt; a Max account at ten to twenty workers after the
switch to GLM-5.3; the plan&apos;s &lt;strong&gt;concurrency cap&lt;/strong&gt; did, every busy hour.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;What you are buying&lt;/h2&gt;
&lt;p&gt;The plan is a credit allowance in two windows, spent through supported
tools only. Prices are as displayed on the plan page on 2026-11-09; the
yearly figures are billed up front.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Per month (yearly billing)&lt;/th&gt;
&lt;th&gt;Credits per 5 hours&lt;/th&gt;
&lt;th&gt;Credits per week&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lite&lt;/td&gt;
&lt;td&gt;$18 ($12.60)&lt;/td&gt;
&lt;td&gt;2,000&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro&lt;/td&gt;
&lt;td&gt;$80 ($56)&lt;/td&gt;
&lt;td&gt;12,000&lt;/td&gt;
&lt;td&gt;60,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max&lt;/td&gt;
&lt;td&gt;$168 ($117.60)&lt;/td&gt;
&lt;td&gt;28,000&lt;/td&gt;
&lt;td&gt;140,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The vendor&apos;s own labels for the three are &quot;one project at a time&quot;, &quot;6× Lite
usage, one to two projects&quot; and &quot;14× Lite usage, two or more projects&quot;.&lt;/p&gt;
&lt;p&gt;A credit is a weighted token count. Every model call costs (input tokens ×
input weight + cached input × cache weight + output × output weight) ÷
10,000, and the weights are what make the two models feel so different:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cached input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3&lt;/td&gt;
&lt;td&gt;6.9&lt;/td&gt;
&lt;td&gt;1.7&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;2.3&lt;/td&gt;
&lt;td&gt;0.56&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Off-peak usage costs half. Peak is weekdays 14:00 to 18:00 Singapore time,
which is 06:00 to 10:00 UTC, so a US or European working day is almost
entirely off-peak. The five-hour window starts when you first spend from it
and refills five hours later; the weekly window starts at your order time
and resets every seven days. The vendor&apos;s own estimate for Max is 676 to
1,352 million GLM-5.3 tokens a week at a 95% cache-hit rate, the low end if
you only ever work during Singapore&apos;s afternoon.&lt;/p&gt;
&lt;p&gt;Three policy lines matter more than the arithmetic. The plan may only be
used inside officially supported tools, not called as an API. Benefits are
exclusive to the subscriber and account sharing is prohibited. Purchases
are final; there are no refunds, and the usage policy and the FAQ disagree
on whether you must cancel three days or 24 hours before renewal. The policy
pages say nothing either way about unattended or automated use, which is
how I use it.&lt;/p&gt;
&lt;h2&gt;Setting it up with Claude Code&lt;/h2&gt;
&lt;p&gt;Claude Code reads a handful of environment variables that point it at a
different Anthropic-compatible endpoint. The vendor&apos;s guide sets these,
either through its install script or by hand in the user settings file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;env&quot;: {
    &quot;ANTHROPIC_AUTH_TOKEN&quot;: &quot;your Z.ai API key&quot;,
    &quot;ANTHROPIC_BASE_URL&quot;: &quot;https://api.z.ai/api/anthropic&quot;,
    &quot;ANTHROPIC_DEFAULT_OPUS_MODEL&quot;: &quot;glm-5.3[1m]&quot;,
    &quot;ANTHROPIC_DEFAULT_SONNET_MODEL&quot;: &quot;glm-5.3[1m]&quot;,
    &quot;ANTHROPIC_DEFAULT_HAIKU_MODEL&quot;: &quot;glm-5.3-flash[1m]&quot;,
    &quot;CLAUDE_CODE_AUTO_COMPACT_WINDOW&quot;: &quot;1000000&quot;,
    &quot;CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC&quot;: 1,
    &quot;API_TIMEOUT_MS&quot;: &quot;3000000&quot;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Three things the guide does not explain. The &lt;code&gt;[1m]&lt;/code&gt; suffix asks for the
model&apos;s million-token context, which is why the auto-compact window is
raised to match; a headless worker on the fleet compacted in 0.8% of
sessions, against 2.5% for interactive Anthropic sessions. The default
install maps all three Claude aliases to Flash and the manual snippet maps
Opus and Sonnet to GLM-5.3; pick deliberately, because the output weight
triples. And the 50-minute API timeout is there because long GLM-5.3 turns
take minutes, not seconds; the fleet&apos;s median GLM-5.3 attempt ran 29
minutes against 6 for Codex.&lt;/p&gt;
&lt;p&gt;Everything in this article ran through that configuration, with one
addition: the workers do not talk to the vendor directly but through a small
reverse proxy of mine that counts tokens, retries on the vendor&apos;s error
codes and holds requests below a discovered rate ceiling. That proxy is
where a lot of the failures below were born, and I say so where it is.&lt;/p&gt;
&lt;h2&gt;Four months, week by week&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-glm-exhibit=&quot;weekly&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ISO week&lt;/th&gt;
&lt;th&gt;GLM sessions&lt;/th&gt;
&lt;th&gt;Output tokens&lt;/th&gt;
&lt;th&gt;API errors&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;W31&lt;/td&gt;
&lt;td&gt;1,188&lt;/td&gt;
&lt;td&gt;22.8M&lt;/td&gt;
&lt;td&gt;1,481&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W32&lt;/td&gt;
&lt;td&gt;8,036&lt;/td&gt;
&lt;td&gt;50.4M&lt;/td&gt;
&lt;td&gt;241&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W33&lt;/td&gt;
&lt;td&gt;6,808&lt;/td&gt;
&lt;td&gt;44.5M&lt;/td&gt;
&lt;td&gt;905&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W34&lt;/td&gt;
&lt;td&gt;3,347&lt;/td&gt;
&lt;td&gt;42.3M&lt;/td&gt;
&lt;td&gt;1,891&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W35&lt;/td&gt;
&lt;td&gt;13,063&lt;/td&gt;
&lt;td&gt;73.1M&lt;/td&gt;
&lt;td&gt;741&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W36&lt;/td&gt;
&lt;td&gt;6,222&lt;/td&gt;
&lt;td&gt;93.8M&lt;/td&gt;
&lt;td&gt;4,483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W37&lt;/td&gt;
&lt;td&gt;8,335&lt;/td&gt;
&lt;td&gt;70.2M&lt;/td&gt;
&lt;td&gt;16,170&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W38&lt;/td&gt;
&lt;td&gt;6,506&lt;/td&gt;
&lt;td&gt;132.5M&lt;/td&gt;
&lt;td&gt;67,526&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W39&lt;/td&gt;
&lt;td&gt;5,517&lt;/td&gt;
&lt;td&gt;139.9M&lt;/td&gt;
&lt;td&gt;21,475&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W40&lt;/td&gt;
&lt;td&gt;1,897&lt;/td&gt;
&lt;td&gt;26.3M&lt;/td&gt;
&lt;td&gt;10,042&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W41&lt;/td&gt;
&lt;td&gt;1,448&lt;/td&gt;
&lt;td&gt;20.4M&lt;/td&gt;
&lt;td&gt;1,421&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W42&lt;/td&gt;
&lt;td&gt;5,576&lt;/td&gt;
&lt;td&gt;45.5M&lt;/td&gt;
&lt;td&gt;1,222&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W43&lt;/td&gt;
&lt;td&gt;1,548&lt;/td&gt;
&lt;td&gt;29.3M&lt;/td&gt;
&lt;td&gt;474&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W44&lt;/td&gt;
&lt;td&gt;1,953&lt;/td&gt;
&lt;td&gt;28.4M&lt;/td&gt;
&lt;td&gt;1,625&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Read it in three acts. From late July to the end of August the fleet ran
GLM-4.7, the model the plan shipped with: short sessions, a median of
3,200 output tokens and six minutes, sixteen tool calls. On September 1 the
workers moved to GLM-5.3 and GLM-5.3-Flash and the shape changed: median
output quadrupled to 12,000 tokens on Flash and 17,000 on GLM-5.3, sessions
ran eleven and fifteen minutes, and the weekly token count doubled while the
session count fell. The error column exploding in weeks 37 to 39 is the
concurrency wall, and the next two sections are about it. From October the
fleet was deliberately cut back and a Codex fleet took the larger share of
the queue, which is the comparison in &lt;a href=&quot;/guides/codex-vs-claude-code/&quot;&gt;Codex vs Claude Code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Across all four machines the GLM side of that period came to 116,226
headless sessions and 1,003 million output tokens, and the vendor&apos;s own
dashboard counted 1.5 million model calls on the account between August 11,
when I started polling it, and today.&lt;/p&gt;
&lt;h2&gt;The meter you can see and the one you cannot&lt;/h2&gt;
&lt;p&gt;Every plan has a five-hour window and a weekly window. The vendor&apos;s usage
API reports the five-hour one; for this account it has never reported a
weekly one, and nothing I ran was ever stopped by a weekly limit. The chart
is the five-hour meter sampled every hour for 91 days.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-glm-exhibit=&quot;meter&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Month&lt;/th&gt;
&lt;th&gt;Vendor-metered tokens&lt;/th&gt;
&lt;th&gt;Model calls&lt;/th&gt;
&lt;th&gt;Hours at 100% of the 5-hour window&lt;/th&gt;
&lt;th&gt;Hours at 90% or more&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;August (from the 11th)&lt;/td&gt;
&lt;td&gt;34.1B&lt;/td&gt;
&lt;td&gt;565,900&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;September&lt;/td&gt;
&lt;td&gt;50.0B&lt;/td&gt;
&lt;td&gt;726,016&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;October&lt;/td&gt;
&lt;td&gt;8.3B&lt;/td&gt;
&lt;td&gt;127,384&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;November (to the 9th)&lt;/td&gt;
&lt;td&gt;5.5B&lt;/td&gt;
&lt;td&gt;86,429&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Two things stand out. First, the window filled only in August, on seven
days, for eleven hours in total, all of it on GLM-4.7 with twenty workers
running flat out. After the switch to GLM-5.3 the fleet never reached 100%
again, and passed 90% for exactly one hour, while sending more tokens per
week than before. The median hourly reading over the whole period is 5%,
the 90th percentile 38%. Second, this account was bought under the earlier
prompt-counted version of the plan and prepaid for a year; it reports a Max
tier but only one window. A plan bought today carries a 140,000-credit
weekly cap, and September&apos;s volume works out to several times the vendor&apos;s
own stated weekly token estimate for Max. I cannot tell you how the weekly
cap behaves when you hit it, because I never did. The calculator further
down tells you whether you would.&lt;/p&gt;
&lt;p&gt;What did stop the fleet was something the pricing page does not list.&lt;/p&gt;
&lt;h2&gt;The concurrency wall&lt;/h2&gt;
&lt;p&gt;When the vendor refuses a request it returns an HTTP 429 with a body code.
Code 1302 is &quot;too many requests in flight on this account&quot;; 1303 and 1305
are request-rate limits; 1308 and 1310 are credit exhaustion. In four months
of transcripts and proxy logs, every refusal I have was a 1302. Not one was
a credit code.&lt;/p&gt;
&lt;p&gt;The transcripts recorded 2,376 of those 429s reaching Claude Code, which
retries each up to ten times before giving up. The proxy&apos;s own logs on the
three worst days of September held 178,000, 231,000 and 199,000 lines
containing a 429, forty-odd percent of everything it logged, arriving in
waves that match the fleet&apos;s dispatch cycle. In one half-hour sample it
completed 770 requests and absorbed 2,270 upstream refusals, with between
nine and fifteen requests in flight at any moment. That is the number to
remember: at the Max tier, in September, the account sustained roughly ten
to fifteen concurrent model calls, and the twentieth worker bought nothing
but retries.&lt;/p&gt;
&lt;p&gt;This inverts the usual intuition about a prepaid plan. The account was
credit-rich and concurrency-poor. Adding workers could not spend the
credits faster; the only levers that moved credit burn were the model tier
and the length of each response. The vendor&apos;s policy page says what the
limit is without saying what the number is: concurrency &quot;is tied to your
plan tier&quot;, Max above Pro above Lite, dynamically raised during off-peak
hours. The recommended &quot;two or more projects&quot; for Max is a reasonable gloss
on ten to fifteen in-flight calls when each Claude Code turn holds one.&lt;/p&gt;
&lt;p&gt;Two practical consequences. If you run more than one agent, a shared queue
in front of the vendor is worth having: Claude Code&apos;s own retry gives up
after ten tries and the attempt dies, while a proxy that waits for a slot
converts refusals into latency. And do not read the credit meter as a
capacity gauge. The fleet&apos;s five-hour meter sat at 5% while its workers
spent whole minutes being refused.&lt;/p&gt;
&lt;h2&gt;What a GLM attempt dies of&lt;/h2&gt;
&lt;p&gt;The fleet records why every attempt failed. Here are the five largest
reasons for Claude Code on the GLM plan next to the five largest for Codex,
over the 49 days both have traces.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-glm-exhibit=&quot;failures&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claude Code on the GLM plan (2,879 failures of 8,302 attempts)&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;th&gt;Codex CLI (2,834 failures of 9,708 attempts)&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stream cut by the gateway (HTTP 499)&lt;/td&gt;
&lt;td&gt;41%&lt;/td&gt;
&lt;td&gt;Finished without shipping a commit&lt;/td&gt;
&lt;td&gt;32%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncommitted work left in the checkout&lt;/td&gt;
&lt;td&gt;12%&lt;/td&gt;
&lt;td&gt;Close verification failed&lt;/td&gt;
&lt;td&gt;26%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm test&lt;/code&gt; failed&lt;/td&gt;
&lt;td&gt;11%&lt;/td&gt;
&lt;td&gt;Uncommitted work left in the checkout&lt;/td&gt;
&lt;td&gt;18%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repository verify script failed&lt;/td&gt;
&lt;td&gt;9%&lt;/td&gt;
&lt;td&gt;Agent exited non-zero before any gate&lt;/td&gt;
&lt;td&gt;6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent hit its turn limit&lt;/td&gt;
&lt;td&gt;6%&lt;/td&gt;
&lt;td&gt;Needed a human step&lt;/td&gt;
&lt;td&gt;3%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;The shapes differ. Codex&apos;s failures are process failures: the work was
done, or nearly, and the paperwork was not. GLM&apos;s largest failure was not
the model at all. The 499 is a request cancelled mid-stream, and 1,187 of
them were my proxy&apos;s fault: it waited for a rate-limit slot before reading
the request body, a long session&apos;s multi-megabyte body sat in the socket,
and an ingress timeout cut the connection at sixty seconds. On one
repository eight of thirteen attempts in an afternoon died that way after
fifteen to forty minutes of work each. It was fixed on October 29 and no
attempt has died of it since, but every unattended GLM setup I have seen
has some version of this problem: long turns, big bodies, and a timeout
somewhere in the path that was tuned for a chat.&lt;/p&gt;
&lt;p&gt;Strip that out and GLM&apos;s remaining failures are the model&apos;s: tests that
did not pass, verify scripts that did not pass, and the turn limit. A
further 25.5% of GLM attempts ended by splitting the task into smaller ones
instead of delivering it, against 20.9% for Codex; both fleets prefer to
decompose rather than fail, and GLM reached for it more.&lt;/p&gt;
&lt;p&gt;On yield, the two GLM models were indistinguishable: Flash closed 39.4% of
its 6,752 attempts and GLM-5.3 41.0% of its 1,570, at the same median half
hour. Codex on gpt-5.6 at its highest reasoning setting closed 54.3%, in
six minutes. The gap is real and it is also not the whole story: the
harnesses were pinned to different repositories, and the GLM workers held
the long, grinding tail of the backlog for two months before the Codex
fleet existed. Premature closes were similar across the three, 16.5% of GLM
closures reopened against 18.4% for Codex.&lt;/p&gt;
&lt;p&gt;A session on GLM looks like this, from 96,000 transcripts on one machine:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Sessions&lt;/th&gt;
&lt;th&gt;Median output tokens&lt;/th&gt;
&lt;th&gt;Median duration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GLM-4.7 (July to August)&lt;/td&gt;
&lt;td&gt;33,345&lt;/td&gt;
&lt;td&gt;3,223&lt;/td&gt;
&lt;td&gt;5.9 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;23,933&lt;/td&gt;
&lt;td&gt;11,931&lt;/td&gt;
&lt;td&gt;11.4 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3&lt;/td&gt;
&lt;td&gt;5,071&lt;/td&gt;
&lt;td&gt;16,998&lt;/td&gt;
&lt;td&gt;15.1 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;GLM-5.3 reads more and runs more commands before it writes, a median of 28
tool calls per session against 18 for Flash and 16 for GLM-4.7; Flash writes
sooner. Both lean on the shell more than Anthropic&apos;s models did on the same
harness: 79% of their tool calls were shell commands (70% for GLM-4.7),
against 71% for Sonnet, and neither reached for subagents or web search to
any measurable degree.&lt;/p&gt;
&lt;h2&gt;What the same tokens cost at list price&lt;/h2&gt;
&lt;p&gt;The plan is a prepaid allowance, so the honest comparison is not with
another subscription but with what the vendor charges for the same tokens
by the million. List prices on 2026-11-09 are $1.40 input, $0.26 cached and
$4.40 output for GLM-5.3, and $0.15, $0.03 and $0.50 for Flash. The fleet&apos;s
measured mix sends 5.4 uncached and 72 cached input tokens for every output
token, so the list price of one million output tokens of fleet work is about
$3.50 on Flash and $30.70 on GLM-5.3.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-glm-exhibit=&quot;value&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Month&lt;/th&gt;
&lt;th&gt;GLM output tokens, all machines&lt;/th&gt;
&lt;th&gt;Share on GLM-5.3&lt;/th&gt;
&lt;th&gt;List-price equivalent&lt;/th&gt;
&lt;th&gt;Max tier, monthly&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;July&lt;/td&gt;
&lt;td&gt;102.7M&lt;/td&gt;
&lt;td&gt;0% (GLM-4.7, priced as Flash)&lt;/td&gt;
&lt;td&gt;about $360&lt;/td&gt;
&lt;td&gt;$168&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;August&lt;/td&gt;
&lt;td&gt;229.1M&lt;/td&gt;
&lt;td&gt;6%&lt;/td&gt;
&lt;td&gt;about $1,200&lt;/td&gt;
&lt;td&gt;$168&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;September&lt;/td&gt;
&lt;td&gt;546.3M&lt;/td&gt;
&lt;td&gt;14%&lt;/td&gt;
&lt;td&gt;about $4,060&lt;/td&gt;
&lt;td&gt;$168&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;October&lt;/td&gt;
&lt;td&gt;125.1M&lt;/td&gt;
&lt;td&gt;19%&lt;/td&gt;
&lt;td&gt;about $1,080&lt;/td&gt;
&lt;td&gt;$168&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Roughly $6,700 of list-price inference for four months of a $168 plan,
most of it in September. That ratio is the entire argument for the plan,
and it comes with its own caveats: the ratio was achieved by a fleet that
never idles, at a Max tier that was never weekly-capped, on a model whose
attempts closed less often and ran five times longer. A person pairing with
an agent for an evening will consume a small fraction of this and pay the
same $18 or $80.&lt;/p&gt;
&lt;h2&gt;Which tier fits your week?&lt;/h2&gt;
&lt;p&gt;The calculator below uses the fleet&apos;s measured mix per call and the plan&apos;s
published weights to turn a week into credits. Steering hours count as one
session-hour each; an always-on worker counts as 168 session-hours a week
at the fleet&apos;s measured pace of about 21 calls an hour.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-glm-exhibit=&quot;credits&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If your week is…&lt;/th&gt;
&lt;th&gt;Flash, off-peak&lt;/th&gt;
&lt;th&gt;GLM-5.3, off-peak&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Five hours of pairing&lt;/td&gt;
&lt;td&gt;about 260 credits: Lite (3% of its week)&lt;/td&gt;
&lt;td&gt;about 800 credits: Lite (8%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A working week of pairing (30 hours)&lt;/td&gt;
&lt;td&gt;about 1,600 credits: Lite (16%)&lt;/td&gt;
&lt;td&gt;about 4,800 credits: Lite (48%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One always-on worker&lt;/td&gt;
&lt;td&gt;about 8,900 credits: Lite (89%), Pro at peak rates&lt;/td&gt;
&lt;td&gt;about 26,800 credits: Pro (45%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Two workers plus a day of pairing&lt;/td&gt;
&lt;td&gt;about 18,100 credits: Pro (30%)&lt;/td&gt;
&lt;td&gt;about 54,800 credits: Pro (91%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ten always-on workers&lt;/td&gt;
&lt;td&gt;about 88,500 credits: Max (63%), over Max at peak rates&lt;/td&gt;
&lt;td&gt;about 267,600 credits: over Max&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;The five-hour window is generous next to the weekly one. Max&apos;s five-hour
allowance refills at 5,600 credits an hour but the weekly one at 833, so
nothing a single agent does will touch either, and a fleet that never stops
meets the weekly cap first. Peak-hour pricing matters less than it looks: a
weekday afternoon in Singapore is the small hours in America and the
morning commute in Europe, so most readers will pay the half rate most of
the time. The one thing the calculator cannot model is the concurrency
cap, because the vendor does not publish it; the fleet&apos;s experience is
that at Max it arrives at ten to fifteen simultaneous calls, which is about
where the credits run out for Flash workers too.&lt;/p&gt;
&lt;h2&gt;Where it fits, and where it does not&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Buy Lite&lt;/strong&gt; if you are one person pairing with one agent, even all week.
Ten thousand credits is a hundred to two hundred Flash sessions of fleet
shape, or thirty to sixty-five on GLM-5.3, depending on when you work, for
the price of two coffees. One always-on Flash worker fits too, barely, if
it works off-peak.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Buy Pro&lt;/strong&gt; for one worker that never stops, on either model, or for two
people sharing a backlog. &lt;strong&gt;Buy Max&lt;/strong&gt; if you run a fleet, or you want a
second meter that does not fail in the same week as your Anthropic or
OpenAI plan. The step from Pro to Max buys concurrency as much as credits;
if you have ever seen a 1302, you want Max.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pair it, do not replace with it.&lt;/strong&gt; Every Claude Code or Codex plan I have
measured was exhausted by about two always-on workers. The GLM plan carried
twenty for a sixth of the price, at a lower close rate and a slower pace,
on a queue where the test suite did the judging. The frontier model is the
one you sit next to; the GLM plan is the one that works the night shift.
The &lt;a href=&quot;/data/inference-plans/&quot;&gt;cost guide&apos;s plan finder&lt;/a&gt; puts this plan next
to twenty-five others on the same tokens-per-dollar axis.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do not buy it&lt;/strong&gt; to run a single agent that you watch closely, if a
29-minute attempt instead of a six-minute one costs you more than $150 a
month in your own time. Do not buy it expecting the credit meter to tell
you when you are out of capacity; watch for 1302s instead. And read the
policy: supported tools only, no account sharing, no refunds.&lt;/p&gt;
&lt;p&gt;Two facts a reader may weigh differently from me. The provider is a
Singapore-registered subsidiary of a Beijing model lab, and its API terms
state that customer content is processed in real time, not stored, and not
used for training without explicit agreement. I have no way to verify
either beyond the published terms, and my fleet&apos;s work is public-repository
code. If yours is not, that is a decision, not a footnote.&lt;/p&gt;
&lt;h2&gt;Records and refreshing this&lt;/h2&gt;
&lt;p&gt;Every number above has a source file. The vendor-side series come from the
account&apos;s own usage API, polled hourly since August 11: tokens per model,
model calls, and the five-hour window&apos;s used share. The fleet-side numbers
come from Claude Code&apos;s transcripts on four machines, 158,773 files between
July 9 and October 31, and from the attempt traces the fleet writes for
every task since September 12. Pricing, credit weights and policy wording
were read from the vendor&apos;s pages on 2026-11-09, and the tools-tested line
under the title records which Claude Code and Codex versions the setup was
checked against.&lt;/p&gt;
&lt;p&gt;Plans move. The credit system replaced prompt counting on July 30; GLM-5.3
replaced GLM-4.7 as the routed model during September; the proxy bug behind
41% of failures was fixed on October 29. A weekly check compares the
installed tools against the versions recorded here and files a refresh when
either moves a minor version or the telemetry horizon passes ninety days.
If you are reading this after one of those has happened and the article has
not been updated, trust the shape of the findings over the figures: the
wall is concurrency, the weekly window binds an always-on worker, and the
plan is cheapest where a test suite does the judging.&lt;/p&gt;
</content:encoded><category>glm</category><category>z-ai</category><category>claude-code</category><category>subscriptions</category><category>fleet-ops</category><category>cost</category></item><item><title>Codex vs Claude Code: What Each Is Good At, and When You Would Pick the Other</title><link>https://jedarden.com/guides/codex-vs-claude-code/</link><guid isPermaLink="true">https://jedarden.com/guides/codex-vs-claude-code/</guid><description>Two coding agents measured on the same work queue for three months: how a turn runs, how the usage windows behave, what one subscription of each actually delivered, and which circumstances favour Codex, Claude Code, or both.</description><pubDate>Sun, 01 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Codex and Claude Code are the same loop in two different wrappers, and the
wrappers are what you are paying for.&lt;/strong&gt; Both read an instructions file, run
shell commands, patch files, verify, and report. Both now sell the same
ladder of plans: an entry tier at $20 with a five-hour window and a weekly
cap, then $100 and $200 tiers; the five-hour window goes away at $100 on
ChatGPT Pro and at $200 on Claude, whose top tier is now called Ultra.
The question people are actually asking when they search this comparison is
which $200 to spend, or whether $400 for both is defensible. I have run both
against the same queue of work since August 2026, from a terminal and from a
fleet of unattended workers, and the logs answer that question better than
another afternoon of impressions would.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Pick &lt;strong&gt;Claude Code first&lt;/strong&gt; if you work in the terminal and
steer, if a team has to share conventions, or if you need a hook that can
block &lt;em&gt;or rewrite&lt;/em&gt; a command before it runs. Pick &lt;strong&gt;Codex first&lt;/strong&gt; if you
hand off tasks and come back, if continuity matters more than a tidy quota
boundary, or if you already pay for ChatGPT. Buy &lt;strong&gt;both&lt;/strong&gt; only when the
work is parallel or around the clock; one top-tier plan of either carried
about two always-on workers in my fleet, and the second plan buys a second
meter that does not fail at the same moment. Stay on &lt;strong&gt;pay-per-token&lt;/strong&gt; if
you use an agent under five hours a week and have neither plan already.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Which one fits you?&lt;/h2&gt;
&lt;p&gt;&amp;lt;div data-harness-quiz&amp;gt;&lt;/p&gt;
&lt;p&gt;If the quiz does not load, the questions it asks are these, and the sections
below answer each one:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;How many hours a week will an agent be working for you?&lt;/li&gt;
&lt;li&gt;What do you want to spend a month: $20, $100, $200, or $400?&lt;/li&gt;
&lt;li&gt;Do you already pay for ChatGPT or Claude for chat?&lt;/li&gt;
&lt;li&gt;Do you steer every step, hand off tasks and come back, run several at once, or need it unattended in scripts and CI?&lt;/li&gt;
&lt;li&gt;When a limit hits, what matters more: a predictable reset, never being blocked mid-task, or the cheapest tokens per finished task?&lt;/li&gt;
&lt;li&gt;Solo, a small team sharing conventions, or a platform team setting guardrails?&lt;/li&gt;
&lt;li&gt;Do you need hooks that can block or rewrite a command before it runs?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;What was measured&lt;/h2&gt;
&lt;p&gt;Everything in this guide comes from one machine that has run both agents
against the same queue of work since the summer of 2026: about three thousand
terminal sessions where a person typed, seven hundred of them an hour or
longer, and a fleet of unattended workers that claimed small tasks from a
shared backlog, did them, and pushed. Both agents keep a complete record of
every session on disk, and both subscriptions were polled every five minutes
by a governor whose job was to keep the fleet under the usage caps. That left
four kinds of evidence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Session logs.&lt;/strong&gt; Every Codex rollout since the day Codex was installed
here (about 40,000 files, 46 GB, August 3 to October 31) and every Claude
Code transcript from July 9 to October 31 (about 96,000 files, 76 GB), read
once end to end: turns, tool calls, tokens by kind, compactions, errors,
versions. Codex keeps every session on disk; Claude Code deletes a
transcript thirty days after its last write, so its earlier months were
read back from this machine&apos;s own off-site copy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage meters.&lt;/strong&gt; 15,000 five-minute readings of each subscription&apos;s
windows: how full, when they reset, how long anything sat at the cap.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delivered work.&lt;/strong&gt; Tasks closed, attempts verified, commits landed, by
which agent did them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The vendors&apos; own pricing pages&lt;/strong&gt;, captured the day this was written.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Two caveats before any number. First, most of the volume is automated:
unattended workers running one task at a time, not a developer typing, so
&quot;what one subscription delivers&quot; here is an upper bound on sustained use,
not a picture of an afternoon&apos;s pairing. Second, in every month measured the
fleet&apos;s Claude Code workers ran GLM models through a third-party coding plan
rather than Anthropic&apos;s models (90 of 82,000 unattended sessions used an
Anthropic model), so where the Claude column says &quot;fleet&quot; it is the harness
being measured, and where it says &quot;interactive&quot; it is Anthropic&apos;s models on
an Anthropic plan. That fleet also ran on three other machines, which the
study counts but the per-machine numbers here do not. The Codex workers ran
on this machine, all on OpenAI models through one ChatGPT Pro plan.&lt;/p&gt;
&lt;h2&gt;How a turn runs in each&lt;/h2&gt;
&lt;p&gt;Read a Codex rollout and a Claude Code transcript side by side and the
skeleton is identical. An instructions file is loaded. The model reads,
runs shell commands, patches, runs the tests, and writes a summary. In both
corpora the shell is most of the work: 75% of Claude Code&apos;s tool calls are
Bash, and 89% of Codex&apos;s are shell commands. Both keep their standing
context in the prompt cache and read it on every call, which is why 93 to
98% of all input tokens in both logs are cache reads. The differences are
in what wraps that loop, and the first chart puts the structural ones side
by side.&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cvc-exhibit=&quot;anatomy&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Share of&lt;/th&gt;
&lt;th&gt;Claude Code&lt;/th&gt;
&lt;th&gt;Codex&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tool calls that are shell commands&lt;/td&gt;
&lt;td&gt;75%&lt;/td&gt;
&lt;td&gt;89%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input tokens served from the prompt cache&lt;/td&gt;
&lt;td&gt;96%&lt;/td&gt;
&lt;td&gt;97%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output tokens that are reasoning or thinking&lt;/td&gt;
&lt;td&gt;7%&lt;/td&gt;
&lt;td&gt;52%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokens spent inside sub-agents&lt;/td&gt;
&lt;td&gt;8% (17% in interactive sessions)&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sessions that compacted their context&lt;/td&gt;
&lt;td&gt;0.9% (2.5% interactive)&lt;/td&gt;
&lt;td&gt;3.7% (7.2% agentic)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Instructions.&lt;/strong&gt; Claude Code attaches &lt;code&gt;CLAUDE.md&lt;/code&gt; from the home directory
and the repository, plus &lt;code&gt;AGENTS.md&lt;/code&gt; if present, to every request. Codex
injects &lt;code&gt;AGENTS.md&lt;/code&gt; ahead of the first message; it was present in 99.9% of
its sessions here. If you keep one &lt;code&gt;AGENTS.md&lt;/code&gt; and have &lt;code&gt;CLAUDE.md&lt;/code&gt; point
at it, both harnesses read the same rules, which is how this machine runs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tools.&lt;/strong&gt; Claude Code exposes named tools: Bash, Read, Edit, Write, a
subagent tool, web search, MCP. Codex exposes one &lt;code&gt;exec&lt;/code&gt; tool that takes a
snippet of JavaScript calling &lt;code&gt;exec_command&lt;/code&gt;, &lt;code&gt;write_stdin&lt;/code&gt;, &lt;code&gt;apply_patch&lt;/code&gt;
and friends. The practical consequence shows up on long-running commands.
Claude Code blocks on a command with a timeout or sends it to the
background. Codex yields after a few seconds and then polls the running
command with &lt;code&gt;write_stdin&lt;/code&gt;, and every poll re-sends the whole context. In
one fleet session a twenty-poll wait on a test gate was 2.4 million of the
session&apos;s 6.8 million tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Permissions and hooks.&lt;/strong&gt; This is the largest real difference. Claude Code
has permission modes and a hook system where a PreToolUse hook can allow,
deny, ask, or rewrite the tool&apos;s input. On this machine two hooks bracket
every Bash and Edit call: a secret pre-write scan and an organisation rule
guard that blocks workflow files, Kubernetes Jobs, floating image tags and
mutating cluster commands. Codex has an approval policy and a sandbox mode,
and its hook schema accepts the same three decisions, but its runtime
honours &lt;strong&gt;deny alone&lt;/strong&gt;: a hook can veto a Codex command and nothing else.
Every veto surfaces to the agent as a failed tool call it then routes
around. That is not a small gap in practice. In a four-day sample of 2,056
Codex sessions the guard rejected 456 commands; the agents rewrote their
cleanup in Python or found another path, which is fine for &lt;code&gt;rm -rf&lt;/code&gt; and not
fine when you wanted the command &lt;em&gt;changed&lt;/em&gt; rather than refused. The fleet
ran Codex with &lt;code&gt;approval_policy = never&lt;/code&gt; and full filesystem access in all
but eleven sessions, and not one approval prompt ever fired; the hook was
the guardrail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Delegation.&lt;/strong&gt; Claude Code&apos;s subagent tool spawns a child with the full
standing context, and the child re-reads that context on every call. Over
four months of interactive sessions subagents consumed 17% of all tokens for
4% of the output, and in October alone, when Opus did most of the
delegating, 34% for 4%. They are excellent for research and expensive for
routine edits.
Codex has &lt;code&gt;spawn_agent&lt;/code&gt; and &lt;code&gt;wait_agent&lt;/code&gt;; 856 sub-agent threads here were
4.9% of its tokens, mostly short.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context.&lt;/strong&gt; Both compact automatically. Claude Code compacts an interactive
session at about 300,000 live tokens down to about 12,000 (fleet sessions
earlier, around 170,000), and will also compact while idle before the cache
expires; under 1% of sessions ever got there, 2.5% of the interactive ones.
Codex compacts at about 246,000 of a 258,000 window,
re-injects &lt;code&gt;AGENTS.md&lt;/code&gt; and a summary, and does so in 7.2% of agentic
sessions. Neither corpus contains a context-length error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shape.&lt;/strong&gt; A Codex interactive thread is a heavy object: a median of 8.5
million cumulative tokens and 19 active minutes. Claude Code&apos;s interactive
sessions had two shapes, and which one dominated depended on who was doing
the work. In July, before the fleet carried the backlog, the median terminal
session ran 6.9 hours with 84 tool calls; by October the median was under
two minutes with no tool calls, while the long sessions still ran for hours.
Some of the Codex weight is structural: 52% of its output tokens are
reasoning, and the poll-while-waiting pattern bills the context again on
every poll. A fleet task is similar on both: about 1.6 million cumulative
tokens and five minutes for Codex, four to twenty tool calls and three to
fifteen thousand output tokens for Claude Code depending on the model behind
it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Records.&lt;/strong&gt; If you need to audit what an agent did, or charge its work to a
project, the two wrappers default differently. Codex writes every session to
&lt;code&gt;~/.codex/sessions&lt;/code&gt; with per-turn token counts and the usage-window reading
at the time, and leaves it there; nothing has gone missing in three months
here, and the oldest rollout is from the day it was installed. Claude Code&apos;s
transcript is richer, with its own running
dollar estimate since late August, but it is deleted thirty days after the
last write unless you raise &lt;code&gt;cleanupPeriodDays&lt;/code&gt;. Codex gives you the record
by default; Claude Code gives you thirty days to copy it somewhere.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Versions.&lt;/strong&gt; Both ship constantly. The transcripts record 86 Claude Code
releases in 115 days and 21 Codex CLI releases in 90. A long-lived
interactive session keeps the version it started on; the fleet picks up a
new release within a day. Anything in this guide about how a turn runs is
true of the versions in the &quot;Tested with&quot; line and may not be true next
month, which is why a weekly check flags this page for a refresh.&lt;/p&gt;
&lt;h2&gt;The usage windows, as they behaved&lt;/h2&gt;
&lt;p&gt;The plan pages describe the windows. The meters describe how they behave
under load, and the two accounts behaved differently in ways the pages do
not tell you. Seven weeks of both meters, side by side:&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cvc-exhibit=&quot;windows&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Every Claude weekly window observed ran exactly seven days and reset on a
Wednesday at 01:00 UTC; the peaks were 80, 46, 30, 15, 71, 51 and 19% of the
allowance. The Codex weekly windows in the same stretch:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Codex window began (UTC)&lt;/th&gt;
&lt;th&gt;Ended&lt;/th&gt;
&lt;th&gt;Peak&lt;/th&gt;
&lt;th&gt;At the cap&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sep 12 10:54&lt;/td&gt;
&lt;td&gt;replaced Sep 14&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;0.5 h&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 14 21:45&lt;/td&gt;
&lt;td&gt;full week&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;4 h, 826 turns refused&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 21 21:51&lt;/td&gt;
&lt;td&gt;replaced Sep 26&lt;/td&gt;
&lt;td&gt;55%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 26 16:58&lt;/td&gt;
&lt;td&gt;replaced Oct 2&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;11 h, credits drawn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 2 21:13&lt;/td&gt;
&lt;td&gt;replaced Oct 7&lt;/td&gt;
&lt;td&gt;92%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 7 03:28&lt;/td&gt;
&lt;td&gt;replaced Oct 11&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;39 h, credits drawn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 11 03:58&lt;/td&gt;
&lt;td&gt;replaced Oct 13&lt;/td&gt;
&lt;td&gt;53%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 15 06:13&lt;/td&gt;
&lt;td&gt;replaced Oct 17&lt;/td&gt;
&lt;td&gt;96%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 17 20:40&lt;/td&gt;
&lt;td&gt;replaced Oct 20&lt;/td&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 26 11:03&lt;/td&gt;
&lt;td&gt;replaced Oct 28&lt;/td&gt;
&lt;td&gt;35%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 28 06:35&lt;/td&gt;
&lt;td&gt;still open&lt;/td&gt;
&lt;td&gt;43%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Claude.&lt;/strong&gt; The account exposes a weekly window, a second weekly window
scoped to the newest model, and a five-hour window, which is the Max plan&apos;s
shape. The weekly window resets at a fixed hour every week (here, early
Wednesday UTC) and that never varied. Under the governor the weekly peaks
were 80, 46 and 30% in September and 71 and 51% in October, with one to two
workers alive; the five-hour window never passed 23% at that fleet size.
Every cap hit in four months of transcripts came from the terminal, not the
fleet. The weekly cap was reached in three stretches: four sessions in the
week of September 15, 120 sessions on October 12 to 16, when the terminal
returned &quot;You&apos;ve hit your weekly limit, resets [day] 9pm&quot; as a synthetic
assistant message, with no retry, and the session ended there, and six more
in the last week of October. The five-hour window bit ten times, four of
them on one July day during the long steering sessions, which is the one
place a five-hour window showed up in practice. A busy Claude session with a
frontier model burned about 2.3% of the weekly allowance per hour, which is
roughly 44 busy hours a week before the cap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Codex.&lt;/strong&gt; The Pro account exposes a weekly window only; the five-hour field
in every one of a million readings is empty, which matches the pricing
page. Two things about that window are not on the page. First, a reading of
100% before any credits were on the account meant a hard refusal: 826 turns
in the week of September 14 failed with &quot;You&apos;ve hit your usage limit ... try
again at 5:45 PM&quot;, 817 of them on their first request, and the seven that
were mid-task ended with no retry, no summary, and half-finished work on
disk. After credits were bought the window sat at 100% twice more, for 11
and 39 hours, with zero refusals while the credit balance fell instead.
Second, the window re-bases. Of 32 weekly windows observed on one account
and one login, only three ran a full seven days; 28 were superseded by a
fresh window at 0% after a median of about 2.3 days, abandoning 70 to 120
hours of the old one. The telemetry cannot say why. The practical effect is
that the weekly allowance was rarely the binding constraint for long, and
that &quot;when does it reset&quot; has no stable answer. A busy Codex session with
extra-high reasoning burned about 3.5% of the allowance per hour, roughly
29 busy hours a week, about 1.5 times the drain of a busy Claude session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Both.&lt;/strong&gt; An always-on but mostly idle automated worker cost about 0.3% of
either allowance per hour, so one top-tier plan of either carried about two
such workers around the clock. Neither account&apos;s five-hour window mattered
at that fleet size; the weekly meters carried the load. Put your own week
into those rates:&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cvc-exhibit=&quot;capacity&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your week&lt;/th&gt;
&lt;th&gt;Share of one Claude allowance&lt;/th&gt;
&lt;th&gt;Share of one Codex allowance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;10 busy hours&lt;/td&gt;
&lt;td&gt;23%&lt;/td&gt;
&lt;td&gt;35%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20 busy hours&lt;/td&gt;
&lt;td&gt;46%&lt;/td&gt;
&lt;td&gt;70%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30 busy hours&lt;/td&gt;
&lt;td&gt;69%&lt;/td&gt;
&lt;td&gt;at the cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44 busy hours&lt;/td&gt;
&lt;td&gt;at the cap&lt;/td&gt;
&lt;td&gt;at the cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One always-on worker, no busy hours&lt;/td&gt;
&lt;td&gt;54%&lt;/td&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Two always-on workers&lt;/td&gt;
&lt;td&gt;at the cap&lt;/td&gt;
&lt;td&gt;at the cap&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A busy hour cost about 2.3% of the Claude allowance and 3.5% of the Codex
allowance; an always-on but mostly idle worker about 0.3% an hour on either.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;What one subscription of each delivered&lt;/h2&gt;
&lt;p&gt;The caveat first, again: these are unattended workers on a shared backlog,
and the two fleets ran different models on different repositories, so the
yield numbers compare a Codex fleet with a Claude Code fleet on GLM, not
Codex with Claude on Anthropic&apos;s models. Anthropic&apos;s models were used from
the terminal, which leaves no attempt record, only commits. Week by week,
this is who carried the queue:&lt;/p&gt;
&lt;p&gt;&amp;lt;div data-cvc-exhibit=&quot;weekly&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Week&lt;/th&gt;
&lt;th&gt;Claude Code sessions (unattended / typed)&lt;/th&gt;
&lt;th&gt;Codex sessions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;W29&lt;/td&gt;
&lt;td&gt;0 / 53&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W30&lt;/td&gt;
&lt;td&gt;1 / 77&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W31&lt;/td&gt;
&lt;td&gt;2,674 / 158&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W32&lt;/td&gt;
&lt;td&gt;8,976 / 232&lt;/td&gt;
&lt;td&gt;988&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W33&lt;/td&gt;
&lt;td&gt;7,969 / 180&lt;/td&gt;
&lt;td&gt;1,283&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W34&lt;/td&gt;
&lt;td&gt;4,789 / 100&lt;/td&gt;
&lt;td&gt;3,210&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W35&lt;/td&gt;
&lt;td&gt;13,289 / 115&lt;/td&gt;
&lt;td&gt;1,923&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W36&lt;/td&gt;
&lt;td&gt;7,123 / 63&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W37&lt;/td&gt;
&lt;td&gt;12,812 / 887&lt;/td&gt;
&lt;td&gt;152&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W38&lt;/td&gt;
&lt;td&gt;7,413 / 124&lt;/td&gt;
&lt;td&gt;1,768&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W39&lt;/td&gt;
&lt;td&gt;6,874 / 165&lt;/td&gt;
&lt;td&gt;4,474 (weekly cap: 826 refusals)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W40&lt;/td&gt;
&lt;td&gt;4,932 / 163&lt;/td&gt;
&lt;td&gt;5,339&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W41&lt;/td&gt;
&lt;td&gt;1,807 / 87&lt;/td&gt;
&lt;td&gt;8,497&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W42&lt;/td&gt;
&lt;td&gt;5,613 / 607 (weekly cap: 118 sessions)&lt;/td&gt;
&lt;td&gt;6,955&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W43&lt;/td&gt;
&lt;td&gt;1,551 / 29&lt;/td&gt;
&lt;td&gt;5,188&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W44&lt;/td&gt;
&lt;td&gt;1,963 / 23&lt;/td&gt;
&lt;td&gt;504&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One ChatGPT Pro plan, Codex.&lt;/strong&gt; Between September 12 and October 31 the
Codex workers made 9,708 attempts at tasks and 4,843 passed verification, a
yield of 50% counting the attempts that split a task into smaller ones and
61% without them. The median attempt took six minutes. Over sixty days that
was 5,757 tasks closed and 3,741 code commits, about 0.65 commits per closed
task; 18% of those closures were later reopened, almost always because the
worker had closed before pushing. The plan hit its weekly cap in four
windows out of 32 and refused work in one of them, the week before credits
were added. Its characteristic failure was process, not capability: the
three biggest failure kinds were finishing without a shipped commit (32%),
failing the close verification (26%), and leaving uncommitted work in the
checkout (18%).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One Claude Max plan, Claude Code.&lt;/strong&gt; The Anthropic plan carried the
interactive work: about 3,000 terminal sessions between July 9 and October
31, 700 of them an hour or longer. The long sessions ran 40 to 100 a week in
July and August and 7 to 30 a week by October, as the fleet took over the
backlog; about 1,400 of the short ones were one-turn sweeps scripted around
the terminal on two days. The CLI began writing its own cost estimate into
transcripts in late August; from the week of August 24 to October 31 that
estimate sums to $16,500 over ten weeks, $900 to $4,300 a week in working
weeks and $50 to $180 in the two lightest, with July and early August, the
two heaviest months by output, not counted. In bead terms that was 280
closures and 293 commits claimed from a terminal, plus about 2,465 further
commits in ninety days carrying a Claude model trailer with no bead
attached, which is what a person steering an agent looks like in a git log.
The weekly meter peaked at 71% in the busiest October week at one to two
governed workers, and every cap the account hit was hit from the terminal:
in mid-September, in the week of October 12, and in the last week of
October. Only 91 fleet attempts ran Anthropic&apos;s models, too few to score.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The same harness on a GLM coding plan.&lt;/strong&gt; For scale, the Claude Code
harness with GLM models behind it made 8,302 fleet attempts in the same
window at a 40% yield (43% without splits), with a median attempt of 28
minutes against Codex&apos;s six, and 5,542 code commits over sixty days, about
one per closed task. Over the full four months and four machines it ran
about 116,000 fleet sessions and a billion output tokens, carrying the
backlog alone from late July to the end of September before the Codex fleet
ramped up. Its biggest failure kind was not the agent at all: 41% of
failures were the proxy closing the stream mid-response, and in September
the proxy&apos;s rate limiter returned 96,000 retries in a month. The plan&apos;s
five-hour window never passed 57% at ten to twenty workers. That is the
other answer to the budget question: the harness is free, and the cheapest
capable model behind it changes the economics more than the harness does.
That plan has &lt;a href=&quot;/guides/glm-coding-plan/&quot;&gt;its own measured review&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Read the three together and the shape is this. Per closed task, Codex was
the fastest and the most likely to close without finishing the paperwork;
the Claude Code harness on GLM was slower and more often killed by its
provider; Anthropic&apos;s models were spent where a person was watching, and
that use would have cost many times the plan at API rates.&lt;/p&gt;
&lt;h2&gt;Where Codex is the better fit&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You hand off and come back.&lt;/strong&gt; Codex&apos;s whole surface is built for a
task to run without you: &lt;code&gt;codex exec&lt;/code&gt; was 96% of its sessions here, cloud
tasks share the plan allowance, and a Pro plan has no five-hour window to
pause a long run in the middle. Interactive Claude Code sessions are
heavier on the person; headless Claude Code works, but it is the mode the
product treats as a special case.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Continuity beats a neat boundary.&lt;/strong&gt; The re-basing weekly window and the
option to add credits meant that, after one bad week, Codex never stopped
mid-task again. If being paused is the failure you least want, that is
the record.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You already pay for ChatGPT.&lt;/strong&gt; Codex is included. Trying it costs
nothing but an &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Your guardrails are vetoes, not rewrites.&lt;/strong&gt; If a deny is all you need,
Codex&apos;s hook does it, and its approval and sandbox modes layer on top.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You want the plan to tell you what it costs.&lt;/strong&gt; The model you get, the
credit rate per million tokens, and what a typical task spends in credits
are stated on the pricing page in a way the Claude page does not match.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You would switch, or add Claude Code, when you need a hook to rewrite a
command rather than refuse it, or when the work is a long interactive
session where plan mode, named tools and context management matter more
than hand-off.&lt;/p&gt;
&lt;h2&gt;Where Claude Code is the better fit&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You steer from the terminal.&lt;/strong&gt; Named tools, a plan mode, permission
modes you can tighten, and a hook that can ask you before a dangerous
command make the interactive loop the richer one. When a person was
doing most of the work here, in July, the median terminal session was a
seven-hour working session; once the fleet carried the backlog, the
terminal became a lookup console, with the long sessions still running
for hours when something needed steering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A team shares conventions, or a platform team sets rules.&lt;/strong&gt; Claude
Code&apos;s PreToolUse hook can allow, deny, ask, &lt;em&gt;or rewrite&lt;/em&gt; a tool call,
and managed settings can pin that for everyone. On this machine that hook
is the reason no workflow file, no Kubernetes Job and no floating image
tag has been committed by an agent, across both harnesses, because the
rule guard runs under Codex too, as a veto.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A predictable reset.&lt;/strong&gt; The weekly window reset at the same hour every
week in every observation. If you plan a team&apos;s week around a quota, that
predictability is worth something.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cheaper hours at the cap.&lt;/strong&gt; A busy Claude session drained its allowance
at about two thirds the rate a busy Codex session did, and the Max plan
includes monthly API credits for overflow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You already pay for Claude.&lt;/strong&gt; Claude Code is included from the $20 Pro
tier up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You would switch, or add Codex, when a task should run while you are away
and a pause mid-task costs more than a predictable reset, or when the
subagent bill for routine work stops being worth the delegation.&lt;/p&gt;
&lt;h2&gt;When you want both, and when you want neither&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Both, each with a job.&lt;/strong&gt; Two top-tier plans make sense when the work is
parallel or around the clock. One allowance of either carried about two
always-on workers here; two allowances carry four, on two meters that do
not drain together, with two different models to cross-check each other.
The way to make $400 defensible is to make the split operational: give each
harness a named class of work, keep one &lt;code&gt;AGENTS.md&lt;/code&gt; both can read, and run
one shared acceptance check, so that what you compare is finished, reviewed
work and not tokens or turns. Drop one when its meter sits under half used
for three weeks running.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Neither, for now.&lt;/strong&gt; Under five hours a week, with no plan already in hand,
pay per token through either vendor&apos;s API. There are no windows at all, and
both agents run on a metered key, although Codex&apos;s cloud features do not.
The break-even arrives early: the lightest week of interactive Claude use
here, two dozen short sessions, priced at about $50 at list rates, and a
week with real multi-hour sessions priced in the hundreds, so a $100 plan
pays for itself well before a day a week of real work. Read the bill after a
month and move up when it crosses the plan price twice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The $20 tiers.&lt;/strong&gt; Both carry a five-hour window on top of the weekly cap,
and the five-hour window is the one a single busy afternoon hits. They are
the right way to find out which loop you prefer; they are not the plan to
run a long task on while you are away.&lt;/p&gt;
&lt;h2&gt;Tested with&lt;/h2&gt;
&lt;p&gt;Claude Code 2.1.316 and Codex CLI 0.166.0 were the installed versions when
this was written, and the telemetry runs from July 9 (Claude Code) and
August 3 (Codex) through 2026-10-31. August 3 is the day Codex was installed
on this machine, so its record is complete; July 9 is the first day the
Claude Code archive holds, not the first day the tool was used. Both tools
ship often: the transcripts record 86 Claude Code releases in 115 days and
21 Codex CLI releases in 90. The plan names and prices are the vendors&apos; pages
as they read on 2026-10-31; both pages change without a dated changelog. A
weekly check compares the installed versions and the age of the telemetry
against this page and flags it for a refresh when either tool moves by a
minor version or the data passes ninety days. When the numbers are re-run
the versions above change with them, and the &quot;Tested with&quot; line under the
title is the one to trust.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>claude-code</category><category>codex</category><category>agents</category><category>subscriptions</category><category>fleet-ops</category></item><item><title>Your CLI has a second user now</title><link>https://jedarden.com/notes/cli-design-for-humans-and-agents/</link><guid isPermaLink="true">https://jedarden.com/notes/cli-design-for-humans-and-agents/</guid><description>Every command-line tool you ship is now driven by language-model agents as well as people. An agent learns the tool from --help, parses stdout as data, treats the error message as its only hint, and cannot answer a prompt. Here is what that changes about help text, errors, output, flags, and login — and why the agent-friendly version is the better tool for people too.</description><pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A worker spent forty minutes on a one-line change to an issue tracker. The command was right. The flag was wrong: &lt;code&gt;--notes&lt;/code&gt; replaced the whole notes field instead of appending to it, and the help line never said so. The agent wrote its note, erased a colleague&apos;s investigation, noticed the field looked thin, and &quot;fixed&quot; it by writing a longer note. Three times.&lt;/p&gt;
&lt;p&gt;A person would have squinted at the first result and gone looking for an &lt;code&gt;--append&lt;/code&gt; flag. The agent did what the help text told it was possible and nothing more, because the help text was the only manual it had.&lt;/p&gt;
&lt;p&gt;Every CLI you ship now has that second user. It discovers the tool by running &lt;code&gt;--help&lt;/code&gt;, parses stdout as data, treats the error message as its only hint about what to try next, and cannot type an answer when you ask it a question. Design for that user and the human gets a better tool too. The rules are mostly the ones &lt;a href=&quot;https://clig.dev/&quot;&gt;clig.dev&lt;/a&gt; wrote down for humans years ago; the agent audience just removes the tolerance.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A person squints past a vague error. An agent loops on it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;What an agent does differently&lt;/h2&gt;
&lt;p&gt;Six things, and each one turns a nice-to-have into a requirement:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It learns the tool from &lt;code&gt;tool --help&lt;/code&gt; and &lt;code&gt;tool &amp;lt;command&amp;gt; --help&lt;/code&gt;&lt;/strong&gt;, not from a docs site it may never fetch.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It cannot answer a prompt.&lt;/strong&gt; A confirmation question hangs the task until something times out.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It reads output literally&lt;/strong&gt;, so a spinner, a pager, or an ANSI escape is noise it has to work around.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It retries on failure.&lt;/strong&gt; An error that does not say what to change produces the same wrong call again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It copies values from one command into the next&lt;/strong&gt;, so anything printed, including a secret, ends up in a transcript.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It runs in CI, over SSH, and inside sandboxes&lt;/strong&gt; with no browser and no keychain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The payoff is symmetric. A CLI that satisfies those six points is one an agent can drive unsupervised, and it is also the one a new teammate can pick up without reading the wiki.&lt;/p&gt;
&lt;p&gt;I&apos;ll use a hypothetical issue tracker called &lt;code&gt;trk&lt;/code&gt; for the examples. Every rule below is one I&apos;ve either enforced in a tool of mine or paid for by not enforcing.&lt;/p&gt;
&lt;h2&gt;Help text is the manual&lt;/h2&gt;
&lt;p&gt;An agent&apos;s first command is &lt;code&gt;tool --help&lt;/code&gt; and its second is &lt;code&gt;tool &amp;lt;command&amp;gt; --help&lt;/code&gt;, and it will rarely look anywhere else. Help therefore has to be complete at every level, identical in shape across commands, and free to call.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-h&lt;/code&gt; and &lt;code&gt;--help&lt;/code&gt; both work on every command and subcommand&lt;/strong&gt;, print to stdout, and exit 0. Help on stderr with exit 1 reads as a failure to anything scripted. Don&apos;t reuse &lt;code&gt;-h&lt;/code&gt; for something else.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Help needs no login, no network, and no config file.&lt;/strong&gt; If &lt;code&gt;tool --help&lt;/code&gt; fails because the user is not authenticated, the agent cannot learn how to authenticate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Examples come first, and every command has at least one.&lt;/strong&gt; Agents copy examples; they fall back to the usage grammar only when no example fits. Show the common call, then one that uses the flags that change behavior.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every flag line states its value type, its default, and the environment variable that can set it.&lt;/strong&gt; &lt;code&gt;--region &amp;lt;name&amp;gt;   default us-east-1, env TRK_REGION&lt;/code&gt; is enough.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Say what a flag does to existing state when it is not obvious.&lt;/strong&gt; An agent assumes &lt;code&gt;--notes&lt;/code&gt; appends. If it replaces the whole field, the help line has to say so, or you get the forty-minute incident above.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;List the exit codes and what each means.&lt;/strong&gt; A documented code is one the agent can branch on; an undocumented non-zero is one it can only retry.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Missing required arguments print concise help&lt;/strong&gt; (one-line description, one example, the required flags, a pointer to &lt;code&gt;--help&lt;/code&gt;) and exit 2. Never hang waiting for stdin when stdin is a terminal and nothing is coming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An unknown command or flag gets a nearest-match suggestion.&lt;/strong&gt; Suggest, never auto-run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Top-level help lists every command with one line each&lt;/strong&gt;, grouped by task and ordered by frequency, not alphabetically. Mark deprecated commands rather than hiding them, so an agent that finds one in an old script learns the replacement.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep the layout identical across commands&lt;/strong&gt;: Usage, Examples, Flags, Exit codes, See also. An agent that has parsed one help screen should be able to parse all of them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A help screen that follows those rules:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ trk update --help
Update an issue&apos;s status, assignee, or notes.

Usage:
  trk update &amp;lt;issue-id&amp;gt; [flags]

Examples:
  trk update TRK-412 --status in_progress
  trk update TRK-412 --append-note &quot;Repro lives in tests/clone.rs&quot;
  trk update TRK-412 --assignee alice --if-revision 7 --json

Flags:
  --status &amp;lt;open|in_progress|deferred&amp;gt;   closed is only reachable via `trk close`
  --append-note &amp;lt;text&amp;gt;                   adds a note; may be repeated
  --notes &amp;lt;text&amp;gt;                         REPLACES every existing note
  --assignee &amp;lt;name&amp;gt;                      env TRK_ASSIGNEE
  --clear-assignee
  --if-revision &amp;lt;n&amp;gt;                      fail if the issue&apos;s revision is not n
  --json                                 print the updated issue as JSON on stdout
  -h, --help

Exit codes:
  0 updated   2 usage error   3 issue not found   4 stale revision   5 invalid transition

See also: trk close, trk show, trk schema update
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Two additions worth the effort for a tool agents will drive heavily: a &lt;code&gt;schema&lt;/code&gt; command (or &lt;code&gt;--help --json&lt;/code&gt;) that emits the commands, flags, types, and defaults as JSON, and a man page or &lt;code&gt;help&lt;/code&gt; subcommand that renders the same text for people who prefer it. Both are generated from the same definitions as the help screen, so they cannot drift.&lt;/p&gt;
&lt;h2&gt;Errors say what happened, why, and what to run next&lt;/h2&gt;
&lt;p&gt;An error message is the agent&apos;s only feedback channel, so it carries three things: what failed, why, and the exact flag or command that fixes it. Anything less and the next attempt is the same call again.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ trk update TRK-412 --status in_progress --if-revision 7
error[stale_revision]: TRK-412 is at revision 9; --if-revision 7 is stale
  cause: the issue changed after you last read it
  fix:   trk show TRK-412 --json   # read the current revision, then retry with --if-revision 9
$ echo $?
4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same error under &lt;code&gt;--json&lt;/code&gt; is one object on stderr, with a code that never changes wording even when the prose does:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{&quot;error&quot;:{&quot;code&quot;:&quot;stale_revision&quot;,&quot;message&quot;:&quot;TRK-412 is at revision 9; --if-revision 7 is stale&quot;,&quot;fix&quot;:&quot;trk show TRK-412 --json, then retry with --if-revision 9&quot;,&quot;retryable&quot;:false,&quot;exit&quot;:4}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Errors go to stderr and stdout stays clean for data&lt;/strong&gt;, so a pipeline that captures stdout never captures a half-written error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every error has a stable machine-readable code&lt;/strong&gt; (&lt;code&gt;stale_revision&lt;/code&gt;) alongside the human sentence. Exit codes are the coarse classification; error codes are the fine one. Agents and scripts branch on the code and show the sentence to the human.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Name the offending value and the flag it came from.&lt;/strong&gt; &quot;invalid value&quot; is useless; &quot;&lt;code&gt;--status done&lt;/code&gt; is not a status; valid: open, in_progress, deferred (closed is reached via &lt;code&gt;trk close&lt;/code&gt;)&quot; is a fix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A wrong-state error names the state and the command that leaves it&lt;/strong&gt;: &quot;TRK-412 is closed; &lt;code&gt;--status&lt;/code&gt; cannot reopen it. Run &lt;code&gt;trk reopen TRK-412&lt;/code&gt;.&quot; Without that line the agent tries every status value in turn.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A wrong-tool or wrong-version error says so in those words.&lt;/strong&gt; A tracker store written by version 2 and opened by version 1 should fail with &quot;workspace schema 7 is newer than this binary (schema 5); upgrade trk&quot;, not with a raw &quot;no such column&quot; from the database layer. I watched the generic version of that error lead an agent to apply version 1&apos;s corruption-recovery recipe to a healthy version 2 store, which reinitialized it with the wrong schema. Check a schema marker before touching data, and make the mismatch message name the real cause.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A permission or policy refusal says whether the caller can fix it.&lt;/strong&gt; &quot;requires the admin role; ask an operator to grant it&quot; tells an agent to stop and report. &quot;access denied&quot; tells it to try again with different flags.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authentication errors name the login path, never the credential&lt;/strong&gt;: &quot;not logged in to &lt;a href=&quot;http://trk.example.com&quot;&gt;trk.example.com&lt;/a&gt;; run &lt;code&gt;trk auth login&lt;/code&gt; or set TRK_TOKEN&quot;. Distinguish no credential, expired credential, and insufficient scope, and name the missing scope with the command that adds it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack traces are off by default and on with &lt;code&gt;--debug&lt;/code&gt;&lt;/strong&gt; or &lt;code&gt;TRK_DEBUG=1&lt;/code&gt;. Write the full trace to a log file and print its path. A traceback pasted into an agent&apos;s context costs tokens and brings it no closer to the fix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Partial failure is reported per item.&lt;/strong&gt; If three of five updates failed, exit non-zero, list the three with their codes, and print the two that succeeded so the caller can resume without redoing them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repeated errors are grouped under one header.&lt;/strong&gt; Fifty identical lines hide the one that differs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One small, tool-wide exit-code table, documented in &lt;code&gt;--help&lt;/code&gt; and used identically by every command:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;What an agent should do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;success&lt;/td&gt;
&lt;td&gt;continue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;unexpected failure&lt;/td&gt;
&lt;td&gt;report it; do not retry blindly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;usage error&lt;/td&gt;
&lt;td&gt;re-read &lt;code&gt;--help&lt;/code&gt;, fix the call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;not found&lt;/td&gt;
&lt;td&gt;check the identifier, do not retry as-is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;stale precondition&lt;/td&gt;
&lt;td&gt;re-read state, then retry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;invalid state transition&lt;/td&gt;
&lt;td&gt;run the command the message names&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;not authenticated or not authorized&lt;/td&gt;
&lt;td&gt;run &lt;code&gt;trk auth login&lt;/code&gt;, or stop if the message says it needs an operator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;transient (network, rate limit)&lt;/td&gt;
&lt;td&gt;back off and retry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;130&lt;/td&gt;
&lt;td&gt;interrupted&lt;/td&gt;
&lt;td&gt;nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The split that matters most is retryable against not. A tool that returns 1 for everything forces every caller to guess, and an agent that guesses retries.&lt;/p&gt;
&lt;h2&gt;Output is a contract&lt;/h2&gt;
&lt;p&gt;Treat stdout as a return value that someone will parse and stderr as the channel for everything a person might want to see. Every other output rule follows from that split.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ trk create --title &quot;Flaky clone test&quot; --json
{&quot;schema&quot;:&quot;trk.issue/1&quot;,&quot;id&quot;:&quot;TRK-413&quot;,&quot;revision&quot;:1,&quot;status&quot;:&quot;open&quot;,&quot;url&quot;:&quot;https://trk.example.com/TRK-413&quot;}

$ trk create --title &quot;Flaky clone test&quot;
Created TRK-413 (revision 1)
https://trk.example.com/TRK-413
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data goes to stdout; progress, warnings, hints, and success chatter go to stderr.&lt;/strong&gt; &lt;code&gt;trk list | jq&lt;/code&gt; must never see a &quot;Fetching…&quot; line.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every command that produces output supports &lt;code&gt;--json&lt;/code&gt;, including mutations&lt;/strong&gt;, which print the resulting object. The agent&apos;s next command is built from this output, so always include the identifier and revision it will need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The JSON schema is stable and versioned.&lt;/strong&gt; Fields are added, never renamed or repurposed; a removal is a major version. Stamp each object with its schema name (&lt;code&gt;&quot;schema&quot;:&quot;trk.issue/1&quot;&lt;/code&gt;) or publish it through &lt;code&gt;trk schema&lt;/code&gt;, so a consumer can detect drift instead of discovering it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lists are either one JSON object per line or one top-level array.&lt;/strong&gt; Pick one per tool and document it. Paginated commands take &lt;code&gt;--limit&lt;/code&gt; and &lt;code&gt;--cursor&lt;/code&gt; and return the next cursor in the JSON, never an elided &quot;and 37 more&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detect whether stdout is a terminal, and check stderr separately.&lt;/strong&gt; When it is not, turn off color, spinners, progress bars, column truncation, and prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Honor &lt;code&gt;NO_COLOR&lt;/code&gt; when set and non-empty, &lt;code&gt;TERM=dumb&lt;/code&gt;, and &lt;code&gt;--no-color&lt;/code&gt;&lt;/strong&gt;; offer &lt;code&gt;--color=always&lt;/code&gt; for the reverse, because some agents run tools through a pseudo-terminal and want neither. &lt;a href=&quot;https://no-color.org/&quot;&gt;no-color.org&lt;/a&gt; has the convention.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Never start a pager unless stdout is a terminal&lt;/strong&gt;, and honor &lt;code&gt;PAGER&lt;/code&gt; and &lt;code&gt;--no-pager&lt;/code&gt;. A pager under an agent is a hang with no error message.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human-readable output is also parseable in a pinch&lt;/strong&gt;: one record per line, stable column order, and &lt;code&gt;--plain&lt;/code&gt; to drop alignment and decoration for grep and awk.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--quiet&lt;/code&gt; suppresses success messages, never errors.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timestamps in JSON are ISO 8601 in UTC.&lt;/strong&gt; The human format may localize; the machine format never does.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secrets never reach either stream, including under &lt;code&gt;--debug&lt;/code&gt;.&lt;/strong&gt; Print the retrieval path (the environment variable name, the secret store path) rather than the value, and redact anything that looks like a token in debug logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The human-first format is still the default, and that is correct: a person who types the command deserves readable output. The agent just needs &lt;code&gt;--help&lt;/code&gt; to tell it that &lt;code&gt;--json&lt;/code&gt; exists, and the JSON to be worth parsing.&lt;/p&gt;
&lt;h2&gt;Arguments and flags are the API&lt;/h2&gt;
&lt;p&gt;Make every input expressible as a named flag, make precedence explicit, and make sure nothing that has to stay secret ever needs to be a flag value. A flag reads as documentation in a transcript; a bare positional reads as a guess.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Configuration precedence, highest first:
  1. flags            --server https://trk.example.com
  2. environment      TRK_SERVER
  3. config file      ~/.config/trk/config.toml
  4. built-in default
See the effective values:  trk config show --json
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One positional at most: the noun the command acts on&lt;/strong&gt; (&lt;code&gt;trk update TRK-412&lt;/code&gt;). Everything else is a flag with a long name, and &lt;code&gt;--flag value&lt;/code&gt; and &lt;code&gt;--flag=value&lt;/code&gt; both work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Precedence is flag, then environment, then config file, then default&lt;/strong&gt;, documented once in &lt;code&gt;--help&lt;/code&gt; and applied by every command. A &lt;code&gt;config show --json&lt;/code&gt; command prints the effective values so an agent can see what it is about to run with.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A secret is never a flag value.&lt;/strong&gt; Argument vectors are visible in &lt;code&gt;ps&lt;/code&gt;, in shell history, and in every agent transcript. Accept a file (&lt;code&gt;--token-file&lt;/code&gt;), stdin (&lt;code&gt;--with-token&lt;/code&gt; reading stdin, or &lt;code&gt;key=-&lt;/code&gt; for a field), or the system credential store. Environment variables leak too, through &lt;code&gt;docker inspect&lt;/code&gt; and &lt;code&gt;systemctl show&lt;/code&gt;; tolerate them for CI, but prefer a pipe or a file. What ends up in docs and tickets is then the retrieval path (&quot;set TRK_TOKEN from &lt;code&gt;gh auth token&lt;/code&gt;&quot;), never the value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-&lt;/code&gt; means stdin wherever a file or value is expected, and &lt;code&gt;@path&lt;/code&gt; reads a value from a file.&lt;/strong&gt; This is what lets &lt;code&gt;openssl rand -base64 32 | trk secret set app/db password=-&lt;/code&gt; run without the value ever existing as a literal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replace and append are different flags with different names.&lt;/strong&gt; &lt;code&gt;--notes&lt;/code&gt; that overwrites and &lt;code&gt;--append-note&lt;/code&gt; that adds cannot share a flag with a mode switch, because an agent that sees &lt;code&gt;--notes&lt;/code&gt; will use it to add a note and erase the previous ones.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--dry-run&lt;/code&gt; exists on every mutating command&lt;/strong&gt; and prints exactly what would change, in the same format the real run prints.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--yes&lt;/code&gt; skips confirmation prompts.&lt;/strong&gt; For the most destructive commands, require &lt;code&gt;--confirm &amp;lt;name&amp;gt;&lt;/code&gt; with the target&apos;s name instead, so a script can still pass it but cannot pass it by accident.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every mutation accepts &lt;code&gt;--if-revision &amp;lt;n&amp;gt;&lt;/code&gt;&lt;/strong&gt; (or an ETag) and fails with the stale-precondition code when the stored revision differs. This is the only thing that makes two agents on the same store safe. Without it the last writer wins and nobody is told.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Argument parsing has no side effects.&lt;/strong&gt; Reject unknown flags and validate every positional before creating or writing anything. A real binary that took an output path as its first positional was handed &lt;code&gt;--test-threads=2&lt;/code&gt; by a test harness, created a directory literally named &lt;code&gt;--test-threads=2/&lt;/code&gt; with 37 generated files in it, and a blanket &lt;code&gt;git add -A&lt;/code&gt; committed the lot.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every command accepts the identifier the tool prints.&lt;/strong&gt; If &lt;code&gt;create&lt;/code&gt; prints &lt;code&gt;TRK-413&lt;/code&gt;, then &lt;code&gt;show&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, and &lt;code&gt;close&lt;/code&gt; take &lt;code&gt;TRK-413&lt;/code&gt;. Accepting a short form as well is fine; requiring a different form is not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flags are order-independent relative to positionals.&lt;/strong&gt; &lt;code&gt;trk update --json TRK-412&lt;/code&gt; and &lt;code&gt;trk update TRK-412 --json&lt;/code&gt; are the same call.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--version&lt;/code&gt; prints the tool version and its output-schema versions&lt;/strong&gt; on one line, to stdout, exit 0, with no network call.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environment variables share one prefix (&lt;code&gt;TRK_&lt;/code&gt;)&lt;/strong&gt; and each flag&apos;s help line names its variable, so the mapping is never a guess.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A tool whose flags obey these rules is one where the agent&apos;s transcript doubles as a reproducible script. That is the goal: every call it makes should be one a human could paste and understand.&lt;/p&gt;
&lt;h2&gt;Non-interactive when no one is there&lt;/h2&gt;
&lt;p&gt;Decide once at startup whether a person is present, and if not, never ask a question: fail with the name of the flag that would have answered it. Interactive means stdin and stderr are terminals, &lt;code&gt;CI&lt;/code&gt; and &lt;code&gt;TRK_NO_PROMPT&lt;/code&gt; are unset, and &lt;code&gt;--non-interactive&lt;/code&gt; was not passed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ trk --help
trk: issue tracking from the terminal

Usage: trk &amp;lt;command&amp;gt; [flags]

Commands:
  create, show, list, update, close, reopen   work with issues
  auth login|status|token|logout              authentication
  config show|set                             configuration
  schema, doctor                              machine-readable self-description

Agents and scripts:
  Pass --json for stable output. Set TRK_NO_PROMPT=1 to fail instead of prompt.
  Run `trk doctor --json` to check auth and connectivity. Exit codes: trk help exit-codes.
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A missing input in non-interactive mode is a usage error that names the flag&lt;/strong&gt;: &quot;&lt;code&gt;--assignee&lt;/code&gt; is required when not running interactively&quot;. Never block reading stdin that will never arrive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A destructive command without &lt;code&gt;--yes&lt;/code&gt; fails with exit 2 and names &lt;code&gt;--yes&lt;/code&gt;.&lt;/strong&gt; It does not proceed and it does not prompt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No browser launch, no clipboard, no pager, no spinner, no update-available banner.&lt;/strong&gt; Print the URL, print the data, and stop. A banner on stderr is something an agent will try to act on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every network call has a default timeout and a &lt;code&gt;--timeout&lt;/code&gt; flag.&lt;/strong&gt; A hang produces no error message, so it is the worst outcome a tool can have.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mutations are safe to repeat.&lt;/strong&gt; &lt;code&gt;create&lt;/code&gt; takes an &lt;code&gt;--idempotency-key&lt;/code&gt; or is keyed by a natural name; &lt;code&gt;close&lt;/code&gt; on an already-closed issue returns 0 with a note, or a distinct documented code. Agents retry on any failure, and a retry that creates a duplicate is a bug they cannot see.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Long-running operations return a job id immediately&lt;/strong&gt;, with &lt;code&gt;--wait&lt;/code&gt; to block and a &lt;code&gt;status&lt;/code&gt; command to poll. Do not make the caller sit on a spinner it cannot read.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ctrl-C and SIGTERM exit promptly with 130 or 143&lt;/strong&gt; and leave no partial state or stale lock behind. Agents kill processes on timeout, so the cleanup path runs more often than you think.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A lock error names the holder, its PID, and its age&lt;/strong&gt;, and stale locks clear themselves. &quot;database is locked&quot; is a prompt to wait forever.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The tool describes itself.&lt;/strong&gt; &lt;code&gt;trk doctor --json&lt;/code&gt; reports the version, whether the caller is authenticated and as whom, which commands support &lt;code&gt;--json&lt;/code&gt;, which environment variables are set, and whether the server is reachable. GitLab&apos;s CLI has an &lt;a href=&quot;https://gitlab.com/gitlab-org/cli/-/issues/8177&quot;&gt;open proposal&lt;/a&gt; for exactly this shape, including a non-terminal error that points at the JSON-producing alternative.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Top-level help has a short section for agents and scripts&lt;/strong&gt;: which flag gives stable output, which variable disables prompts, where the exit codes are documented. Three lines are enough; the agent reads them on its first call.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this is a separate &quot;agent mode&quot;. It is the behavior any CI job or cron script already needed, applied by default whenever the tool cannot see a terminal.&lt;/p&gt;
&lt;h2&gt;Authentication: OIDC and OAuth for a tool that runs anywhere&lt;/h2&gt;
&lt;p&gt;Choose the login flow from where the tool is running, not from one default: Authorization Code with PKCE and a loopback redirect when a browser is on the same machine, the Device Authorization Grant when there is a terminal but no browser, and a short-lived token from a workload identity when there is no person at all. A long-lived API key pasted into a flag is the option to design out.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;trk auth login
├─ no terminal attached ─────────────▶ workload identity, or an injected short-lived token
│                                       (CI OIDC token, Kubernetes service-account token, TRK_TOKEN)
└─ terminal attached
   ├─ a browser can open on this host ▶ Authorization Code + PKCE, loopback redirect on 127.0.0.1   (default)
   └─ no browser ────────────────────▶ Device Authorization Grant: URL and code on stderr, poll the token endpoint

Flags force a path: --web, --device, --with-token (reads the token from stdin)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A terminal without a browser gets the device grant; no terminal at all gets a platform identity or an injected token, never a device code it cannot hand to anyone.&lt;/p&gt;
&lt;h3&gt;The three flows&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flow&lt;/th&gt;
&lt;th&gt;Use it when&lt;/th&gt;
&lt;th&gt;What it needs&lt;/th&gt;
&lt;th&gt;Main risk&lt;/th&gt;
&lt;th&gt;Reference&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authorization Code + PKCE, loopback redirect&lt;/td&gt;
&lt;td&gt;a person is at a machine with a browser&lt;/td&gt;
&lt;td&gt;a listener on 127.0.0.1, an ephemeral port, a browser&lt;/td&gt;
&lt;td&gt;low: the code is useless without the verifier, which never leaves the process&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8252&quot;&gt;RFC 8252&lt;/a&gt;, &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7636&quot;&gt;RFC 7636&lt;/a&gt;; default in gcloud and in AWS CLI 2.22+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Device Authorization Grant&lt;/td&gt;
&lt;td&gt;a terminal but no browser: SSH, a container, a dev VM&lt;/td&gt;
&lt;td&gt;a second device where the person can open a URL&lt;/td&gt;
&lt;td&gt;device-code phishing: the user code is a bearer for the polling session&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8628&quot;&gt;RFC 8628&lt;/a&gt;; &lt;code&gt;gh auth login&lt;/code&gt;, &lt;code&gt;aws sso login --use-device-code&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workload identity, token exchange&lt;/td&gt;
&lt;td&gt;no person: CI, a cluster, an unattended agent&lt;/td&gt;
&lt;td&gt;an identity the runner already has (CI OIDC token, Kubernetes service-account token)&lt;/td&gt;
&lt;td&gt;a long-lived fallback token that leaks&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8693&quot;&gt;RFC 8693&lt;/a&gt;; cloud federation endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;PKCE with a loopback redirect&lt;/strong&gt; is the default for interactive use. The CLI generates a code verifier, opens the browser to the authorize endpoint with the challenge and a random &lt;code&gt;state&lt;/code&gt;, listens once on &lt;code&gt;127.0.0.1:&amp;lt;port&amp;gt;&lt;/code&gt;, validates &lt;code&gt;state&lt;/code&gt; on the callback, exchanges the code with the verifier, and closes the listener. Bind to loopback only, accept one request, and time out. AWS made this the default for &lt;code&gt;aws sso login&lt;/code&gt; in CLI 2.22 and moved device code behind &lt;code&gt;--use-device-code&lt;/code&gt; (&lt;a href=&quot;https://aws.amazon.com/blogs/developer/aws-cli-adds-pkce-based-authorization-for-sso/&quot;&gt;AWS Developer Tools Blog, 2024-11-18&lt;/a&gt;); WorkOS reaches the same recommendation for any enterprise CLI (&lt;a href=&quot;https://workos.com/blog/pkce-vs-device-flow-cli-auth&quot;&gt;WorkOS, 2026-05-08&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The device grant&lt;/strong&gt; is the explicit fallback behind &lt;code&gt;--device&lt;/code&gt;, and the automatic choice when no browser can be launched. The CLI requests a device code, prints the verification URL and user code to stderr, polls the token endpoint at the returned interval, adds five seconds on &lt;code&gt;slow_down&lt;/code&gt;, keeps waiting on &lt;code&gt;authorization_pending&lt;/code&gt;, and fails cleanly on &lt;code&gt;expired_token&lt;/code&gt; or &lt;code&gt;access_denied&lt;/code&gt;. Because the user code is a bearer credential for that session, keep its lifetime to minutes, and expect some identity providers to block the grant by policy: detect that error and say so instead of polling to the deadline.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workload identity&lt;/strong&gt; is the right answer for anything unattended. A CI runner or a pod already holds an identity token from its platform; exchange it for an access token at the identity provider&apos;s federation endpoint so no long-lived secret exists anywhere. Where that is unavailable, accept a token through &lt;code&gt;TRK_TOKEN&lt;/code&gt; or &lt;code&gt;--with-token&lt;/code&gt; on stdin, keep it short-lived, and document the retrieval command rather than the value. An agent never completes a device flow on its own: it has no one to hand the code to. If it reaches one, it prints the URL and code, exits with the authentication code, and reports that a person has to finish the login.&lt;/p&gt;
&lt;h3&gt;The command set&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;gh&lt;/code&gt; is the reference shape (&lt;a href=&quot;https://cli.github.com/manual/gh_auth_login&quot;&gt;gh auth login manual&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;trk auth login [--web | --device | --with-token] [--hostname &amp;lt;host&amp;gt;] [--scopes &amp;lt;s,...&amp;gt;]
trk auth status [--json]        # host, account, token source, scopes, expiry; never the token
trk auth token                  # the one sanctioned way to get the value out, for piping
trk auth refresh --scopes &amp;lt;s&amp;gt;   # widen scopes without a full re-login
trk auth logout                 # revoke the refresh token at the provider, then clear storage
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;login&lt;/code&gt; picks the flow by environment and lets a flag force it.&lt;/strong&gt; &lt;code&gt;--with-token&lt;/code&gt; reads stdin so the value never touches argv.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;status&lt;/code&gt; makes one cheap authenticated call&lt;/strong&gt; and reports which credential source is active: environment, file, or credential store. &quot;Which identity am I&quot; is the first question when something returns 403, so answer it in &lt;code&gt;--json&lt;/code&gt; too.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;token&lt;/code&gt; prints the access token and nothing else to stdout&lt;/strong&gt;, refreshing first if it has expired. It exists so that &lt;code&gt;curl -H &quot;Authorization: Bearer $(trk auth token)&quot;&lt;/code&gt; works without the value being typed anywhere. Warn on stderr when stdout is a terminal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;logout&lt;/code&gt; revokes at the provider&lt;/strong&gt; (&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7009&quot;&gt;RFC 7009&lt;/a&gt;), not just locally.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Storage, precedence, and scopes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Store tokens in the system credential store&lt;/strong&gt; (Keychain, Secret Service, Windows Credential Manager). Fall back to a mode-600 file under the tool&apos;s config directory only with &lt;code&gt;--insecure-storage&lt;/code&gt; or a visible warning, and never into the config file that people commit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Store the refresh token, access token, expiry, scopes, and host together.&lt;/strong&gt; Refresh silently before expiry; when a refresh fails, exit with the authentication code and the login command.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Precedence is &lt;code&gt;TRK_TOKEN&lt;/code&gt;, then &lt;code&gt;--token-file&lt;/code&gt;, then the stored credential&lt;/strong&gt;, and &lt;code&gt;auth status&lt;/code&gt; says which one won.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Request the smallest default scope set.&lt;/strong&gt; An insufficient-scope error names the missing scope and prints &lt;code&gt;trk auth refresh --scopes &amp;lt;name&amp;gt;&lt;/code&gt; as the fix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Register the CLI as a public client with no client secret.&lt;/strong&gt; A secret compiled into a distributed binary is not a secret.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discover endpoints from &lt;code&gt;&amp;lt;issuer&amp;gt;/.well-known/openid-configuration&lt;/code&gt;&lt;/strong&gt; rather than hardcoding them. With OIDC you also get an ID token: validate &lt;code&gt;iss&lt;/code&gt;, &lt;code&gt;aud&lt;/code&gt;, &lt;code&gt;exp&lt;/code&gt;, and &lt;code&gt;nonce&lt;/code&gt;, and use its &lt;code&gt;preferred_username&lt;/code&gt; or &lt;code&gt;email&lt;/code&gt; claim to make &lt;code&gt;auth status&lt;/code&gt; say who is logged in. Request &lt;code&gt;offline_access&lt;/code&gt; where the provider requires it for a refresh token.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A command that needs authentication and has none exits 6&lt;/strong&gt; with &quot;not logged in to &lt;a href=&quot;http://trk.example.com&quot;&gt;trk.example.com&lt;/a&gt;; run &lt;code&gt;trk auth login&lt;/code&gt; (interactive) or set TRK_TOKEN (scripts)&quot;. It never launches a login flow on its own when no terminal is present.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;A device-flow login in thirty lines&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;import sys, time, requests

ISSUER, CLIENT_ID = &quot;https://id.example.com&quot;, &quot;trk-cli&quot;   # public client: no secret
cfg = requests.get(f&quot;{ISSUER}/.well-known/openid-configuration&quot;).json()

r = requests.post(cfg[&quot;device_authorization_endpoint&quot;], data={
    &quot;client_id&quot;: CLIENT_ID, &quot;scope&quot;: &quot;openid offline_access trk.issues&quot;}).json()
print(f&quot;Open {r[&apos;verification_uri&apos;]} and enter code {r[&apos;user_code&apos;]}&quot;, file=sys.stderr)
if &quot;verification_uri_complete&quot; in r:
    print(f&quot;  or open {r[&apos;verification_uri_complete&apos;]}&quot;, file=sys.stderr)

interval, deadline = r.get(&quot;interval&quot;, 5), time.time() + r[&quot;expires_in&quot;]
while time.time() &amp;lt; deadline:
    time.sleep(interval)
    t = requests.post(cfg[&quot;token_endpoint&quot;], data={
        &quot;grant_type&quot;: &quot;urn:ietf:params:oauth:grant-type:device_code&quot;,
        &quot;device_code&quot;: r[&quot;device_code&quot;], &quot;client_id&quot;: CLIENT_ID}).json()
    if &quot;access_token&quot; in t:
        store(t)                      # credential store or a mode-600 file; never printed
        print(&quot;Logged in&quot;, file=sys.stderr)
        break
    if t[&quot;error&quot;] == &quot;slow_down&quot;:
        interval += 5
    elif t[&quot;error&quot;] != &quot;authorization_pending&quot;:
        die(6, f&quot;login failed: {t[&apos;error&apos;]}&quot;)      # expired_token, access_denied, or a policy block
else:
    die(6, &quot;login timed out; run `trk auth login --device` again&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything a person needs goes to stderr, the token goes to storage, and stdout stays empty so &lt;code&gt;trk auth login --device &amp;amp;&amp;amp; trk list --json&lt;/code&gt; composes.&lt;/p&gt;
&lt;h2&gt;The checklist&lt;/h2&gt;
&lt;p&gt;Run this against any CLI before calling it ready for agents. Every line is something a reviewer can verify in under a minute with the binary in front of them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Help&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-h&lt;/code&gt; and &lt;code&gt;--help&lt;/code&gt; work on every command, print to stdout, exit 0, and need no login or network&lt;/li&gt;
&lt;li&gt;every command has at least one example; every flag line shows its type, default, and environment variable&lt;/li&gt;
&lt;li&gt;exit codes are listed in help; an unknown command or flag gets a nearest-match suggestion&lt;/li&gt;
&lt;li&gt;replace-versus-append and state-transition semantics are stated on the flag line itself&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Errors&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;every error says what failed, why, and the exact fix, carries a stable code, and goes to stderr&lt;/li&gt;
&lt;li&gt;exit codes distinguish usage, not found, stale precondition, auth, and transient failures&lt;/li&gt;
&lt;li&gt;a schema or version mismatch is detected before any data is touched and named as such&lt;/li&gt;
&lt;li&gt;stack traces appear only under &lt;code&gt;--debug&lt;/code&gt; and are written to a file whose path is printed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;stdout carries data only; &lt;code&gt;--json&lt;/code&gt; exists on every command, including mutations; the schema is versioned&lt;/li&gt;
&lt;li&gt;a non-terminal stdout disables color, spinners, pagers, and truncation; &lt;code&gt;NO_COLOR&lt;/code&gt; is honored&lt;/li&gt;
&lt;li&gt;every mutation prints the identifier and revision the next command will need&lt;/li&gt;
&lt;li&gt;no secret reaches either stream, including under &lt;code&gt;--debug&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Flags&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;precedence is flag, environment, config, default, documented once, visible via &lt;code&gt;config show --json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;secrets arrive by file, stdin, or credential store, never as an argument&lt;/li&gt;
&lt;li&gt;mutations take &lt;code&gt;--dry-run&lt;/code&gt;, &lt;code&gt;--yes&lt;/code&gt;, and &lt;code&gt;--if-revision&lt;/code&gt;; a parse failure has no side effects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Non-interactive&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;without a terminal there are no prompts, no browser, no pager; a missing input names its flag&lt;/li&gt;
&lt;li&gt;every network call has a timeout; mutations are safe to repeat; SIGINT and SIGTERM exit cleanly&lt;/li&gt;
&lt;li&gt;&lt;code&gt;doctor --json&lt;/code&gt; exists and top-level help has a short paragraph for agents and scripts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Auth&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PKCE with a loopback redirect by default, &lt;code&gt;--device&lt;/code&gt; as the fallback, &lt;code&gt;--with-token&lt;/code&gt; on stdin&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auth status&lt;/code&gt; names the identity and the credential source, never the token&lt;/li&gt;
&lt;li&gt;tokens live in the system credential store, refresh silently, and &lt;code&gt;logout&lt;/code&gt; revokes at the provider&lt;/li&gt;
&lt;li&gt;an unauthenticated non-interactive call exits with the auth code and the login command; it never starts a flow on its own&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;When I&apos;m reviewing a CLI, mine or someone else&apos;s, I no longer ask whether the help text is good. I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If the only things an agent ever sees are &lt;code&gt;--help&lt;/code&gt;, stdout, stderr, and the exit code, can it finish the job without guessing?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If the answer is &quot;it would need to know that &lt;code&gt;--notes&lt;/code&gt; replaces,&quot; or &quot;it would need to open a browser,&quot; or &quot;it would need to read the stack trace,&quot; then the tool has a human in the loop it hasn&apos;t admitted to. Fix the help line, the error, the flag, or the login flow, and the human gets the same improvement for free.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;References: &lt;a href=&quot;https://clig.dev/&quot;&gt;Command Line Interface Guidelines&lt;/a&gt; is the human-first baseline this extends. The auth section leans on &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8252&quot;&gt;RFC 8252&lt;/a&gt; (native apps and loopback redirects), &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8628&quot;&gt;RFC 8628&lt;/a&gt; (the device grant), &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc8693&quot;&gt;RFC 8693&lt;/a&gt; (token exchange), and &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc9700&quot;&gt;RFC 9700&lt;/a&gt; (the 2025 OAuth security best current practice). Related: &lt;a href=&quot;/notes/ignore-env-is-not-a-defense/&quot;&gt;&apos;Ignore .env&apos; is not a defense&lt;/a&gt; on why a secret&apos;s safety cannot rest on a sentence in a prompt, which is why the flag rules above refuse a secret in argv at all, and &lt;a href=&quot;/notes/a-mute-gate-is-worse-than-a-red-one/&quot;&gt;A mute gate is worse than a red one&lt;/a&gt; on why silence from a tool is the failure you don&apos;t get told about.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>cli</category><category>tooling</category><category>auth</category></item><item><title>My agents adapt to where they work in the codebase. Here’s how.</title><link>https://jedarden.com/notes/dynamic-context-with-agents-md/</link><guid isPermaLink="true">https://jedarden.com/notes/dynamic-context-with-agents-md/</guid><description>The same agent needs different instructions for a checkout form and a database migration. Here’s how I use AGENTS.md files to make that context follow the code.</description><pubDate>Fri, 09 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I want an agent changing a frontend component to think about keyboard behavior and design tokens. I want the same agent changing a database migration to think about existing data and whether the migration has already run. Those are different jobs, even when they happen in the same repository.&lt;/p&gt;
&lt;p&gt;My way of giving the agent that context is to put &lt;code&gt;AGENTS.md&lt;/code&gt; files at the places where the work changes. One at the root for the whole repository. Another in the frontend. Another in the backend. A more specific one around database work, if it needs its own rules.&lt;/p&gt;
&lt;p&gt;The agent gets shared instructions plus the instructions that apply to the part of the repo it is working in. &lt;strong&gt;The directory structure becomes part of how I write the prompt.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I call this “dynamic” context because the relevant combination changes with the work. The files themselves are ordinary Markdown, sitting beside the code they describe.&lt;/p&gt;
&lt;h2&gt;The repo is a map of the instructions&lt;/h2&gt;
&lt;p&gt;Here is a small example. The paths and rules below are illustrative; this is the arrangement I want readers to be able to copy into their own projects.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app/
├── AGENTS.md                         shared repository rules
├── frontend/
│   ├── AGENTS.md                     interface and browser rules
│   └── Checkout.tsx
├── backend/
│   ├── AGENTS.md                     service and test conventions
│   ├── routes/
│   │   └── orders.ts
│   └── db/
│       ├── AGENTS.md                 migration rules
│       └── migrations/
│           └── 042_orders.sql
└── docs/
    ├── AGENTS.md                     documentation conventions
    └── setup.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For &lt;code&gt;frontend/Checkout.tsx&lt;/code&gt;, the relevant repository instructions are the root file and the frontend file. For &lt;code&gt;backend/db/migrations/042_orders.sql&lt;/code&gt;, they are the root file, the backend file, and the database file, in that order.&lt;/p&gt;
&lt;p&gt;The frontend file is a sibling of the backend subtree. Its rules do not govern the migration. And &lt;code&gt;routes/&lt;/code&gt; does not need an instruction file merely because it is a directory; it inherits the backend guidance.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- vignette: context-stack --&amp;gt;&lt;/p&gt;
&lt;p&gt;Select a file in the visualization to see its applicable instructions assemble. The stack shows &lt;strong&gt;scope&lt;/strong&gt;: which guidance belongs to that file. It does not represent a live trace of a particular agent loading its prompt.&lt;/p&gt;
&lt;p&gt;The underlying rule is simple enough to write down:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Instructions for a file
  = shared guidance supplied by the environment
  + repo-root guidance
  + applicable ancestor-directory guidance, broadest to narrowest
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives me a place to put a fact once, at the level where it becomes true. A convention for every service belongs in the backend file. A constraint that only matters for migrations belongs closer to the migrations.&lt;/p&gt;
&lt;h2&gt;What I put in each layer&lt;/h2&gt;
&lt;p&gt;The root file establishes the working agreement for the repository. I keep it focused on things that should survive a move between directories: how to preserve compatibility, how to find the right checks, and how to discover more specific instructions before editing.&lt;/p&gt;
&lt;p&gt;For this example, the root could contain:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Repository working agreement

- Preserve public interfaces unless the task explicitly changes them.
- Default verification: run the relevant package&apos;s tests.
- Before editing a file, inspect applicable nested AGENTS.md files
  along its directory path. Follow their rules for that scope.
- Local files may replace a named default within their scope.
  Other applicable parent rules still apply.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That third instruction matters. It tells the agent to check the area it is about to touch, including when a task starts at the root and later moves into a subdirectory.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;frontend/AGENTS.md&lt;/code&gt;, I put the things that distinguish frontend work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Frontend

- Reuse the existing design tokens and components.
- Check changed interactions with a keyboard.
- Check the affected screen at a narrow viewport.
- Run the frontend package&apos;s tests after changing behavior.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In &lt;code&gt;backend/AGENTS.md&lt;/code&gt;, the emphasis changes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Backend

- Keep route handlers thin; put business behavior in the service layer.
- For backend changes, replace the root verification default with
  backend unit tests. This is the default backend verification.
- Preserve documented response shapes unless the task changes them.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then &lt;code&gt;backend/db/AGENTS.md&lt;/code&gt; can be more specific still:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Database

- Treat applied SQL migrations as append-only. Add a new migration
  to change a schema that has already been deployed.
- For SQL migration changes, replace the backend unit-test default
  with the migration integration check against a disposable database.
- Verify both an empty database and an upgrade from the previous schema.
- If application code also changes, run its applicable checks too.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In a real repo, I put the actual commands and their working directories in these files. “Run the integration check” is enough to explain the example, but a worker needs to know which command that means and what success looks like. A command that relies on my memory is an unfinished instruction.&lt;/p&gt;
&lt;h2&gt;Concatenation needs scope and precedence&lt;/h2&gt;
&lt;p&gt;It is useful to picture the instruction files being concatenated into one prompt: the broad agreement first, followed by increasingly local guidance. But concatenation alone does not resolve an ambiguous instruction.&lt;/p&gt;
&lt;p&gt;In the database example, the local file names exactly what it replaces: the &lt;strong&gt;backend unit-test default for SQL migration changes&lt;/strong&gt;. The root requirement to preserve public interfaces still applies. So does the requirement to check changed application code when the task touches it.&lt;/p&gt;
&lt;p&gt;I prefer an explicit replacement like that to two disconnected commands that happen to disagree. It lets both a human and an agent explain why the verification plan changed.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;context-scope-table&quot; role=&quot;region&quot; aria-label=&quot;Instruction scope comparison, scroll horizontally on small screens&quot; tabindex=&quot;0&quot;&amp;gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File being changed&lt;/th&gt;
&lt;th&gt;Applicable repository files&lt;/th&gt;
&lt;th&gt;Resulting behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;frontend/Checkout.tsx&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root → frontend&lt;/td&gt;
&lt;td&gt;Reuse UI conventions; check keyboard behavior and narrow screens.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/routes/orders.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root → backend&lt;/td&gt;
&lt;td&gt;Keep the handler thin; preserve response contracts; run backend unit tests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/db/migrations/042_orders.sql&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root → backend → database&lt;/td&gt;
&lt;td&gt;Add a migration; use the migration integration check for the SQL change.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/setup.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root → docs&lt;/td&gt;
&lt;td&gt;Verify the commands and provide runnable examples.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;These are instructions within the task&apos;s existing authority. A local file cannot grant permission the agent does not have, or make a repository convention outrank a higher-priority instruction from its environment.&lt;/p&gt;
&lt;h2&gt;Watch the work move through the repo&lt;/h2&gt;
&lt;p&gt;Imagine a task to add an order field. It might touch the checkout form, an API handler, the database schema, and the setup documentation.&lt;/p&gt;
&lt;p&gt;The root agreement applies throughout. Each move brings a different set of local concerns into play. The frontend guidance explains how to check the form. The backend guidance explains where the service behavior belongs. The database guidance adds the upgrade path. The documentation guidance makes the examples usable.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- vignette: context-walk --&amp;gt;&lt;/p&gt;
&lt;p&gt;Play the walkthrough, or step through one file at a time. Watch the shared layer stay in place while the applicable local layers change. Moving deeper into the database subtree adds another layer; moving across to documentation selects a different branch.&lt;/p&gt;
&lt;p&gt;For a task that crosses all four areas, I expect all four areas&apos; checks to be accounted for. The last file edited does not define the rules for the entire change. Each changed file keeps its scope, and the final verification plan covers the combined work.&lt;/p&gt;
&lt;p&gt;Nor does a change of scope mean the model forgets text it has already read. Instructions can remain in the conversation while ceasing to apply to the next file. That is why I make their boundaries explicit.&lt;/p&gt;
&lt;h2&gt;What the agent actually loads&lt;/h2&gt;
&lt;p&gt;There is one implementation detail to get right before relying on this pattern. &lt;strong&gt;Instruction scope and automatic discovery are separate things.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Codex documents its initial discovery as a chain built once per run: global guidance, then files along the path from the project root to the current working directory. It includes at most one instruction file per directory, with &lt;code&gt;AGENTS.override.md&lt;/code&gt; taking precedence over &lt;code&gt;AGENTS.md&lt;/code&gt; at that level. The project instruction budget defaults to 32 KiB. Starting in a deeper directory changes that initial chain. Simply mentioning a deeply nested file from a root session does not mean that initial discovery traverses its path. &lt;a href=&quot;https://learn.chatgpt.com/docs/agent-configuration/agents-md&quot;&gt;Official AGENTS.md documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is why my root guidance also tells the agent to inspect applicable nested files before editing. I treat automatic startup loading and deliberate inspection during the task as two parts of the setup. I verify both in the agent environment I am using.&lt;/p&gt;
&lt;p&gt;“They become the system prompt” is a convenient shorthand for the effect, but &lt;strong&gt;combined instruction context&lt;/strong&gt; is more precise. OpenAI&apos;s prompting guide describes the discovered &lt;code&gt;AGENTS.md&lt;/code&gt; chunks as user-role messages injected into the conversation in root-to-leaf order. They are not a replacement for the model&apos;s underlying system instructions. &lt;a href=&quot;https://developers.openai.com/cookbook/examples/gpt-5/codex_prompting_guide#using-agentsmd&quot;&gt;Official Codex prompting guide&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Other agent tools can use different filenames and loading rules. I check those rules before assuming this directory layout is sufficient on its own. I use the exact filename &lt;code&gt;AGENTS.md&lt;/code&gt; where that is the supported convention.&lt;/p&gt;
&lt;h2&gt;How I decide where a file belongs&lt;/h2&gt;
&lt;p&gt;I add an instruction file at a boundary where the agent&apos;s decisions should change. A package with different test commands is a good candidate. So is a directory containing generated code, a compatibility-sensitive interface, or schema migrations.&lt;/p&gt;
&lt;p&gt;I do not need a file in every directory. If a child file would repeat its parent, inheritance already does the job. If a child needs a paragraph of exceptions to every parent rule, I reconsider whether the parent is claiming too much scope.&lt;/p&gt;
&lt;p&gt;My test for an instruction is concrete: &lt;strong&gt;what would the agent do differently after reading this?&lt;/strong&gt; “Write good code” has no useful answer. “Preserve this response shape because older clients still consume it” does. So does “edit the schema source and regenerate this directory.”&lt;/p&gt;
&lt;p&gt;I keep these files with the code and update them when the workflow changes. If I replace the test runner, the test command changes in the same work. If a constraint stops being true, I remove it. Stale instructions are executable-looking misinformation.&lt;/p&gt;
&lt;p&gt;The instructions also need to fit the available context. Splitting one huge file into several huge files along the same path still creates a huge stack. I keep the standing rules short and point to deeper references when the task needs them.&lt;/p&gt;
&lt;h2&gt;Verify the setup with a real task&lt;/h2&gt;
&lt;p&gt;I packaged this workflow as &lt;a href=&quot;https://github.com/jedarden/setup-repo-context&quot;&gt;setup-repo-context&lt;/a&gt;, an MIT-licensed skill you can &lt;a href=&quot;https://github.com/jedarden/setup-repo-context/archive/refs/tags/v0.1.0.zip&quot;&gt;download as a versioned ZIP&lt;/a&gt;. It asks the agent to derive instruction boundaries from your repository, preserve existing rules, and show the resulting behavior for representative files and a task that crosses scopes. The repository includes installation instructions; use &lt;code&gt;$setup-repo-context&lt;/code&gt; after installing it.&lt;/p&gt;
&lt;p&gt;To try this in a repository, I would start with this prompt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Inspect this repository and its existing agent instructions. Find the
boundaries where the work needs different guidance: test commands,
compatibility constraints, generated files, or data migrations.

Propose the smallest useful set of scoped AGENTS.md changes. Use rules
supported by the code and documented workflow; flag anything uncertain.
Preserve existing instructions and avoid repeating parent rules.

For a representative file in each scope, show the applicable instruction
chain, any explicitly replaced defaults, and the checks you would run.
Also explain how my agent discovers those files during a task.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before trusting the arrangement, I give the agent a small task in each important area and ask it to identify the applicable instruction files and the checks it will run before it edits anything.&lt;/p&gt;
&lt;p&gt;For the migration example, I should be able to see the root, backend, and database guidance reflected in its plan. The meaningful result is a new migration and the right upgrade check. An agent reciting three filenames and then editing an applied migration has not passed the test.&lt;/p&gt;
&lt;p&gt;I also try a task that crosses a directory boundary. That tests whether the agent discovers the next area&apos;s instructions, rather than assuming the context it started with is sufficient for everything it will touch.&lt;/p&gt;
&lt;p&gt;This setup gives me a practical way to make context travel with the code. The shared expectations stay at the root. The specialized knowledge lives where it becomes relevant. When I want to change how agents work in one part of the repository, I have a small, reviewable file to change beside it.&lt;/p&gt;
</content:encoded><category>agents</category><category>context</category><category>workflow</category></item><item><title>A mute gate is worse than a red one</title><link>https://jedarden.com/notes/a-mute-gate-is-worse-than-a-red-one/</link><guid isPermaLink="true">https://jedarden.com/notes/a-mute-gate-is-worse-than-a-red-one/</guid><description>Every verification gate is designed for two states: green and red. The dangerous one is the third — a gate that produces no verdict at all. My CI started twenty-five builds in a day and finished none, and a flaky gate froze 36 tasks behind work that was already done. Red is information. Silence is the failure you don&apos;t get told about.</description><pubDate>Thu, 24 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The dashboard said nothing was wrong, and it was right in the most useless way possible. My fleet&apos;s CI hadn&apos;t failed a single build all day. It also hadn&apos;t passed one. It had started twenty-five and finished none.&lt;/p&gt;
&lt;p&gt;Every gate you build is designed around two states. Green means go; red means stop and look. Both are &lt;em&gt;verdicts&lt;/em&gt; — a claim about a specific commit, which somebody can act on. There&apos;s a third state nobody designs for, because it doesn&apos;t look like a state at all: the gate that says nothing. No red, no green, no error. Just a run list full of builds that were started and never concluded.&lt;/p&gt;
&lt;p&gt;I&apos;ve started calling this a &lt;strong&gt;mute gate&lt;/strong&gt;, and I&apos;ve come to believe it&apos;s strictly worse than a red one. A red gate is a problem you&apos;ve been told about. A mute gate is a problem that looks exactly like &quot;fine.&quot;&lt;/p&gt;
&lt;h2&gt;Twenty-five builds, zero verdicts&lt;/h2&gt;
&lt;p&gt;The setup was ordinary. A build on that repo takes 18 to 29 minutes. The fleet — twenty-odd headless coding agents pushing to the same &lt;code&gt;main&lt;/code&gt; — lands a commit every 2 to 8 minutes during working hours.&lt;/p&gt;
&lt;p&gt;A week earlier I&apos;d fixed a real problem: stale builds. Six of them had burned between 30 and 82 minutes each testing commits that were already obsolete by the time they started. So I added the most standard setting in CI, the one GitHub Actions exposes as &lt;code&gt;cancel-in-progress: true&lt;/code&gt;: when a newer commit arrives, kill the build that&apos;s running for the older one. Test the latest code, not history. Every CI system offers some version of it, and every one I&apos;ve used makes it look like pure hygiene.&lt;/p&gt;
&lt;p&gt;Do the arithmetic I didn&apos;t do. If a build takes 24 minutes and a push arrives every 5, a build only finishes if the fleet happens to go quiet for 24 straight minutes. During working hours, it never did. Each push killed the build in flight, started a new one, and that one was killed by the next push. Twenty-five builds, every one of them superseded a third of the way through.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- vignette: mute-gate-starvation --&amp;gt;&lt;/p&gt;
&lt;p&gt;The part that should worry you is how normal this looked from the outside. A superseded build isn&apos;t a failed build. It shows up as &lt;em&gt;stopped&lt;/em&gt; — in my case, exit code 143, which is just SIGTERM, the process being told to go away. Nothing turned red. Nothing paged. The run list was a column of builds that started, ran a while, and quietly ended, which is also what a healthy pipeline looks like when you glance at it between other things.&lt;/p&gt;
&lt;h2&gt;It doesn&apos;t degrade. It falls off a cliff.&lt;/h2&gt;
&lt;p&gt;The intuition that got me here was that cancelling stale builds costs a little throughput and saves a lot of waste — a gentle trade. The math says otherwise, and the shape of it is worth seeing.&lt;/p&gt;
&lt;p&gt;Say pushes arrive at random, averaging one every &lt;em&gt;I&lt;/em&gt; minutes, and a build takes &lt;em&gt;D&lt;/em&gt;. Under cancel-in-progress, a build finishes only if no push lands during its entire run. For random arrivals the chance of that is &lt;em&gt;e&lt;/em&gt;^(−D/I). At my numbers — &lt;em&gt;D&lt;/em&gt; = 24, &lt;em&gt;I&lt;/em&gt; ≈ 5 — that&apos;s &lt;em&gt;e&lt;/em&gt;^(−4.8): &lt;strong&gt;0.8% of builds finish, about one verdict every ten hours.&lt;/strong&gt; In practice it was worse, because pushes come in bursts during the day: none, all day.&lt;/p&gt;
&lt;p&gt;Now change one word in the policy. &lt;strong&gt;Cancel pending instead of in-progress:&lt;/strong&gt; a build that has started always finishes; a newer push replaces a &lt;em&gt;queued&lt;/em&gt; build that hasn&apos;t started yet, which costs nothing because no work was done. The gate now produces one verdict per build, back to back, whenever there&apos;s anything to test: at my numbers, about one every 24 minutes. Same pushes, same builds, same cluster. The difference is one policy word, and it&apos;s about twenty-five times more verdicts.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- vignette: mute-gate-cliff --&amp;gt;&lt;/p&gt;
&lt;p&gt;The cancel-in-progress curve peaks where pushes arrive exactly as often as builds take, and below that it doesn&apos;t decline gracefully — it collapses exponentially. Anything that raises your push rate walks you down that curve: more agents, more active hours, smaller commits (which is otherwise good advice). The dangerous property is that nothing about the gate itself tells you which side of the peak you&apos;re on. It just goes quiet.&lt;/p&gt;
&lt;h2&gt;Why mute is worse than red&lt;/h2&gt;
&lt;p&gt;A red gate is a message. It names a commit, a test, a line number. It&apos;s annoying, and it&apos;s &lt;em&gt;useful&lt;/em&gt;: somebody looks, something gets fixed, and in the meantime everyone knows not to trust &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A mute gate sends no message, and the absence of a message reads as good news. Nobody investigates silence. And an unattended fleet reads silence the same way a human does, only faster. During the stretch that CI was muted, &lt;strong&gt;575 commits landed with the definition-of-done check bypassed&lt;/strong&gt;, and &lt;strong&gt;no release was cut for twelve days&lt;/strong&gt;. Every individual bypass was locally reasonable — the gate wasn&apos;t going to say anything either way, so why wait on it? Twelve days of reasonable decisions add up to a codebase nobody has actually verified.&lt;/p&gt;
&lt;p&gt;There&apos;s a second way to go mute, and it starts red. A few weeks earlier the same CI had been red for 36 hours because one test deadlocked and timed out on every run. A red gate that &lt;em&gt;stays&lt;/em&gt; red stops carrying information too: it can&apos;t distinguish &quot;my commit is fine&quot; from &quot;I just broke something,&quot; so it gets ignored for the same reason a mute one does. About 225 commits landed with the pre-commit check skipped. When the deadlock was fixed, 78 tests had drifted underneath it, and within the hour &lt;code&gt;main&lt;/code&gt; stopped compiling outright. A gate that&apos;s always red is mute with extra steps.&lt;/p&gt;
&lt;h2&gt;The flaky gate: failing work that&apos;s already done&lt;/h2&gt;
&lt;p&gt;The third variety is the most insidious, because it &lt;em&gt;does&lt;/em&gt; produce verdicts. They just aren&apos;t about your code.&lt;/p&gt;
&lt;p&gt;My fleet runs a definition-of-done gate after every task: the agent does the work, and the gate decides whether it counts. On one repo, on one day, &lt;strong&gt;18 of 66 attempts were released as gate failures — about 27% of that repo&apos;s spend.&lt;/strong&gt; One task in particular failed eight times over three rounds and was automatically quarantined. Thirty-six of the repo&apos;s 41 open tasks depended on it. The ready queue emptied: the only things left were the quarantined task and a few waiting on humans. A fleet with literally nothing to claim.&lt;/p&gt;
&lt;p&gt;The task&apos;s work had been finished four times over. The code was committed on &lt;code&gt;main&lt;/code&gt;. Its acceptance tests passed. All fifteen subtasks it had been split into were closed. Every one of those eight failures was the gate, not the work — two flaky tests in an unrelated part of the suite:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A small test HTTP server inherited its standard library&apos;s default listen backlog of &lt;strong&gt;5&lt;/strong&gt;, while its own contract test opened &lt;strong&gt;32&lt;/strong&gt; simultaneous connections. When the accept queue overflowed, clients saw connection resets. Sometimes.&lt;/li&gt;
&lt;li&gt;A test asserted on a log line that the handler writes &lt;em&gt;after&lt;/em&gt; sending the response. The client usually got there second. Sometimes it got there first, and the count read 0 instead of 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;!-- vignette: mute-gate-quarantine --&amp;gt;&lt;/p&gt;
&lt;p&gt;A flaky gate is a mute gate wearing a red costume. Its verdict carries information about timing and luck, not about the commit under test. And it conceals itself in a way the other two don&apos;t: during the incident, a &quot;fix the build&quot; task was raised and then closed as &lt;em&gt;no change needed, main already passes&lt;/em&gt; — because the flake happened to pass on the run that checked. One green run is not evidence about a flake. It&apos;s a coin that happened to land heads.&lt;/p&gt;
&lt;h2&gt;What I run now&lt;/h2&gt;
&lt;p&gt;None of these fixes is clever. They all follow from one idea: &lt;strong&gt;a gate&apos;s product is a verdict, so measure the verdicts, not the colours.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alert on silence, not just on red.&lt;/strong&gt; The most important number about a gate isn&apos;t its pass rate — it&apos;s the time since it last produced a verdict &lt;em&gt;under its own power&lt;/em&gt;. A cancelled build isn&apos;t evidence the gate can finish anything, so it doesn&apos;t reset the clock. When that clock passes a threshold, that&apos;s an incident, even though nothing is red.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cancel pending, never in-progress.&lt;/strong&gt; Queued builds can be superseded freely; a started build finishes. And as a belt with those braces, a starvation guard: if nothing has finished under its own power in the last 45 minutes, supersede nothing on this pass. If there&apos;s no evidence the gate can complete, don&apos;t assume it can.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Red is a stop-the-line event.&lt;/strong&gt; When a gate goes red and stays red, restoring green is the first task, not a side quest, and pushes to that repo pause until it&apos;s done. Fixing drifted tests while the fleet keeps pushing on top of them is bailing out a boat with the tap still running.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Treat flake rate as a throughput tax — and prove fixes by repetition.&lt;/strong&gt; Don&apos;t diagnose a flake by re-running until it&apos;s green. Force the race: shrink the queue, inject the delay in the late writer, and show that the old code fails &lt;em&gt;every time&lt;/em&gt; and the new code passes. Then prove it with a streak — I use fifteen consecutive green runs of the full gate, and I report the count. One green proves nothing about a flake, which is exactly how the flake survived the first time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When finished work keeps failing, suspect the gate first.&lt;/strong&gt; A task that cycles with &quot;verified success&quot; from the agent and &quot;gate failed&quot; from the harness is telling you where the problem is. Read the attempt history before you re-dispatch, split, or rewrite the task. Otherwise you spend another round rediscovering that the work was done.&lt;/p&gt;
&lt;h2&gt;Same failure, one laptop&lt;/h2&gt;
&lt;p&gt;None of this needs a fleet. You&apos;ve probably built a mute gate at your own desk.&lt;/p&gt;
&lt;p&gt;A test watcher that restarts on every save is cancel-in-progress with a file watcher. If your suite takes 40 seconds and you save every 15, it never finishes — and you&apos;ll read the absence of red output as &quot;tests are passing.&quot; The same goes for an agent session: ask an agent to run a long suite with a short timeout and it will come back saying the tests &quot;are running&quot; or &quot;look good so far.&quot; That&apos;s not a verdict. It&apos;s the agent &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;grading its own homework&lt;/a&gt; on a test that never finished.&lt;/p&gt;
&lt;p&gt;Scale changes the cost, not the shape. On a laptop a mute gate wastes an afternoon. Across &lt;a href=&quot;/notes/what-breaks-at-twenty-agents/&quot;&gt;twenty unattended workers&lt;/a&gt; it wastes twelve days and five hundred commits — because a fleet doesn&apos;t wait for a verdict that isn&apos;t coming. It builds on top of the silence.&lt;/p&gt;
&lt;h2&gt;The question I ask now&lt;/h2&gt;
&lt;p&gt;When a gate hasn&apos;t bothered me in a while, I no longer take that as good news. I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When did this gate last actually say something?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is &quot;twenty minutes ago, it passed,&quot; good — that&apos;s a gate. If the answer is &quot;I&apos;m not sure,&quot; or &quot;it&apos;s been red since Tuesday,&quot; or &quot;it passed once, on the retry,&quot; then what I have isn&apos;t a gate. It&apos;s a decoration on the pipeline, and everything that has merged past it since then is unverified.&lt;/p&gt;
&lt;p&gt;Red is a problem you&apos;ve been told about. Build your gates so that silence is one too.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Related: &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;Don&apos;t let the agent grade its own homework&lt;/a&gt; — why &quot;done&quot; needs an independent verdict in the first place. And &lt;a href=&quot;/notes/trust-is-a-property-of-the-system/&quot;&gt;Trust is a property of the system, not the agent&lt;/a&gt; — the same argument about safety: build the check into the system instead of relying on someone to notice.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>fleet-ops</category><category>ci</category><category>verification</category></item><item><title>&apos;Ignore .env&apos; is not a defense</title><link>https://jedarden.com/notes/ignore-env-is-not-a-defense/</link><guid isPermaLink="true">https://jedarden.com/notes/ignore-env-is-not-a-defense/</guid><description>A worker once obeyed every rule about secrets and still pasted a live token into a notes file, twice, and committed it. The rule it had was a sentence in a prompt. What I run now is a stack of controls that hold even when the model doesn&apos;t — identity, scope, transport, proof, and a hook — none of them foolproof, all of them more than a wish.</description><pubDate>Sat, 29 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The worker had a rule about secrets, and it followed the rule. It was verifying a GitHub token — did the scopes cover what the task needed — and it did that correctly: fetched the token the sanctioned way, checked it, got the right answer. Then it wrote up what it had done in a markdown notes file, and in the write-up, where it meant to record &lt;em&gt;how to obtain the token&lt;/em&gt;, it recorded the token. Twice. Then it committed the file.&lt;/p&gt;
&lt;p&gt;A pre-receive hook on the git server caught it before the file reached the public mirror. That hook is the only reason this note is about a rotated credential instead of a leaked one.&lt;/p&gt;
&lt;p&gt;What matters is that the worker was not careless. It never touched a &lt;code&gt;.env&lt;/code&gt; file. It never printed a secret to the terminal on purpose. It did something more ordinary and much harder to forbid: it conflated &quot;document the token&quot; with &quot;document how to get the token,&quot; and the two sentences are one clipboard apart. Every rule I had at the time was a paragraph telling the model to be careful. The model was careful. The token went into the file anyway.&lt;/p&gt;
&lt;h2&gt;The rule was a wish&lt;/h2&gt;
&lt;p&gt;The standard defense — the one in nearly every agent setup I&apos;ve seen, and the one I had — is a line in the system prompt: &lt;em&gt;never read &lt;code&gt;.env&lt;/code&gt;; never print secrets.&lt;/em&gt; Some harnesses go further and make the file unreadable by the agent entirely. That&apos;s fine as far as it goes, and it goes about a foot.&lt;/p&gt;
&lt;p&gt;It protects one location. Secrets don&apos;t live in one location. They come back from &lt;code&gt;gh auth token&lt;/code&gt;, from a Kubernetes Secret you were told to describe, from a custom resource&apos;s &lt;code&gt;.status&lt;/code&gt;, from the environment of a process you were debugging. The agent reaches all of those legitimately, in the course of doing the job you gave it, and the instruction about &lt;code&gt;.env&lt;/code&gt; has nothing to say about any of them. The rule guards a door in a room with no walls.&lt;/p&gt;
&lt;p&gt;The deeper problem is where the damage actually happens. When an agent leaks a secret, the secret doesn&apos;t leak &lt;em&gt;from&lt;/em&gt; the store. It leaks &lt;em&gt;into&lt;/em&gt; the transcript — the command line it typed (captured in the session log, in shell history, in &lt;code&gt;ps&lt;/code&gt;), the tool output it read back, the file it wrote, the commit message, the ticket, the chat turn. Every one of those is logged, cached, and unrecallable. Once a value has been text the agent produced, it&apos;s gone, and no amount of deleting the file gets it back.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A secret isn&apos;t safe from an agent because the agent can&apos;t &lt;em&gt;read&lt;/em&gt; it. It&apos;s safe because the agent can&apos;t &lt;em&gt;say&lt;/em&gt; it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That reframe changes what you build. You stop trying to hide values from the model and start making sure that a value, on its way from wherever it lives to wherever it&apos;s needed, never passes through anything the model can see. The store isn&apos;t the thing you&apos;re protecting. The transcript is.&lt;/p&gt;
&lt;h2&gt;What I run instead&lt;/h2&gt;
&lt;p&gt;None of what follows is exotic. It&apos;s the ordinary discipline any secrets store expects of a service account, applied without exception to a very talkative kind of service account. Each layer catches a different way the wish failed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The agent has its own identity, never a borrowed one.&lt;/strong&gt; The old setup had a root token for the vault sitting in a dotfile on the agent&apos;s workstation, because that&apos;s what was there when the agent first needed access. Now the workstation agent logs in with its own AppRole and gets a token that lives an hour. Agents running inside the cluster authenticate by their Kubernetes ServiceAccount and get ten- to twenty-minute tokens. Humans come in on a completely separate path, through SSO. Compromising the human path can&apos;t mint an agent token; compromising an agent can&apos;t log in as a human. Nothing eternal exists for anyone to steal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scope is a prefix, not a role.&lt;/strong&gt; The agent&apos;s policy names exactly the path prefix it&apos;s allowed to write — its own cluster&apos;s secrets — and nothing outside it. Each automated writer in the cluster gets exactly the prefix it produces, and none of them can read what another one writes. Even the deliberately powerful superuser policy carries two explicit denials: it cannot disable the audit device, and it cannot seal the store. An identity that can switch off its own ledger voids the ledger, so that capability is carved out before anything else is granted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Values travel by pipe, &lt;code&gt;@file&lt;/code&gt;, or stdin — never as an argument.&lt;/strong&gt; This is the rule that does the most work, and it&apos;s the one that&apos;s easiest to state: a credential never appears in &lt;code&gt;argv&lt;/code&gt;. A new password is generated and stored in one line — &lt;code&gt;openssl rand -base64 32 | bao kv put secret/app/db password=-&lt;/code&gt; — and the plaintext never exists as a literal anywhere. A value that has to move between two stores goes through a single-use &lt;em&gt;wrapping token&lt;/em&gt; and a pipe: unwrap on one side, write on the other, nothing in between. When a value has to land on disk for a tool to read, it goes into a mode-600 file the agent redirects into and never &lt;code&gt;cat&lt;/code&gt;s. The login wrapper itself passes its own credentials as &lt;code&gt;@file&lt;/code&gt; so that even authenticating doesn&apos;t put a value on a command line.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Every proof is by property, never by value.&lt;/strong&gt; This is the layer that took me longest to see, because it&apos;s a restriction on the &lt;em&gt;check&lt;/em&gt;, not on the action. &quot;Confirm the write worked&quot; naturally becomes &quot;read it back and look,&quot; and reading it back is the leak. So the sanctioned proofs are all things that demonstrate the value without showing it: the secret&apos;s version counter incremented; the consumer that syncs from the store reports &lt;code&gt;Ready&lt;/code&gt;; the content hash on the delivered object is unchanged from before; a token was revoked by its &lt;em&gt;accessor&lt;/em&gt; — the handle, not the value. If a check would need to print the thing to succeed, the check is wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The rule is enforced by a hook, not a paragraph.&lt;/strong&gt; A pre-tool hook inspects every file write, every edit, and every shell command before it runs, and refuses any that carry a high-signal credential shape — a GitHub token, a Slack token, a PEM block — in &lt;em&gt;any&lt;/em&gt; file type, because the real leak went into a &lt;code&gt;.md&lt;/code&gt;. It doesn&apos;t matter whether the model thought the value was a placeholder. It matters whether it matches. The same shapes are refused on the way into git by the server-side hook that caught the original leak, so there are two independent detectors between an agent&apos;s slip and the public internet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Writes can&apos;t silently clobber each other.&lt;/strong&gt; Every write to the store carries a check-and-set version. When two agents — or an agent and a scheduled job — race on the same path, the loser gets a 400 and retries next cycle, instead of overwriting a value nobody knew had changed. This one isn&apos;t about leaks at all; it&apos;s about the other way agents make secrets unsafe, which is by quietly making them wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;There&apos;s a ledger, and the agent can&apos;t turn it off.&lt;/strong&gt; Every operation against the store is audited. When something looks wrong later, the question &quot;which identity did what, when&quot; has an answer that doesn&apos;t depend on the agent&apos;s own account of events.&lt;/p&gt;
&lt;h2&gt;What it bought&lt;/h2&gt;
&lt;p&gt;Once these held, I did something I would not have done a month earlier: I granted the agents read &lt;em&gt;and write&lt;/em&gt; access to the secrets store, as a standing policy, not a break-glass exception.&lt;/p&gt;
&lt;p&gt;Nine days later, one of them migrated the entire store. Every secret the cluster depended on moved from an old vault to a hardened one — hundreds of paths, all verified by comparing hashes on both sides. Forty-odd consumers were re-pointed at the new store in waves, each wave proven by an unchanged content hash on the delivered secrets and zero restarted pods. The old vault&apos;s root tokens were found and revoked by accessor. Peer credentials were delivered by wrapping token and pipe. The old instance was frozen, exported, and decommissioned.&lt;/p&gt;
&lt;p&gt;At no point in that entire operation did a secret value appear in the transcript. Not because the agent was told to be careful — because there was no path through which a value &lt;em&gt;could&lt;/em&gt; have appeared, and every proof of success was designed to work without one. The agent did the most sensitive job on the estate under exactly the conditions where I&apos;d have least wanted a human doing it by hand: hundreds of repetitive, high-stakes copy operations at the end of a long day.&lt;/p&gt;
&lt;h2&gt;What it doesn&apos;t do&lt;/h2&gt;
&lt;p&gt;I want to be exact about the word &lt;em&gt;safer&lt;/em&gt;, because it&apos;s the word, not &lt;em&gt;safe&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The hook fails open.&lt;/strong&gt; If it can&apos;t parse its input, it allows the call. A rule that fails closed would block the agent on every malformed edge case, and a blocked agent gets worked around. So the hook catches the common slip, and the rule still binds the agent regardless of whether the hook fires.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The hook can&apos;t see output.&lt;/strong&gt; It inspects what the agent writes and what it runs — not what comes back. An agent that greps a process&apos;s environment and reads the result has put a value in the transcript, and nothing mechanical stopped it. The defense there is the reflex: presence-check, never print. &lt;code&gt;wc -c&lt;/code&gt;, &lt;code&gt;md5sum&lt;/code&gt;, &quot;does this key exist&quot; — never the value.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Truncation is not redaction.&lt;/strong&gt; I once watched an agent avoid dumping a token by piping it through &lt;code&gt;head -c 100&lt;/code&gt;. The base64 token was 110 characters long. Nearly all of it printed. The rule needs an operator who understands &lt;em&gt;why&lt;/em&gt; it exists, because a model applying it as a ritual will find a way to satisfy the letter and lose the point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The audit ledger lives in the same trust domain as the store.&lt;/strong&gt; An attacker who owns the cluster owns the ledger. The append-only, off-site copy that would fix that is designed and not built; I looked at the cost of a locked bucket in a cloud project I don&apos;t otherwise use and decided the risk of a runaway bill outweighed the risk I was protecting against, for now. That&apos;s a real gap, and I&apos;d rather name it than let the rest of this note imply it&apos;s closed.&lt;/p&gt;
&lt;p&gt;So: not foolproof. But every one of those gaps is a &lt;em&gt;known&lt;/em&gt; gap with a known shape, which is a different situation from a sentence in a prompt and a hope.&lt;/p&gt;
&lt;h2&gt;Two scales, one rule&lt;/h2&gt;
&lt;p&gt;By hand, in an interactive session, the rule is a reflex: you type the pipe instead of the value, you ask &quot;would this check have to print the thing to pass,&quot; you catch the agent reaching for &lt;code&gt;head -c&lt;/code&gt; and explain why that isn&apos;t enough. It&apos;s the same posture as &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;refusing to let the agent grade its own homework&lt;/a&gt;, pointed at the one domain where even a &lt;em&gt;correct&lt;/em&gt; check is forbidden if it shows its work.&lt;/p&gt;
&lt;p&gt;At fleet scale, where no human is reading the transcript as it happens, the reflex has to become structure: the identity is scoped by the store, the value is refused by the hook, the proof-by-property is written into the task&apos;s acceptance criteria before the task is dispatched. Nothing about the rule changes. What changes is who — or what — is holding it.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I hand an agent anything that touches a credential, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What would the agent have to &lt;em&gt;see&lt;/em&gt; to prove this worked?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is &quot;the value,&quot; the check is wrong — and usually the task description is too. If the answer is a version number, a &lt;code&gt;Ready&lt;/code&gt; condition, a hash, an accessor, the agent can proceed, and I can stop watching. Not because I trust it to be careful. Because there&apos;s nothing on the path for it to be careless with.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/trust-is-a-property-of-the-system/&quot;&gt;Trust is a property of the system, not the agent&lt;/a&gt; — the general case: an agent doesn&apos;t need to be trusted, an action needs to be cheap to be wrong about. A leaked secret is the action that isn&apos;t, which is why it gets its own stack. And &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;Don&apos;t let the agent grade its own homework&lt;/a&gt; — independent verification, here with the extra constraint that the verifier is forbidden from looking.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Code: &lt;a href=&quot;https://github.com/jedarden/utilities/tree/agent-secrets/v0.1.0/agent-secrets&quot;&gt;utilities/agent-secrets&lt;/a&gt; — the credential-guard hook, the &lt;code&gt;bao-as&lt;/code&gt; wrapper, and the prefix-scoped policies from this note, with tests and an installer.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>safety</category><category>secrets</category><category>collaboration</category></item><item><title>Don&apos;t be the meat proxy</title><link>https://jedarden.com/notes/dont-be-the-meat-proxy/</link><guid isPermaLink="true">https://jedarden.com/notes/dont-be-the-meat-proxy/</guid><description>A meat proxy is a human acting as the cable between two systems, copy-pasting output from one into the other. Why it&apos;s the worst link in an agent workflow, and what to build instead.</description><pubDate>Mon, 17 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The agent needed to know how a page rendered on my phone. So I picked up the phone, looked at it, and typed a description into the chat. The agent asked a follow-up — was the banner above the fold or below it? I picked the phone back up. Somewhere around the third round trip I understood what my role in this system actually was: two computers were having a conversation about a rendering bug, and I was the cable.&lt;/p&gt;
&lt;p&gt;The name for this is the &lt;strong&gt;meat proxy&lt;/strong&gt;. &lt;a href=&quot;https://gruhn.me/blog/2026-08-03/&quot;&gt;Niklas Gruhn coined it&lt;/a&gt; in August 2026 for a narrower habit — answering a colleague&apos;s question by pasting an AI&apos;s reply back at them, word for word — and I&apos;m borrowing it for the general case it points at: a human operating as the transport layer between &lt;em&gt;any&lt;/em&gt; two systems that have no direct channel to each other. You copy the stack trace out of one window and paste it into another. You read a dashboard aloud into a chat box. You run the command the agent gave you and relay what it printed. Nothing about the information changes on its way through you — no judgment applied, no decision made, no bit flipped. You are moving bytes by hand between two machines that are, in most cases, already on the same network.&lt;/p&gt;
&lt;p&gt;Stated plainly, this is beyond stupid. It is also the default posture of nearly every agent workflow I see.&lt;/p&gt;
&lt;p&gt;None of this is new; it barely counts as an observation. Enterprise IT named it decades ago — &lt;em&gt;swivel-chair integration&lt;/em&gt;, a human pivoting between two terminals, re-keying what one system said into the other — and has been billing for it ever since. Sneakernet is the same job with better cardio. The most famous fix is &lt;a href=&quot;https://gist.github.com/chitchcock/1281611&quot;&gt;Amazon&apos;s service-interface mandate&lt;/a&gt;: the early-2000s edict that every team expose its data through service interfaces, no exceptions — this note&apos;s argument, enforced at company scale more than twenty years ago. The pattern keeps getting rediscovered because every new class of system ships before its channels do. Agents are just the newest system we&apos;ve defaulted to integrating by chair.&lt;/p&gt;
&lt;h2&gt;The worst network link you will ever operate&lt;/h2&gt;
&lt;p&gt;Evaluate a human as transport equipment and the spec sheet is grim:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Latency.&lt;/strong&gt; Seconds when you&apos;re at the keyboard, hours when you&apos;re not. You are the slowest hop in any pipeline you join, by three to six orders of magnitude.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lossy by design.&lt;/strong&gt; You don&apos;t relay; you summarize. You paste the part of the error that &lt;em&gt;looked&lt;/em&gt; relevant and drop the frame that mattered. A description of a screenshot is not a screenshot. Every transfer through a human is a transfer through a compressor with opinions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Error-prone.&lt;/strong&gt; Stale clipboard. Wrong window. The hand-redaction that removed one character too many. None of these failure modes announces itself — the corrupted payload arrives looking exactly like a good one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Availability.&lt;/strong&gt; You sleep eight hours. You have a job. Every transfer is synchronous with your attention, which means every transfer queues behind your entire life.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unlogged.&lt;/strong&gt; Neither system records that the transfer happened. It cannot be retried, audited, or replayed. The most important hop in the pipeline is the only one with no observability at all.&lt;/p&gt;
&lt;p&gt;If a vendor tried to sell you this link, you would laugh them out of the room. Then you&apos;d alt-tab and paste something.&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- vignette: meat-proxy --&amp;gt;&lt;/p&gt;
&lt;h2&gt;Transport is not judgment&lt;/h2&gt;
&lt;p&gt;The steelman for humans-in-the-loop is real, and I want to be precise about what this note is &lt;em&gt;not&lt;/em&gt; arguing against. A human as a &lt;strong&gt;decision point&lt;/strong&gt; is often exactly right: approving the irreversible action, reviewing the diff before merge, &lt;a href=&quot;/notes/anchor-on-a-fact-the-model-cant-see/&quot;&gt;catching the number that can&apos;t possibly be true&lt;/a&gt;. In those loops, something passes through your judgment and comes out &lt;em&gt;different&lt;/em&gt; — approved, rejected, corrected. That is the job. That is the part worth being slow for.&lt;/p&gt;
&lt;p&gt;The meat proxy is the degenerate case: information passes through your hands and comes out identical. The test is one question — &lt;strong&gt;could this transfer have been a pipe?&lt;/strong&gt; If replacing you with &lt;code&gt;cat&lt;/code&gt; would lose nothing, you weren&apos;t a decision point. You were plumbing.&lt;/p&gt;
&lt;p&gt;Friction in a system should be a decision, not an accident. Deliberate friction — the approval gate, the review step — is a control surface you designed. The meat proxy is accidental friction: a tax you pay on every single transfer, forever, because nobody spent one afternoon building the channel.&lt;/p&gt;
&lt;p&gt;And some human channels are the design rather than the accident. An air gap is a meat proxy built on purpose: the entire point is that bytes cross only through a person, slowly, visibly. A compliance attestation is transport that exists to be slow and signed — the human carrying the number &lt;em&gt;is&lt;/em&gt; the audit trail. Keeping yourself as the only path into production can be a deliberate rate limiter on what an agent can do there. Run the test and these pass it: replacing you with &lt;code&gt;cat&lt;/code&gt; would lose exactly the thing the design is for. What fails the test is only the friction nobody chose.&lt;/p&gt;
&lt;h2&gt;Build the channel once&lt;/h2&gt;
&lt;p&gt;Every direct channel in my setup exists because I got sick of one specific copy-paste loop:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The phone.&lt;/strong&gt; The rendering question that opened this note doesn&apos;t reach me anymore. The phone is on the tailnet with ADB exposed; the agent takes a screencap, reads the image itself, and taps the screen if it needs to navigate. The phone went from &quot;thing I describe&quot; to &quot;peripheral the agent operates.&quot; As a bonus it became the failover web connection — when a request fails from the server, the agent checks the URL through the phone&apos;s own network before concluding anything is down.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The clusters.&lt;/strong&gt; I used to be the person pasting &lt;code&gt;kubectl get pods&lt;/code&gt; output into a chat window. Now every cluster runs a read-only proxy the agent can query directly. When it wants pod status, it asks the cluster — the actual authority on the matter — instead of asking me to ask the cluster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Command output.&lt;/strong&gt; Commands the agent needs run now run where both of us can read the result, instead of me ferrying stdout across a window boundary one selection at a time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A real browser.&lt;/strong&gt; An old laptop on the bench keeps a live display session up; the agent screenshots it and drives a real browser when &quot;does this actually render&quot; is the question.&lt;/p&gt;
&lt;p&gt;Each of these took an afternoon or less. Each one deleted a category of copy-paste permanently. That&apos;s the whole economic argument: the meat proxy charges per transfer, forever; the channel charges once.&lt;/p&gt;
&lt;p&gt;It&apos;s worth pricing the paste honestly, because it always bills itself as cheaper than it is. A relay looks like eight seconds of copy-paste; what it actually costs is a context switch. In one &lt;a href=&quot;https://www.microsoft.com/en-us/research/wp-content/uploads/2004/01/chi2004diarystudyfinal.pdf&quot;&gt;field study of information workers&lt;/a&gt;, 40% of disrupted tasks were not resumed immediately after the interruption. Even at a skeptic&apos;s two minutes per relay, a loop that fires daily repays an afternoon of plumbing within a few months. The arithmetic only decides &lt;em&gt;when&lt;/em&gt; the channel wins, never &lt;em&gt;whether&lt;/em&gt; — per-transfer pricing always loses to a one-time build eventually, and eventually is closer than it feels. And that&apos;s only the human side of the ledger. The agent&apos;s side is wall-clock: a question that used to wait hours for my eyes — overnight, if I was asleep — is now a two-second screencap.&lt;/p&gt;
&lt;p&gt;Increasingly you don&apos;t even pay the afternoon. My channels are hand-built because my systems are homelab-shaped, but for anything SaaS-shaped the wire is being standardized out from under the problem: MCP — the Model Context Protocol — is the industry converging on exactly what this note argues for, a common plug so the ticket tracker, the mailbox, the docs, the database present themselves to the agent as a connector you install rather than a conversation you relay. Before building a bespoke channel, check whether someone already shipped it. When the afternoon collapses to ten minutes of setup, the last economic excuse for the paste goes with it.&lt;/p&gt;
&lt;h2&gt;From paste to pipe&lt;/h2&gt;
&lt;p&gt;The examples above are mine; the loops are universal. A short translation table — on the left, the paste you keep performing; on the right, the channel that deletes it:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The paste&lt;/th&gt;
&lt;th&gt;The channel&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reading a dashboard aloud&lt;/td&gt;
&lt;td&gt;A scoped read-only API token. Nearly every service you&apos;d describe to an agent ships one, and read-only scoping keeps the channel transport, not authority.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pasting the three log lines that looked relevant&lt;/td&gt;
&lt;td&gt;Query access to the log store, so the agent runs the search itself instead of receiving your compression of it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Running the query and pasting the rows&lt;/td&gt;
&lt;td&gt;A &lt;code&gt;SELECT&lt;/code&gt;-only database role, or a read replica.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forwarding the confirmation email&lt;/td&gt;
&lt;td&gt;An inbox of the agent&apos;s own, or read access to a shared one.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ferrying credentials out of the password manager&lt;/td&gt;
&lt;td&gt;A secrets store the agent queries with scoped access. The reference travels; the value never does. This is the one loop where human transport isn&apos;t just slow — it parks the payload in a chat transcript.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emailing yourself a file so you can paste it&lt;/td&gt;
&lt;td&gt;A shared drop both sides can touch: a bucket, a synced folder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reading a boot screen or a device console to the agent&lt;/td&gt;
&lt;td&gt;A KVM over IP, a serial console. Anything with a screen or a UART can be a peripheral; the phone was just the first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relaying between two agents — &quot;worker A finished, go tell B&quot;&lt;/td&gt;
&lt;td&gt;A durable work queue. At fleet scale this isn&apos;t an optimization; it&apos;s the only channel there is.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;None of these is exotic. Every one is a read-only credential, a webhook, or a queue — technology that predates agents by decades. The missing piece was never the wire; it was noticing you&apos;d become one.&lt;/p&gt;
&lt;p&gt;And for the transfers where a human genuinely must carry the message, you can at least stop being lossy. The rule: carry captures, not descriptions. The screenshot, not what the page looked like to you. The terminal recording, not the two lines that seemed relevant. The HAR file, not &quot;it felt slow.&quot; UI feedback is the classic case — &lt;a href=&quot;https://github.com/benjitaylor/agentation&quot;&gt;Agentation&lt;/a&gt; exists for exactly this: click the element and the agent gets a CSS selector and DOM context, not &quot;the card in the top right.&quot; If you must be the proxy, don&apos;t also be the compressor.&lt;/p&gt;
&lt;p&gt;There is a scale version of this, too. Interactively, the meat proxy wastes minutes. At fleet scale it is disqualifying: &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;twenty headless workers&lt;/a&gt; cannot route their I/O through my hands, so the only transfers that happen at all are the ones with a real channel. And when a needed channel is missing, a fleet doesn&apos;t wait for one — it improvises. The only channel every worker shares is the git repo itself, and I have watched 800 megabytes of database dumps land in commit history because one worker was told to hand an artifact to the next and git was the only wire they had. The mirror was down for ten hours. That wasn&apos;t the worker&apos;s failure; it was mine: an unbuilt channel doesn&apos;t mean the transfer won&apos;t happen, it means it happens over the worst wire available. Building the channel isn&apos;t an optimization on the loop — it&apos;s the precondition for taking yourself out of it.&lt;/p&gt;
&lt;h2&gt;The same bug, running backward&lt;/h2&gt;
&lt;p&gt;Everything above is the agent &lt;em&gt;pulling&lt;/em&gt;. The mirror-image loop runs the other way, with you as the interrupt controller: the build failed and you tell the agent; the alert fired and you paste it in; the deploy finished and you announce it. Same bug, opposite direction — an event occurred in one system and the news traveled by human. The fix is push: events should land where an agent will read them, or wake one on arrival.&lt;/p&gt;
&lt;p&gt;The translation table for this direction is shorter, because the fix is always one of three shapes — a webhook, a bridge, or a schedule:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The announcement&lt;/th&gt;
&lt;th&gt;The push channel&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&quot;The build failed&quot;&lt;/td&gt;
&lt;td&gt;The CI system&apos;s completion webhook, pointed somewhere an agent reads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&quot;The alert fired&quot;&lt;/td&gt;
&lt;td&gt;A bridge from the alerting stack into the agent&apos;s queue — the page should wake a responder, and the responder doesn&apos;t have to be you&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&quot;The deploy finished&quot;&lt;/td&gt;
&lt;td&gt;The pipeline&apos;s own completion hook, so the event starts the next step instead of merely informing you&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&quot;I happened to notice the dashboard looks wrong&quot;&lt;/td&gt;
&lt;td&gt;A scheduled agent that checks on a cadence — noticing becomes a job with an owner, and the owner is never asleep&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&quot;I happened to notice&quot; is not an alerting pipeline, and you should not be a load-bearing part of one.&lt;/p&gt;
&lt;h2&gt;The questions that never get asked&lt;/h2&gt;
&lt;p&gt;The setup cost is lumpy and the paste is not, which is exactly how the friction survives. Eight seconds of copy-paste never feels worth an afternoon of plumbing, so the afternoon never happens, so the eight seconds happens forever.&lt;/p&gt;
&lt;p&gt;But the pastes you perform are the visible cost, and the smaller one. When asking you is expensive, the agent economizes: it stops asking. It works blind, guesses instead of checking, and hands you output shaped by every question it didn&apos;t ask. Demand for verification is elastic, and you priced it out.&lt;/p&gt;
&lt;p&gt;You can watch the elasticity run the other way the day a channel lands. The cluster proxies get queried constantly — pod status, logs, events, dozens of checks a day that would each have been an interruption with me in the path. Almost none of those checks used to happen. The deepest return on a channel isn&apos;t the pastes it deletes; it&apos;s the checks that start occurring once they&apos;re free.&lt;/p&gt;
&lt;h2&gt;What it costs&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Channels carry authority.&lt;/strong&gt; A direct channel means the agent can do the thing without you, and that should make you think before it makes you comfortable. The answer is scoping, not abstinence: nearly every meat-proxy loop I&apos;ve replaced was read-only, so the channels are read-only — my cluster proxies mechanically &lt;em&gt;cannot&lt;/em&gt; write. Where a channel would carry write authority, that&apos;s a decision point wearing a transport costume, and the human stays. &lt;a href=&quot;/notes/trust-is-a-property-of-the-system/&quot;&gt;Trust is a property of the system&lt;/a&gt;: the fix for a scary channel is scope and reversibility, not vigilance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Channels are faithful, and that cuts both ways.&lt;/strong&gt; The one real leak I&apos;ve had didn&apos;t involve a single system misbehaving: a build step echoed a tokenized clone URL into its own log, an agent dutifully committed the log, and the mirror replicated the commit out to public GitHub — every hop doing exactly its job, every hop keeping a copy. (GitHub&apos;s secret scanner found it before I did and revoked the token on sight.) The lesson wasn&apos;t vigilance, and it wasn&apos;t fewer channels. It was that the credential should never have been on a wire as a &lt;em&gt;value&lt;/em&gt; — it travels by reference now, and becomes a value only as environment at the moment of use. Build channels freely; just remember they will transport your mistakes with the same fidelity as your intentions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sometimes the copy-paste was doing double duty.&lt;/strong&gt; Eyes on the data as it moved through you — an accidental review step. Remove the transport and you remove that too, so &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;put the review back deliberately&lt;/a&gt;, as a gate you designed, instead of a side effect of your own slowness.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;When I catch myself copying from one window and pasting into another:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Did anything here pass through my judgment, or only through my clipboard?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If it passed through judgment — a call was made, a number was checked, an action was approved — then that&apos;s the job, and it should stay mine. If it only passed through the clipboard, I just found a missing channel, and every repetition of that paste is another vote for spending the afternoon.&lt;/p&gt;
&lt;p&gt;That&apos;s the instance test. The systematic version: for one week, keep a tally of every time you copy out of one window and paste into another — what moved, where from, where to. Change nothing else. At the end of the week the tally is your channel backlog, pre-sorted by frequency, and the top line is what next weekend&apos;s afternoon is for.&lt;/p&gt;
&lt;p&gt;The systems can talk to each other. They are usually on the same network. The only reason you&apos;re carrying the message is that nobody built the wire — and you&apos;re the only component in the whole pipeline that can fix that.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;h2&gt;Quick answers&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What is a meat proxy?&lt;/strong&gt; A human acting as the transport layer between two systems that have no direct channel: copying output out of one and pasting it into the other, or relaying what one says to the other, with no judgment applied on the way through. Enterprise IT&apos;s older name for it is swivel-chair integration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where does the term come from?&lt;/strong&gt; &lt;a href=&quot;https://gruhn.me/blog/2026-08-03/&quot;&gt;Niklas Gruhn&apos;s essay &quot;Don&apos;t be a meat proxy&quot;&lt;/a&gt; (August 3, 2026) named the person who forwards a question to an AI and forwards the answer back, unread, to whoever asked. This note takes the same name to the general case: a human relaying between any two systems, agent workflows included. Both senses fail the same test — nothing passed through judgment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How do I tell if I&apos;m being one?&lt;/strong&gt; Ask whether the transfer could have been a pipe. If replacing you with &lt;code&gt;cat&lt;/code&gt; would lose nothing, you weren&apos;t a decision point — you were transport.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Isn&apos;t keeping a human in the loop a good thing?&lt;/strong&gt; As a decision point, yes: approving the irreversible action, reviewing the diff, catching the number that can&apos;t be true. Transport through a human isn&apos;t oversight; it&apos;s latency, loss, and no log. Deliberate human channels — an air gap, a signed attestation — pass the test, because the slowness is the point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How do I stop?&lt;/strong&gt; Tally a week of copy-pastes, then build the most frequent one as a direct channel, read-only wherever you can. The paste costs you every time; the channel costs you once.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Related: &lt;a href=&quot;/notes/trust-is-a-property-of-the-system/&quot;&gt;Trust is a property of the system, not the agent&lt;/a&gt; — why the fix for a scary channel is scoping and reversibility, not vigilance. And &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;Don&apos;t let the agent grade its own homework&lt;/a&gt; — the review step you must re-add on purpose once you stop being the wire.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>collaboration</category><category>friction</category></item><item><title>CI on Rackspace Spot: an Argo Workflows alternative to GitHub Actions for about $0.01/hr</title><link>https://jedarden.com/guides/ci-on-rackspace-spot/</link><guid isPermaLink="true">https://jedarden.com/guides/ci-on-rackspace-spot/</guid><description>GitHub Actions spent nearly nine hours degraded on August 6, 2026 — the sixth incident in six days. Here&apos;s the pattern I run instead: Argo Workflows + Argo Events on a Rackspace Spot cluster, with an on-demand fallback pool so preemption never fails a build.</description><pubDate>Thu, 06 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;GitHub Actions spent nearly nine hours degraded on August 6, 2026 — delayed
and failed workflow runs, errors on the Actions API, and job success rates
as low as 30–40% at the worst of it. The incident opened at 15:22 UTC, was
mitigated at 00:05 the next day, and wasn&apos;t declared resolved until 02:04 —
almost eleven hours end to end. (An earlier version of this post said &quot;about
five hours&quot;; it was written while the incident was still open, and the
incident outlasted the estimate.)
It wasn&apos;t an outlier: GitHub logged 26 incidents in April, 23 in May, 23 in
June, and six more in the first six days of August alone. Self-hosted
runners don&apos;t save you here, either — the orchestration layer that queues
and dispatches runs is still GitHub&apos;s, so a control-plane incident stalls
self-hosted runners exactly like it stalls hosted ones.&lt;/p&gt;
&lt;p&gt;None of that makes GitHub Actions bad software. It makes it a single point
of failure you don&apos;t control, for a job — running your tests and builds —
that has no hard dependency on any one vendor. This guide is the pattern I
actually run: &lt;a href=&quot;https://argoproj.github.io/workflows/&quot;&gt;Argo Workflows&lt;/a&gt; for
the CI jobs themselves, &lt;a href=&quot;https://argoproj.github.io/events/&quot;&gt;Argo Events&lt;/a&gt;
to receive the webhooks, on a &lt;a href=&quot;https://spot.rackspace.com&quot;&gt;Rackspace Spot&lt;/a&gt;
Kubernetes cluster priced by open auction — cents per hour, not fractions of
a cent per minute. The build that turns this article into the page you&apos;re
reading runs through the same kind of pipeline.&lt;/p&gt;
&lt;p&gt;This isn&apos;t a drop-in replacement. You lose the Marketplace Actions
ecosystem and GitHub&apos;s hosted UI; you gain a system nothing outside your
own cluster can take down, at a small fraction of the per-minute cost. Read
the caveats at the bottom before you commit to it.&lt;/p&gt;
&lt;h2&gt;What you&apos;ll need&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A working Rackspace Spot cloudspace with a long-lived kubeconfig. If you
don&apos;t have one yet, &lt;a href=&quot;/guides/rackspace-spot-devpod/&quot;&gt;the previous guide&lt;/a&gt;
covers account setup, region/bid selection, and the two first-boot fixes
every new cloudspace needs (Calico&apos;s node-IP autodetection, and the
Docker Hub anonymous-pull throttle) — both bite CI nodes just as hard as
dev-environment nodes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl&lt;/code&gt; installed locally&lt;/li&gt;
&lt;li&gt;A git host that can send webhooks on push (GitHub, GitLab, Forgejo/Gitea
all work identically here — this guide uses GitHub&apos;s payload shape, but
Argo Events&apos; generic webhook source doesn&apos;t care which one you point at
it)&lt;/li&gt;
&lt;li&gt;A container registry to push images to (Docker Hub, GHCR, your own — any
registry your bid class can reach)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Part 1 — Install Argo Workflows and Argo Events&lt;/h2&gt;
&lt;p&gt;Both are plain Kubernetes controllers — no dependency on a specific cloud,
which is the point.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl create namespace argo-workflows
kubectl apply -n argo-workflows -f \
  https://github.com/argoproj/argo-workflows/releases/latest/download/install.yaml

kubectl create namespace argo-events
kubectl apply -n argo-events -f \
  https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml
kubectl apply -n argo-events -f \
  https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/native-event-bus-install.yaml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm both sets of pods reach &lt;code&gt;Running&lt;/code&gt; before continuing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl get pods -n argo-workflows
kubectl get pods -n argo-events
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If a pod sits &lt;code&gt;ImagePullBackOff&lt;/code&gt; on a fresh node, that&apos;s the Docker Hub
anonymous-pull throttle from the previous guide — it hits system images on
every newly created Spot node, not just your own. Fix the registry secret
before debugging anything else.&lt;/p&gt;
&lt;h2&gt;Part 2 — The WorkflowTemplate is the CI job&lt;/h2&gt;
&lt;p&gt;A &lt;code&gt;WorkflowTemplate&lt;/code&gt; is the reusable definition; the git-triggered &lt;code&gt;Workflow&lt;/code&gt;
that runs on every push just references it. The whole chain, end to end, is
six pieces:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Rootless image builds inside
Kubernetes normally mean &lt;a href=&quot;https://github.com/GoogleContainerTools/kaniko&quot;&gt;Kaniko&lt;/a&gt;
or &lt;a href=&quot;https://github.com/moby/buildkit&quot;&gt;Buildkit&lt;/a&gt; rather than Docker-in-Docker
— Kaniko needs no privileged pod, which matters on a shared cluster:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: container-build
  namespace: argo-workflows
spec:
  entrypoint: build
  arguments:
    parameters:
      - name: repo-url
      - name: revision
      - name: image
  templates:
    - name: build
      inputs:
        parameters:
          - name: repo-url
          - name: revision
          - name: image
      initContainers:
        - name: clone
          image: alpine/git:2.45.2
          command: [sh, -c]
          args:
            - &quot;git clone {{inputs.parameters.repo-url}} /work &amp;amp;&amp;amp; \
               git -C /work checkout {{inputs.parameters.revision}}&quot;
          volumeMounts:
            - name: workdir
              mountPath: /work
      container:
        image: gcr.io/kaniko-project/executor:latest
        args:
          - --context=/work
          - --destination={{inputs.parameters.image}}:{{inputs.parameters.revision}}
        volumeMounts:
          - name: workdir
            mountPath: /work
          - name: docker-config
            mountPath: /kaniko/.docker
      volumes:
        - name: workdir
          emptyDir: {}
        - name: docker-config
          secret:
            secretName: registry-credentials
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Two things that aren&apos;t obvious until they cost you an afternoon:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The controller&apos;s default &lt;code&gt;podGC&lt;/code&gt; is &lt;code&gt;OnPodCompletion&lt;/code&gt;&lt;/strong&gt; — the pod
disappears the instant the job finishes, success or failure. If you&apos;re
debugging a failing build, stream its logs while it&apos;s still running
(&lt;code&gt;kubectl logs -f &amp;lt;pod&amp;gt; -n argo-workflows&lt;/code&gt;) or submit a one-off debug
Workflow with &lt;code&gt;podGC: {strategy: OnWorkflowCompletion}&lt;/code&gt; to keep evidence
around.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A generic multi-repo template beats one template per repo.&lt;/strong&gt; Once you
have more than two or three repos building the same way, parameterize
&lt;code&gt;repo-url&lt;/code&gt;/&lt;code&gt;image&lt;/code&gt; (as above) and pass different values per Workflow rather
than copy-pasting the template. Detecting &lt;em&gt;which&lt;/em&gt; subdirectory changed in a
monorepo is a &lt;code&gt;git diff --name-only&lt;/code&gt; in an init container, not a special
Argo feature.&lt;/p&gt;
&lt;h2&gt;Part 3 — Wire up the webhook with Argo Events&lt;/h2&gt;
&lt;p&gt;An &lt;code&gt;EventSource&lt;/code&gt; exposes an HTTP endpoint and validates the webhook; a
&lt;code&gt;Sensor&lt;/code&gt; watches for events on it and submits the Workflow.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
  name: github
  namespace: argo-events
spec:
  service:
    ports:
      - port: 12000
        targetPort: 12000
  webhook:
    push:
      port: &quot;12000&quot;
      endpoint: /push
      method: POST
---
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: github-push
  namespace: argo-events
spec:
  dependencies:
    - name: push-dep
      eventSourceName: github
      eventName: push
  triggers:
    - template:
        name: submit-build
        argoWorkflow:
          operation: submit
          source:
            resource:
              apiVersion: argoproj.io/v1alpha1
              kind: Workflow
              metadata:
                generateName: container-build-
                namespace: argo-workflows
              spec:
                workflowTemplateRef:
                  name: container-build
                arguments:
                  parameters:
                    - name: repo-url
                      value: &quot;https://github.com/your-org/your-repo&quot;
                    - name: revision
                      value: &quot;main&quot;
                    - name: image
                      value: &quot;your-registry/your-repo&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expose the EventSource&apos;s Service through whatever ingress you already run —
don&apos;t hand it a public IP with nothing in front of it. At minimum, put your
git host&apos;s webhook secret in Argo Events&apos; HMAC validation
(&lt;code&gt;spec.webhook.push.filter&lt;/code&gt; / the source&apos;s &lt;code&gt;secureChannel&lt;/code&gt; config in newer
versions) so the endpoint rejects anything that isn&apos;t actually signed by
your git host.&lt;/p&gt;
&lt;h2&gt;Part 4 — Preemption: retry on Spot, fall back to on-demand&lt;/h2&gt;
&lt;p&gt;This is spot capacity: when the auction price rises above your bid, the
node — and any pod on it — is gone with no warning. For a CI job, that&apos;s
a build failure that had nothing to do with your code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bid at the p80 percentile, not the current market price.&lt;/strong&gt; The
&lt;a href=&quot;/spot-pricing/&quot;&gt;live pricing table&lt;/a&gt; shows p20/p50/p80 for every server
class: a standing bid at p80 would have kept a node through roughly 80% of
its recent sampling window. Bidding exactly today&apos;s market price wins the
node right now and gets preempted at the next uptick.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;As of July 2026, new bids floor at $0.01/hr, rounded to fixed steps&lt;/strong&gt; —
$0.01 increments up to $0.04/hr, $0.02 up to $0.10/hr, $0.03 up to $0.20/hr,
$0.05 above that (&lt;a href=&quot;https://spot.rackspace.com/docs/changelog&quot;&gt;Rackspace&apos;s changelog&lt;/a&gt;
has the exact table). That&apos;s a floor on what you can newly &lt;em&gt;bid&lt;/em&gt;, not on
what you &lt;em&gt;pay&lt;/em&gt;: a bid placed before the change that sits below $0.01/hr
keeps running unchanged, so the market-clearing price on any given class can
still land below a cent — you just can&apos;t be the one placing a new bid down
there anymore. If your target percentile comes back under $0.01/hr, round up
to $0.01/hr or the nearest step above it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let Argo retry on spot first — it&apos;s usually enough:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;spec:
  retryStrategy:
    limit: &quot;2&quot;
    retryPolicy: OnError
  nodeSelector:
    pool: spot
  tolerations:
    - key: pool
      operator: Equal
      value: spot
      effect: NoSchedule
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;For anything that can&apos;t tolerate a retry-and-wait — a release build with
a deadline — add a second on-demand node pool and a second WorkflowTemplate
(or a &lt;code&gt;priorityClassName&lt;/code&gt;) that targets it instead of spot.&lt;/strong&gt; Rackspace
Spot&apos;s on-demand tier prices well above the auction floor, which is exactly
why it works as a fallback: it&apos;s expensive enough that almost nothing runs
on it, so it&apos;s rarely the thing being preempted, and cheap enough relative
to what a missed release costs that eating the difference on the rare
critical build is a non-decision. Point your release pipeline&apos;s Workflow at
the on-demand pool by nodeSelector the same way the spot pool is targeted
above.&lt;/p&gt;
&lt;h2&gt;Cost, roughly&lt;/h2&gt;
&lt;p&gt;GitHub-hosted Linux 2-core runners bill overage minutes at &lt;strong&gt;$0.006/min&lt;/strong&gt;
(~$0.36/hr), per GitHub&apos;s published pricing as observed on August 8, 2026.
Rackspace Spot&apos;s
comparable class — a 2 vCPU / 3.75 GB general-purpose node — has a
&lt;strong&gt;$0.01/hr minimum new bid&lt;/strong&gt; as of Rackspace&apos;s July 2026 pricing change
(see the caveat below), still roughly 36× cheaper than the GitHub rate. The
&lt;a href=&quot;/spot-pricing/&quot;&gt;pricing table&lt;/a&gt; will show you today&apos;s actual market-clearing
price for your region, which can sit below that minimum on capacity held by
bids placed before the change.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That&apos;s not an apples-to-apples comparison and I won&apos;t pretend it is:
GitHub&apos;s minutes buy you zero ops, a UI, log retention, and the Marketplace
Actions ecosystem. What you&apos;re paying for on the Spot side is the
infrastructure this guide just walked through, and you maintain it. The
comparison is only fair once you count your own time — but if you&apos;re
already running a Spot cluster for other reasons (as in
&lt;a href=&quot;/guides/rackspace-spot-devpod/&quot;&gt;the DevPod guide&lt;/a&gt;), the marginal cost of
routing CI through the same cluster is close to free.&lt;/p&gt;
&lt;h2&gt;Caveats worth knowing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;This is not a GitHub Actions clone.&lt;/strong&gt; There&apos;s no Marketplace, no
reusable Actions ecosystem, no hosted log UI out of the box (Argo
Workflows ships its own UI, which is not the same thing). You&apos;re writing
containers, not YAML &lt;code&gt;uses:&lt;/code&gt; steps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rackspace doesn&apos;t publish how deep the spot pool is at any price.&lt;/strong&gt;
The auction price is your only signal — there&apos;s no API or console view
that shows &quot;N nodes available.&quot; Bid at a percentile you&apos;re comfortable
with and let preemption handling (Part 4) absorb the rest, rather than
trying to reason about capacity you can&apos;t observe.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The $0.01/hr minimum bid is new capacity only.&lt;/strong&gt; Rackspace changed this
in July 2026 (see &lt;a href=&quot;https://spot.rackspace.com/docs/changelog&quot;&gt;the changelog&lt;/a&gt;);
existing bids below $0.01/hr keep running untouched, so don&apos;t be surprised
if the &lt;a href=&quot;/spot-pricing/&quot;&gt;pricing table&lt;/a&gt; shows a market-clearing price under
a cent even though you can&apos;t place a new bid there. As of this writing,
Rackspace&apos;s own &lt;code&gt;/pricing&lt;/code&gt; marketing page still advertises &quot;bid from
$0.001/hr&quot; and hasn&apos;t caught up to its own changelog — trust the changelog,
not the marketing copy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The 429 Docker Hub trap recurs on every fresh CI node&lt;/strong&gt;, exactly as it
does for dev environments — a node that Kaniko or your init container
can&apos;t pull system images onto is almost always this, not a cluster
problem.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify webhook signatures.&lt;/strong&gt; An EventSource endpoint with no secret
validation will happily submit Workflows for anyone who finds the URL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prices move.&lt;/strong&gt; Everything above reflects Rackspace&apos;s published feed and
GitHub&apos;s published pricing at the time this was written — confirm both
before committing a budget to either.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>kubernetes</category><category>rackspace-spot</category><category>argo-workflows</category><category>ci-cd</category></item><item><title>Trust is a property of the system, not the agent</title><link>https://jedarden.com/notes/trust-is-a-property-of-the-system/</link><guid isPermaLink="true">https://jedarden.com/notes/trust-is-a-property-of-the-system/</guid><description>A near-miss with a git flag once put three volumes of real data one sync cycle from deletion — caught by luck, not by design. The right fix wasn&apos;t more vigilance. It was building the trust into the system itself: an agent doesn&apos;t need to be trusted, an action needs to be cheap to undo.</description><pubDate>Sun, 26 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;On 2026-07-18 I was decommissioning a deployment and wanted to keep three volumes of real historical data alive underneath it — carved out of the manifest before the rest of it went away. I split the file, staged the new one with &lt;code&gt;git add -N&lt;/code&gt; so I could review the diff before committing to it, then committed it in the same motion I&apos;d used a dozen times before. &lt;code&gt;git status&lt;/code&gt; showed the file as added, both before the commit and after. Every visible signal said the data was safe.&lt;/p&gt;
&lt;p&gt;It wasn&apos;t. &lt;code&gt;-N&lt;/code&gt; marks a path as tracked; it does not stage its content. The commit shipped an empty file — zero bytes, valid YAML, containing nothing. The sync controller took the diff at face value: the three volumes were no longer declared anywhere, so they were no longer wanted, so it queued them for deletion. Nothing in the tooling was wrong. I had, with total precision, told it to throw away data I meant to keep.&lt;/p&gt;
&lt;p&gt;I caught it one step before the deletion actually ran, by re-checking the committed file&apos;s line count against the working tree&apos;s. If I&apos;d looked four minutes later, or not looked at all, three volumes of real data would be gone, and the only reason it isn&apos;t is that I happened to check. That&apos;s not a safety net. That&apos;s luck, wearing a safety net&apos;s clothes.&lt;/p&gt;
&lt;h2&gt;Trust is a property of the system, not the agent&lt;/h2&gt;
&lt;p&gt;The instinct after a near-miss like that is to conclude the fix is &lt;em&gt;more attention&lt;/em&gt; — read the diff more carefully next time, be warier of &lt;code&gt;-N&lt;/code&gt;, don&apos;t get complacent. That instinct is exactly backwards, and it&apos;s worth being precise about why, because it&apos;s the same instinct that shapes most conversations about how much autonomy to give an agent: trust it more, trust it less, review its output more closely, calibrate your confidence up or down. All of that treats trust as a property of &lt;em&gt;judgment&lt;/em&gt; — mine or the agent&apos;s — exercised correctly in the moment it matters.&lt;/p&gt;
&lt;p&gt;My vigilance is not a system property. It doesn&apos;t scale, it doesn&apos;t run at 2 a.m., it doesn&apos;t survive the twentieth review of the day. What would actually have saved those three volumes wasn&apos;t a sharper eye — it was a rule that never needed my eye in the first place.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Trust isn&apos;t a measure of how good an agent&apos;s judgment is. It&apos;s a measure of how cheap it is to be wrong.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you frame it that way, the live question stops being &quot;how much do I trust this agent&quot; and becomes &quot;what does it cost me if this specific action is wrong&quot; — and the second question has an answer you can build into the system, instead of a feeling you have to keep maintaining in your own head every time an agent reaches for something.&lt;/p&gt;
&lt;h2&gt;Three tiers, one test&lt;/h2&gt;
&lt;p&gt;The test that actually matters is: &lt;strong&gt;if this action turns out to be wrong, what does undo look like, and does it already exist?&lt;/strong&gt; Run every class of change an agent might make through that test and it sorts into three tiers, not two.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Code changes.&lt;/strong&gt; The undo already exists by construction — it&apos;s called version control. A wrong edit costs one &lt;code&gt;git revert&lt;/code&gt;. Because the floor is unconditionally solid here, an agent gets full autonomy: it can open files, restructure functions, delete whole modules, and none of it needs a human in the loop first, because none of it can actually cost anything.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live infrastructure, routed through the same mechanism.&lt;/strong&gt; This is the tier people get wrong most often, because &quot;production&quot; &lt;em&gt;sounds&lt;/em&gt; like it should default to more caution than code. But if every change to a live system also goes through version control — a manifest committed to a repo, reconciled into the running system by a controller that will happily put it back the way it was — then a live environment is exactly as reversible as code is. The controller becomes a second safety net underneath the first: even a change applied by hand gets silently reverted back to what the repo says, because the repo, not the moment, is the source of truth. An agent can operate here too, with the same confidence, for the same reason.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;True one-way actions.&lt;/strong&gt; Nothing rescues these, because there is no &quot;undo&quot; to construct — the action&apos;s effect leaves the system entirely. Sending a message. Charging a card. Force-pushing over history other machines have already built on. For this tier, and only this tier, a human has to own the call before it happens, because no amount of system design converts a one-way door into a two-way one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Nearly everything an agent does in a working session — writing code, restructuring a repo, reconciling a live deployment — lives in the first two tiers. The third tier is real, but it&apos;s much smaller than it feels, and most of what people lump into it because it &lt;em&gt;sounds&lt;/em&gt; irreversible actually isn&apos;t.&lt;/p&gt;
&lt;h2&gt;Deletion is the easy case&lt;/h2&gt;
&lt;p&gt;Deletion is the textbook example of something that looks like tier three and is almost always tier two. The three volumes in my near-miss weren&apos;t actually one bad &lt;code&gt;git commit&lt;/code&gt; away from being unrecoverable — they were one &lt;em&gt;missing backup&lt;/em&gt; away from it. The fix for the near-miss was never &quot;review diffs harder.&quot; It was: nothing gets deleted without a copy existing first, full stop, made mechanically, not as a judgment call in the moment.&lt;/p&gt;
&lt;p&gt;That&apos;s the whole trick, and it&apos;s almost insultingly simple once you say it out loud: back up, then delete. If the deletion turns out to be wrong, you don&apos;t debug it, you don&apos;t reconstruct it by hand, you restore the copy and move on. The action was irreversible for about the length of time it takes to run a backup command, and reversible forever after.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is what actually earns an agent the right to delete something on its own. Not a judgment that the agent is trustworthy enough, not a review step where a human eyeballs the command first — a mechanical guarantee that a copy exists before the delete runs. The permission comes from the guarantee, not from confidence in whoever&apos;s finger is on the trigger.&lt;/p&gt;
&lt;h2&gt;Where backup-based reversibility hits a ceiling&lt;/h2&gt;
&lt;p&gt;It would be tidy if &quot;back up first&quot; dissolved the whole tier-three category, but it doesn&apos;t, and the place it stops working is worth naming exactly: force-pushing over history other machines have already pulled and built on.&lt;/p&gt;
&lt;p&gt;A force-push looks like deletion — old commits vanish from the branch — so the backup instinct says: keep a copy of the old ref, push away, restore from the copy if it goes wrong. But the thing that actually breaks isn&apos;t recoverable from &lt;em&gt;your&lt;/em&gt; copy, because the damage doesn&apos;t happen to your repository. It happens to every other clone that has already based work on the history you just erased. Their next pull either silently diverges or drags your rewritten history in and corrupts what they built on top of it. Your backup makes &lt;em&gt;you&lt;/em&gt; whole. It does nothing for them.&lt;/p&gt;
&lt;p&gt;That&apos;s the real dividing line for tier three, and it&apos;s sharper than &quot;can this be undone&quot;: &lt;strong&gt;can the person doing the action alone also do the entire undo alone?&lt;/strong&gt; Deleting a file, dropping a database table, deleting a cloud volume — one party creates the mess, and that same party, with a backup in hand, cleans it up completely. A force-push spreads the damage to parties who never agreed to bear it and can&apos;t fix it from where they&apos;re sitting. When the blast radius crosses that boundary, no backup converts it back to tier two, and it stays a human&apos;s call — which is exactly why it&apos;s banned outright rather than allowed-with-a-backup.&lt;/p&gt;
&lt;h2&gt;A backup existing isn&apos;t the same as a backup you can trust&lt;/h2&gt;
&lt;p&gt;There&apos;s one more failure mode, quieter than the other two, and I only found it by nearly getting bitten by it: a backup job can exist, run on schedule, and still not be the safety net it looks like. I once found a nightly &lt;code&gt;restic&lt;/code&gt; backup running three times concurrently — no lock file, no guard against overlap — driving load high enough to look like an unrelated outage. The backups were technically completing. Nobody had checked whether they&apos;d actually restore cleanly, or whether the three overlapping runs were racing each other into a corrupted snapshot.&lt;/p&gt;
&lt;p&gt;The presence of &lt;em&gt;a&lt;/em&gt; backup script is not the same claim as &quot;this delete is reversible.&quot; A trustworthy backup is current, it doesn&apos;t race itself, and — the part that&apos;s easiest to skip — someone has actually restored from it at least once, not just confirmed the job exits zero. Treating &quot;there&apos;s a backup somewhere&quot; as equivalent to &quot;this is tier two&quot; is how a near-miss like the one that opened this note turns into an actual loss the next time nobody happens to be watching. The guarantee has to be real, not assumed.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I let an agent take an action with any real weight behind it, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If this turns out to be wrong, what&apos;s the undo — and does it already exist, or does it need to be built first?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is &quot;version control already covers it,&quot; the agent proceeds without me. If the answer is &quot;a backup makes it reversible,&quot; the backup runs first, verified, every time, mechanically — and then the agent proceeds. If the answer is &quot;nothing rescues this, and the blast radius reaches past me,&quot; it waits for a human, no matter how good the agent&apos;s judgment looked five minutes ago. I stopped asking myself how much I trust the agent. I built the system so the question doesn&apos;t need an answer.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/ending-is-better-than-mending/&quot;&gt;Ending is better than mending&lt;/a&gt; — the same cheap-undo logic applied to agent output, not agent actions. And &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;Deterministic state machines for non-deterministic agents&lt;/a&gt; — predictable failure as the other half of the same foundation.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>safety</category></item><item><title>What breaks when you run twenty agents at once</title><link>https://jedarden.com/notes/what-breaks-at-twenty-agents/</link><guid isPermaLink="true">https://jedarden.com/notes/what-breaks-at-twenty-agents/</guid><description>A failure taxonomy from a year of running coding-agent fleets unattended. Eight ways a fleet dies, none of which involve the model — and the operational discipline they add up to.</description><pubDate>Wed, 22 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I run about twenty coding agents concurrently — headless workers pulling tasks from a shared queue, unattended, around the clock. I have written before about &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;why they are cattle, not pets&lt;/a&gt;, and about &lt;a href=&quot;/notes/unit-economics-of-cattle/&quot;&gt;what a closed task actually costs&lt;/a&gt;. This note is about the third thing you learn, the one nobody&apos;s demo will show you: how fleets fail.&lt;/p&gt;
&lt;p&gt;Everything below actually happened. Fifteen workers stranded by a deploy. Seven work queues wiped by a repair tool. Twenty-two repos polluted by a test run. An entire fleet&apos;s sessions gone in one second. None of it is hypothetical, and — this is the part worth the price of admission — &lt;strong&gt;none of it was the model&apos;s fault.&lt;/strong&gt; In a year of fleet failures, the LLM barely appears in the incident log. The agent does its job. What fails is everything you stood up around it.&lt;/p&gt;
&lt;p&gt;When you run one agent, failure means &quot;the agent did the wrong thing.&quot; When you run twenty, failure changes species. It moves out of the model and into the seams: the launch path, the queue, the deploy process, the host, the data layer, the test suite, your own tooling. Those seams are where this taxonomy lives.&lt;/p&gt;
&lt;p&gt;Eight failure modes. For each one: what it looked like from the operator&apos;s seat, what actually caused it, and the operational rule it taught. Each of these deserves — and will get — a full postmortem of its own. This is the map.&lt;/p&gt;
&lt;h2&gt;1. The fleet you launch is not the fleet you get&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: construction-kill --&amp;gt;&lt;/p&gt;
&lt;p&gt;The symptom is silence. You launch the fleet, go do something else, and come back to find fewer workers than you started. No errors. No crash logs. No death messages. Workers that simply never existed — you count the sessions and the number is wrong.&lt;/p&gt;
&lt;p&gt;The cause is that &lt;strong&gt;construction is the most expensive moment in a worker&apos;s life&lt;/strong&gt;, and it happens before any of your failure handling exists. A worker booting up initializes its session, loads repo state, spins up its agent harness — all CPU-hungry, all at once. Launch twenty workers simultaneously and the machine saturates precisely at the moment every worker is at its most fragile. The late ones starve during construction and die silently, because the state-machine loop that would have noticed a failure and handled it &lt;em&gt;hasn&apos;t started yet&lt;/em&gt;. All of my orchestration — outcome classification, retries, timeouts — protects the loop. Nothing protected the birth.&lt;/p&gt;
&lt;p&gt;This one is insidious because the failure is invisible by construction. A worker that dies mid-task leaves a claimed bead, a session, evidence. A worker that dies being born leaves nothing. Your monitoring says the fleet is healthy because the fleet — the one that survived — is healthy. You are not operating the fleet you think you launched.&lt;/p&gt;
&lt;p&gt;The rule: &lt;strong&gt;stagger launches, and treat launch itself as load.&lt;/strong&gt; Fleet bring-up is not an instant; it is a schedulable workload with a resource profile steeper than steady-state operation. NEEDLE launches now ramp with deliberate delays between workers, and bring-up is the one phase I still watch. The general principle generalizes past agents: any system whose failure handling lives inside the main loop has an unprotected window before the loop starts. Know how wide yours is.&lt;/p&gt;
&lt;h2&gt;2. The bead that never stops failing&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: death-loop --&amp;gt;&lt;/p&gt;
&lt;p&gt;The queue&apos;s contract is simple: failed tasks go back in the queue. That contract has a degenerate case, and the degenerate case runs a space heater made of tokens.&lt;/p&gt;
&lt;p&gt;Some tasks do not fail because of bad luck. They fail because they &lt;em&gt;cannot succeed&lt;/em&gt; — the task is too big for one context window, the acceptance criteria contradict the repo&apos;s reality, the premise was wrong when it was written. Re-queue one of those and the fleet forms an orderly line to burn money. A worker claims it, works earnestly, fails, re-queues it. The next worker claims it. All night. Every attempt costs a full agent run — real tokens, real minutes — and an unattended fleet will pay that cost with perfect patience until you wake up and read the ledger.&lt;/p&gt;
&lt;p&gt;The cause is an epistemological gap: &lt;strong&gt;the queue cannot tell a transient failure from an impossible task.&lt;/strong&gt; Retry is a strategy only when failure is temporary. The queue does not know that. You have to teach it.&lt;/p&gt;
&lt;p&gt;The fix has two halves. First, a circuit breaker: failure counters on every task, and after N failed attempts the task is fenced — moved to a blocked state a worker cannot claim, waiting for a human or a triage pass. Second, and less obviously: the tasks most likely to loop are the big umbrella ones, so &lt;strong&gt;split umbrellas into small beads and block the umbrella on its children.&lt;/strong&gt; Small tasks fail transiently; sprawling tasks fail structurally. Task granularity turns out to be a &lt;em&gt;reliability&lt;/em&gt; parameter, not just a planning preference.&lt;/p&gt;
&lt;p&gt;The rule: an unattended fleet needs an explicit answer to &quot;when do we stop trying?&quot; — because the default answer is &lt;em&gt;never&lt;/em&gt;, and never is expensive.&lt;/p&gt;
&lt;h2&gt;3. The deploy that stranded fifteen workers&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: stranded-deploy --&amp;gt;&lt;/p&gt;
&lt;p&gt;I shipped a new orchestrator build the lazy way: moved the fresh binary over the path the fleet spawns from. Fifteen running workers detached on the spot. Still running. Still holding claims. Still spending money. No longer mine.&lt;/p&gt;
&lt;p&gt;Here is the mechanism. Workers re-invoke the orchestrator binary through its path as they cycle. Replace the file at that path and you have not &quot;upgraded&quot; the running workers — you have changed the world underneath them. The processes that were mid-flight kept running the old code with nothing supervising them; a zombie herd, invisible to the new orchestrator, grazing on the same queue. The cleanup was manual: hunt down every stranded session, reconcile every orphaned claim, apologize to the ledger.&lt;/p&gt;
&lt;p&gt;The embarrassing part is that I would never do this to a production service. Rolling deploys, drain-then-replace, immutable artifacts — I know the liturgy. But the fleet did not &lt;em&gt;feel&lt;/em&gt; like production. It felt like my tooling, on my box, so it got the &lt;code&gt;mv&lt;/code&gt; treatment. That instinct — the fleet is casual infrastructure — is the actual root cause, and it recurs in half the failures in this taxonomy.&lt;/p&gt;
&lt;p&gt;The rule: &lt;strong&gt;deploy to the fleet the way the fleet deploys to prod.&lt;/strong&gt; There is exactly one designated stable path that live workers reference, replacements land there atomically, and a running fleet gets stopped — drained, claims released — before the binary it re-executes changes underneath it. Never mutate the live spawn path. The fleet is production. It always was; the only question is how expensive the lesson is on the day you learn it.&lt;/p&gt;
&lt;h2&gt;4. The night the substrate died&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: substrate-oom --&amp;gt;&lt;/p&gt;
&lt;p&gt;Every session vanished at once. Twenty-some workers, the monitoring panes, everything — gone between one glance and the next. My first theory was a mass kill: something OOM-killed the workers. Wrong, and the wrongness is the lesson. The workers did not die. &lt;strong&gt;The thing they all lived inside died.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The fleet ran as tmux sessions, and tmux has a property that is easy to know and hard to &lt;em&gt;feel&lt;/em&gt;: every session on the socket is hosted by one server process. That server had been quietly accumulating memory for weeks. When the kernel finally OOM-killed it, it took every session with it — not worker by worker, but all at once, one process death fanning out into total fleet loss. My orchestration had an answer for every way a &lt;em&gt;worker&lt;/em&gt; could die. It had no concept of the layer below the workers dying, because I had never written that layer down as a dependency.&lt;/p&gt;
&lt;p&gt;Worse, the obvious response — reboot the box — is the wrong one. It destroys the evidence and everything else that &lt;em&gt;was&lt;/em&gt; still alive, to fix a problem one &lt;code&gt;systemd&lt;/code&gt; unit could prevent.&lt;/p&gt;
&lt;p&gt;The rule: &lt;strong&gt;inventory the processes your whole fleet transitively lives inside, and govern their resources explicitly.&lt;/strong&gt; For me that meant the tmux server gets a systemd &lt;code&gt;MemoryHigh&lt;/code&gt; ceiling of 48G so memory pressure throttles it long before the OOM killer arrives. But the checklist matters more than the fix: the terminal multiplexer, the SSH daemon, the container runtime, the DNS resolver — any of them is a single point of failure standing under your whole herd. You cannot circuit-break your way around a dead host process. Find your substrate before it finds you.&lt;/p&gt;
&lt;h2&gt;5. The repair that ate the queue&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: repair-wipe --&amp;gt;&lt;/p&gt;
&lt;p&gt;The work queue underneath my fleet keeps state in two places: a live SQLite database, and a JSONL checkpoint file that gets written on explicit flush. The database is the truth; the checkpoint is a snapshot of the truth as of the last flush. The queue&apos;s repair tool rebuilds the database &lt;em&gt;from&lt;/em&gt; the checkpoint.&lt;/p&gt;
&lt;p&gt;You can see it coming. One afternoon, chasing corruption, I ran repair across my workspaces — without flushing first. The tool did exactly what it was designed to do: rebuilt each database from its checkpoint, discarding everything created since. Seven workspaces out of seven, every unflushed task gone. Not corrupted — &lt;em&gt;cleanly, correctly deleted&lt;/em&gt; by a tool doing its job well.&lt;/p&gt;
&lt;p&gt;The cause is an authority-model confusion, and it is endemic to any system with a live store and a backup: &lt;strong&gt;the moment you treat the checkpoint as the truth, every recovery action becomes a rollback.&lt;/strong&gt; Nothing in the tool&apos;s name said so. &quot;Repair&quot; sounds conservative. It was actually &quot;restore,&quot; and restore is destructive in the direction nobody thinks about — forward.&lt;/p&gt;
&lt;p&gt;The rule comes in layers. Know, for every stateful system in the fleet, which copy is authoritative — and write it down where the 2 a.m. version of you will see it. Sequence every recovery as &lt;em&gt;checkpoint first, rebuild second&lt;/em&gt;; in my case that is a flush before any repair, in that order, always. And push the guard into the tool itself: the upstream fix ships repair that refuses to run against unflushed state. Habits protected by tooling survive; habits protected by memory last until the afternoon you are tired.&lt;/p&gt;
&lt;h2&gt;6. The test run that lied to twenty-two repos&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: test-pollution --&amp;gt;&lt;/p&gt;
&lt;p&gt;The dispatch pipeline needed end-to-end tests — real workers claiming real tasks and reporting real outcomes, because anything less mocks away the exact seams this taxonomy says are dangerous. The tests worked beautifully. They exercised claiming, assignment, completion, the whole loop.&lt;/p&gt;
&lt;p&gt;They exercised it against &lt;strong&gt;production state&lt;/strong&gt;. The test harness discovered workspaces the same way real workers do, and it dutifully sprayed synthetic claims across twenty-two of the twenty-nine live workspaces on the machine. Fake assignees on real tasks. Fabricated completion claims on work nobody did. And the cleanup was worse than the mess: the tooling&apos;s own validation — sensible rules for normal operation — rejected parts of the undo, because &quot;blank out this assignee&quot; is not a thing the CLI believed anyone should legitimately want.&lt;/p&gt;
&lt;p&gt;The failure is easy to caricature as a missing test fixture, but the real cause is structural. In an agent fleet, the test traffic &lt;em&gt;is&lt;/em&gt; agent traffic — same tools, same stores, same discovery paths. There is no natural fence between &quot;testing the fleet&quot; and &quot;operating the fleet&quot; unless you build one, and nothing in the stack builds it for you. Meanwhile the blast radius of unfenced tests scales with exactly the thing you are proudest of: how much your automation can reach.&lt;/p&gt;
&lt;p&gt;The rule: &lt;strong&gt;fencing test state is a fleet feature, not a test-suite nicety.&lt;/strong&gt; Test runs get their own stores, their own workspace roots, their own discovery scope — enforced by the infrastructure, not by the test author remembering a flag. And your tooling needs an admin path to undo what automation did, because one day the thing that needs reverting will be something validation swears is impossible.&lt;/p&gt;
&lt;h2&gt;7. The claims that leak&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: leaked-claims --&amp;gt;&lt;/p&gt;
&lt;p&gt;This one is slow, which makes it the most dangerous entry in the taxonomy. Nothing crashes. Nothing pages. The fleet just gets gradually, mysteriously idle.&lt;/p&gt;
&lt;p&gt;The mechanism: a worker claims a task, marks it in-progress, and then dies — construction kill, OOM, a harness crash, any of the deaths above. The claim survives the claimant. That task is now in limbo: not done, so the work is missing; not available, so no other worker can take it. One leaked claim is noise. But an unattended fleet manufactures dead workers at a steady rate, and each death can pin a task. Over days the ready pool quietly drains until you have a queue that &lt;em&gt;looks&lt;/em&gt; full and a fleet with nothing it is allowed to do — starvation with a healthy-looking dashboard.&lt;/p&gt;
&lt;p&gt;The tempting fix is a janitor: some external process that sweeps for stale in-progress tasks and releases them. The trap is that &quot;stale&quot; is a guess. Sweep too aggressively and you release a claim whose worker is alive and mid-task — now two workers hold one bead and you have manufactured the exact double-write the atomic claim existed to prevent.&lt;/p&gt;
&lt;p&gt;The rule: &lt;strong&gt;reclamation must live inside the worker loop, governed by the same claim discipline as everything else.&lt;/strong&gt; In NEEDLE this is the mend pass — a live worker, under the queue&apos;s own concurrency rules, is the only thing allowed to adjudicate a stale claim and re-queue the task. Paired with a one-loop-per-bead invariant — no agent ever spans multiple tasks, no task ever has ambiguous ownership — leases stay decidable. Dead workers are normal. Immortal claims are the bug.&lt;/p&gt;
&lt;h2&gt;8. Friendly fire from the janitor&lt;/h2&gt;
&lt;p&gt;&amp;lt;!-- vignette: janitor-fire --&amp;gt;&lt;/p&gt;
&lt;p&gt;The most dangerous command in my fleet was the one that sounded safest. &lt;code&gt;cleanup&lt;/code&gt; — the housekeeping tool that tidies up dead worker sessions. Run it casually, as the name invites you to, and it would SIGHUP &lt;em&gt;live&lt;/em&gt; workers mid-task. The tool could not reliably tell a dead session from a working one, and it resolved its uncertainty in the worst possible direction: kill.&lt;/p&gt;
&lt;p&gt;The precise irony: the janitor exists because of failure mode 7 — dead workers leave debris, debris needs sweeping. The remedy for one fleet pathology became a pathology. And unlike the others in this taxonomy, this one has a human trigger. Nothing about the fleet has to be wrong; the operator just has to run the reassuringly-named command at the wrong moment. I now treat it the way I treat &lt;code&gt;--force&lt;/code&gt; flags: a thing whose invocation is itself an incident risk.&lt;/p&gt;
&lt;p&gt;Two rules, one technical and one linguistic. Technical: &lt;strong&gt;any tool that acts on sessions must prove liveness before acting&lt;/strong&gt; — a positive signal that this session is dead, not an absence-of-evidence heuristic. In fleet terms, the janitor needs the same discipline as the mend pass: destructive action only on affirmatively-verified corpses. Linguistic: &lt;strong&gt;name destructive tools like what they are.&lt;/strong&gt; &quot;Cleanup&quot; invites casual use; a name that says &lt;em&gt;this kills sessions&lt;/em&gt; buys you the two seconds of hesitation that would have saved my afternoon. Your fleet&apos;s command-line surface is part of its safety model, because the operator is part of the system — and at 2 a.m., the operator is the least reliable component in it.&lt;/p&gt;
&lt;h2&gt;The pattern behind the pattern&lt;/h2&gt;
&lt;p&gt;Read the taxonomy again and notice who is missing: the model. Eight fleet-killing failure modes and not one of them is &quot;the LLM wrote bad code.&quot; The agent — the part everyone debates, benchmarks, and blogs about — is the component that held up.&lt;/p&gt;
&lt;p&gt;Every failure lives at a seam. Fleet↔host: the construction kill, the substrate OOM. Fleet↔queue: the death loop, the leaked claims. Fleet↔deploy: the stranded workers. Fleet↔data: the repair wipe. Fleet↔test: the pollution. Fleet↔operator: the janitor. And every fix is almost embarrassingly boring — stagger the launches, count the failures, fence the state, order the flush before the rebuild, cap the memory, lease the claims, verify liveness before killing. No prompt engineering. No model selection. Ops discipline, applied one level up the stack than we are used to applying it.&lt;/p&gt;
&lt;p&gt;This is the shape of the whole discipline: &lt;strong&gt;the agent is the easy part.&lt;/strong&gt; We spent fifteen years learning that running software reliably is a different profession from writing it — that is why SRE exists. Agent fleets are re-running that history at fast-forward. Everyone is hiring for the software engineering; the outages come from the operations.&lt;/p&gt;
&lt;h2&gt;Naming the discipline&lt;/h2&gt;
&lt;p&gt;There is agent &lt;em&gt;building&lt;/em&gt; — prompts, tools, harnesses, evals. It has books, courses, and a job title. Then there is the thing this note is actually about: keeping a herd of agents alive, honest, and economical, unattended, for months. Launch policy, queue semantics, deploy discipline, substrate governance, state authority, test fencing, claim leases, operator safety. That thing does not have a name yet.&lt;/p&gt;
&lt;p&gt;I have started calling it &lt;strong&gt;agent fleet operations&lt;/strong&gt;, and I think it becomes a real discipline on a predictable schedule: every team currently celebrating their first autonomous agent is somewhere on the road to their own version of this taxonomy. One agent is a program. Twenty agents are a production system, with a production system&apos;s failure surface — plus a few failure modes that are genuinely new, because the workers spend money, fabricate state when tested carelessly, and die at rates no human team does.&lt;/p&gt;
&lt;p&gt;Each of the eight modes above gets its own full postmortem — timeline, diagnosis, the fix&apos;s actual design — as a follow-up note. Consider this the index. If you are building toward your own fleet: I hope the taxonomy costs you less than it cost me to write.&lt;/p&gt;
&lt;h2&gt;Since publication: three more ways a fleet stops&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Added 2026-10-28.&lt;/em&gt; The taxonomy above was written in July. Three months of running the same fleet added three modes that none of the eight cover. Each is a seam, and each fix is just as boring as the others. I am leaving the numbering alone; these are appendices until they earn a postmortem of their own.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. The pause that nobody could clear.&lt;/strong&gt; A worker closed a task, staged the queue&apos;s checkpoint files in git, and never committed them. The orchestrator has a guard for exactly that state: when the checkpoint is not fully committed, it pauses claiming in that workspace so no worker builds on a store that git does not yet hold. Correct guard, no exit. The next worker booted, found the pause, and reported itself idle. Its background repair pass retried the same operation about 1,150 times in 70 minutes, failing on the same message every time, and escalated to no one. A whole workspace of ready work sat behind one uncommitted file for a morning until a human read the log. The rule: &lt;strong&gt;a pause is not a failure, so do not retry it.&lt;/strong&gt; A guard that halts work must name who clears it and say so somewhere a person will see, or it is mode 2 wearing a safety vest. The fix was one commit and one line in the repo&apos;s agent instructions: commit the checkpoint after every close.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. The proposal flood.&lt;/strong&gt; Give the fleet a generator that turns observations into proposed tasks, and it will do what generators do. Mine was configured for five proposals per run with a day&apos;s cooldown; a counter was bypassed, and it produced roughly 1,200 a day. By late October the estate held about 7,500 tasks, of which one was claimable. The governor that sizes the fleet reads demand as &quot;ready tasks,&quot; so from where it sat the estate was nearly empty, while every human-facing list showed thousands of items. Nothing crashed; the queue was simply full of things nobody had decided to do. Triage by hand was out of the question at that volume, so the fix, still landing as I write this, is a rule, not a review: proposals stay held until a policy admits them, duplicates collapse on creation, a generator that proposes against a repo with no planned work proposes nothing, and the cap is enforced fleet-wide and across restarts. The rule: &lt;strong&gt;generated work is not demand.&lt;/strong&gt; Count only what a person or a policy has admitted, and cap the producer before you ever need to triage its output.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11. The gate nothing could satisfy.&lt;/strong&gt; A pre-receive secret scan on the git host is the right thing to have in front of a fleet that writes to its own repos all night. Mine began refusing pushes for two reasons that were not secrets: prose in task notes that looked like a credential pattern, and a push whose new blob bytes exceeded the scanner&apos;s own budget. One repo fell 247 commits behind its remote before anyone noticed, because the workers kept committing locally and the failure was in a layer none of them watched. The detectors were switched off on October 3 while a redaction primitive was built, and stayed off for about two weeks, because the only alternative was hand-editing a task store that must never be hand-edited. The rule: &lt;strong&gt;ship the eraser before the detector.&lt;/strong&gt; A gate that blocks on findings nobody can remove is a gate the operator will turn off, and an off gate protects nothing. Every detector needs a sanctioned way to clear a finding, and a false positive is a design input, not a nuisance.&lt;/p&gt;
&lt;p&gt;Three more seams: fleet↔git, fleet↔planning, fleet↔gate. Same lesson as before. The model is still absent from the incident log.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;The fleet in this note runs on &lt;a href=&quot;https://github.com/jedarden/NEEDLE&quot;&gt;NEEDLE&lt;/a&gt; (Rust orchestrator: deterministic worker state machine, agent-agnostic harness adapters), with a SQLite-backed bead queue as the shared work queue (bead-forge when the first eight incidents happened; its successor, &lt;a href=&quot;https://github.com/jedarden/bead-rs&quot;&gt;bead-rs&lt;/a&gt;, since August), &lt;a href=&quot;https://github.com/jedarden/subscription-quota-governor&quot;&gt;subscription-quota-governor&lt;/a&gt; sizing the fleet against each provider&apos;s subscription quota (it replaced &lt;a href=&quot;https://github.com/jedarden/claude-governor&quot;&gt;claude-governor&lt;/a&gt; in October 2026), and &lt;a href=&quot;https://github.com/jedarden/ccdash&quot;&gt;ccdash&lt;/a&gt; for herd health. Every incident above shaped a feature in one of them.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>NEEDLE</category><category>fleet-ops</category></item><item><title>Rackspace Spot from zero: a spot-priced Kubernetes cluster with a DevPod dev environment</title><link>https://jedarden.com/guides/rackspace-spot-devpod/</link><guid isPermaLink="true">https://jedarden.com/guides/rackspace-spot-devpod/</guid><description>Onboard to Rackspace Spot&apos;s auction-priced Kubernetes, dodge the four traps every new cloudspace hits, and stand up a devcontainer-based dev environment with DevPod — for as little as $0.01/hr.</description><pubDate>Wed, 08 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Rackspace Spot sells surplus data-center capacity as managed Kubernetes clusters,
priced by open auction. As of a &lt;a href=&quot;https://spot.rackspace.com/docs/changelog&quot;&gt;July 2026 pricing change&lt;/a&gt;,
new bids floor at &lt;strong&gt;$0.01 per hour&lt;/strong&gt; — about $7.30 a month for a node at the
floor, which in the less-contested regions you usually get close to. (Bids
placed before that change keep running below $0.01/hr, so don&apos;t be surprised
if the &lt;a href=&quot;/spot-pricing/&quot;&gt;live pricing table&lt;/a&gt; shows a market-clearing price under
a cent even though you can no longer place a new bid there.) Either way, it&apos;s
the cheapest way I know of to run a real, persistent Kubernetes cluster — and
a remote dev environment on top of it.&lt;/p&gt;
&lt;p&gt;This guide gets you from no account to a working &lt;a href=&quot;https://containers.dev/&quot;&gt;devcontainer&lt;/a&gt;
dev environment served by &lt;a href=&quot;https://devpod.sh/&quot;&gt;DevPod&lt;/a&gt;, including the handful of
sharp edges that aren&apos;t in Rackspace&apos;s docs. Everything here comes from running
several Spot clusters in production for over a year; the pitfalls are ones I hit
for real.&lt;/p&gt;
&lt;h2&gt;What you&apos;ll need&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubectl&lt;/code&gt; installed locally&lt;/li&gt;
&lt;li&gt;A Docker Hub account (free) — you&apos;ll need a personal access token to dodge a
rate-limit trap explained below&lt;/li&gt;
&lt;li&gt;Optionally, a repo with a &lt;code&gt;devcontainer.json&lt;/code&gt; you want to develop in&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Part 1 — A working Spot cluster&lt;/h2&gt;
&lt;h3&gt;1. Sign up and create a cloudspace&lt;/h3&gt;
&lt;p&gt;Create an account at &lt;a href=&quot;https://spot.rackspace.com&quot;&gt;spot.rackspace.com&lt;/a&gt;, then
create a &lt;strong&gt;cloudspace&lt;/strong&gt; — Rackspace&apos;s name for a managed Kubernetes cluster. The
control plane is free on the standard tier; you pay only for the nodes you bid on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Region choice matters more than anything else on your bill.&lt;/strong&gt; Auction prices
vary a lot between regions: the US regions around Ashburn (IAD) and Chicago (ORD)
have historically had classes sitting at or near the bid floor for long
stretches, while others clear meaningfully higher. Check the
&lt;a href=&quot;/spot-pricing/&quot;&gt;live pricing table&lt;/a&gt; before you pick — it reads Rackspace&apos;s
public pricing feed and shows the current market price plus percentiles for every
server class in every region.&lt;/p&gt;
&lt;h3&gt;2. Add a spot node pool — and bid with the percentiles&lt;/h3&gt;
&lt;p&gt;Add a node pool to your cloudspace. Two decisions here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Server class.&lt;/strong&gt; A general-purpose class (e.g. &lt;code&gt;gp.vs1.medium&lt;/code&gt; in your chosen
region — 4 vCPU / 8 GB) is plenty for a dev environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bid price.&lt;/strong&gt; Your bid is the &lt;em&gt;maximum&lt;/em&gt; you&apos;ll pay; you&apos;re charged the current
market price as long as it&apos;s at or below your bid. When the market rises above
your bid, your node is preempted. The &lt;a href=&quot;/spot-pricing/&quot;&gt;pricing table&lt;/a&gt; shows
p20/p50/p80 percentiles for each class: bidding at the p80 level would have
kept your node through roughly 80% of the recent window. Bidding exactly the
current market price wins now and gets preempted at the next uptick. Since
July 2026, new bids also round to fixed steps with a $0.01/hr floor — $0.01
increments up to $0.04/hr, $0.02 up to $0.10/hr, $0.03 up to $0.20/hr, $0.05
above that (&lt;a href=&quot;https://spot.rackspace.com/docs/changelog&quot;&gt;changelog&lt;/a&gt;). If your
target percentile is below $0.01/hr, round up to $0.01/hr or the nearest
step above it — you can&apos;t place a new bid lower than that anymore.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Stick to spot pools. On-demand pools exist but cost many times more, which
defeats the reason to be here.&lt;/p&gt;
&lt;h3&gt;3. Download the kubeconfig — then immediately make a better one&lt;/h3&gt;
&lt;p&gt;The kubeconfig you download from the console authenticates with an OIDC token
that &lt;strong&gt;expires after about three days&lt;/strong&gt;. It&apos;s fine for bootstrap work, but
anything unattended (CI, a dev-environment launcher, monitoring) will mysteriously
lose access mid-week.&lt;/p&gt;
&lt;p&gt;Mint a long-lived ServiceAccount credential right away:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export KUBECONFIG=~/Downloads/your-cloudspace.yaml

kubectl create serviceaccount admin-sa -n kube-system
kubectl create clusterrolebinding admin-sa \
  --clusterrole=cluster-admin \
  --serviceaccount=kube-system:admin-sa
kubectl create token admin-sa -n kube-system --duration=8760h
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Build a kubeconfig around that token (same cluster/server block, swap the &lt;code&gt;user&lt;/code&gt;
for &lt;code&gt;token: &amp;lt;output&amp;gt;&lt;/code&gt;), keep it somewhere safe, and use it for everything from
here on. Scope it down from &lt;code&gt;cluster-admin&lt;/code&gt; later if you keep the cluster around.&lt;/p&gt;
&lt;h3&gt;4. Two first-boot fixes every new cloudspace needs&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Calico picks the wrong node IP.&lt;/strong&gt; Spot&apos;s Calico ships with &lt;code&gt;firstFound&lt;/code&gt;
autodetection, which on these nodes grabs an unreachable interface — symptoms
range from flaky pod networking to nodes that never go Ready. Point it at the
node&apos;s real InternalIP:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl patch installation default --type=merge \
  -p &apos;{&quot;spec&quot;:{&quot;calicoNetwork&quot;:{&quot;nodeAddressAutodetectionV4&quot;:{&quot;kubernetes&quot;:&quot;NodeInternalIP&quot;}}}}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Anonymous Docker Hub pulls get throttled.&lt;/strong&gt; Spot nodes share NAT egress
addresses with other tenants, so Docker Hub&apos;s anonymous rate limit
(HTTP 429) is effectively always exhausted. This can break anything pulling from
&lt;code&gt;docker.io&lt;/code&gt; — I&apos;ve seen it take down CNI and CSI images after a node was
recreated, leaving the node NotReady. Create an authenticated pull secret in each
namespace you deploy to, using a Docker Hub personal access token:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl create namespace devpod
kubectl create secret docker-registry docker-hub-registry -n devpod \
  --docker-username=&amp;lt;your-dockerhub-user&amp;gt; \
  --docker-password=&amp;lt;your-dockerhub-PAT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reference it from your pods&apos; &lt;code&gt;imagePullSecrets&lt;/code&gt; — or, for DevPod below, it gets
picked up automatically.&lt;/p&gt;
&lt;h3&gt;5. Storage: decide sizes up front&lt;/h3&gt;
&lt;p&gt;Spot&apos;s storage is OpenStack Cinder. Two rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Always set &lt;code&gt;storageClassName&lt;/code&gt; explicitly&lt;/strong&gt; on every PVC. The default class
varies by cluster, and on Spot the &lt;code&gt;sata&lt;/code&gt; class (or &lt;code&gt;sata-large&lt;/code&gt; for volumes
over ~100 GB) is the one you want.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volumes cannot be expanded.&lt;/strong&gt; The API returns a 403 on resize — a PVC&apos;s size
is a lifetime decision. Size generously; at these prices a too-big volume
costs cents.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Part 2 — The dev environment, with DevPod&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://devpod.sh/&quot;&gt;DevPod&lt;/a&gt; is a client-side, open-source tool that creates dev
environments from &lt;code&gt;devcontainer.json&lt;/code&gt; on any backend — including a bare
Kubernetes cluster. Nothing to install in the cluster ahead of time: each
workspace is a pod plus a PVC, created on demand, and DevPod&apos;s &lt;em&gt;dockerless&lt;/em&gt; mode
builds the devcontainer image &lt;strong&gt;inside the cluster&lt;/strong&gt;, so you don&apos;t need Docker
locally or a registry.&lt;/p&gt;
&lt;h3&gt;6. Install the CLI&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;curl -L -o devpod &quot;https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64&quot; \
  &amp;amp;&amp;amp; sudo install -c -m 0755 devpod /usr/local/bin &amp;amp;&amp;amp; rm -f devpod
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(There&apos;s also a desktop app, and builds for macOS/Windows — see
&lt;a href=&quot;https://devpod.sh/&quot;&gt;devpod.sh&lt;/a&gt;.)&lt;/p&gt;
&lt;h3&gt;7. Configure the Kubernetes provider once&lt;/h3&gt;
&lt;p&gt;This is where every Spot lesson from Part 1 gets encoded as a default:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;devpod provider add kubernetes
devpod provider set-options kubernetes \
  -o KUBERNETES_CONFIG=$HOME/.kube/spot.kubeconfig \
  -o KUBERNETES_NAMESPACE=devpod \
  -o STORAGE_CLASS=sata \
  -o DISK_SIZE=30Gi \
  -o PVC_ACCESS_MODE=RWO \
  -o INACTIVITY_TIMEOUT=2h
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Why each option matters here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;KUBERNETES_CONFIG&lt;/code&gt; — the long-lived kubeconfig from step 3, not the 3-day one.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;STORAGE_CLASS=sata&lt;/code&gt; — otherwise DevPod uses the cluster default, which may not
be the class you want (step 5).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DISK_SIZE=30Gi&lt;/code&gt; — this PVC is your workspace&apos;s persistent home &lt;strong&gt;and it can
never be expanded&lt;/strong&gt;. Pick a size you won&apos;t outgrow.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;INACTIVITY_TIMEOUT=2h&lt;/code&gt; — auto-stops idle workspace pods. The PVC (your work)
stays; the pod (the compute) goes away until the next &lt;code&gt;devpod up&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Pull secrets: the provider&apos;s &lt;code&gt;KUBERNETES_PULL_SECRETS_ENABLED&lt;/code&gt; defaults to
&lt;code&gt;true&lt;/code&gt;, so the &lt;code&gt;docker-hub-registry&lt;/code&gt; secret from step 4 protects workspace
image pulls from the 429 trap automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;8. Launch&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;devpod up github.com/your-org/your-repo --provider kubernetes --ide vscode
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;DevPod creates the PVC and workspace pod, builds the devcontainer in-cluster,
and opens VS Code connected through a tunnel — no ingress, no load balancer, no
public exposure of the cluster. Prefer a terminal?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;devpod up github.com/your-org/your-repo --provider kubernetes --ide none
devpod ssh your-repo
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;9. Living with preemption&lt;/h3&gt;
&lt;p&gt;This is spot capacity: when the market price rises above your bid, the node goes
away. What that actually means for a DevPod workspace:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;pod dies, the PVC survives&lt;/strong&gt; — your checked-out code, build caches, and
home directory are all on the volume.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;devpod up &amp;lt;workspace&amp;gt;&lt;/code&gt; re-provisions onto whatever node your bid wins next,
usually within a couple of minutes of capacity returning.&lt;/li&gt;
&lt;li&gt;Anything running unattended (long builds, servers) dies with the pod. Treat
the workspace like a laptop that can run out of battery: commit and push often.&lt;/li&gt;
&lt;li&gt;Bidding at the p80 percentile (step 2) makes this rare — at the floor-priced
classes, preemptions can be weeks apart.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Caveats worth knowing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The 429 trap recurs.&lt;/strong&gt; Every time Spot recreates a node, that node pulls its
system images through the shared NAT. If a fresh node sits NotReady, check for
&lt;code&gt;ImagePullBackOff&lt;/code&gt; on CNI/CSI pods before suspecting anything else.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prices move.&lt;/strong&gt; The &lt;a href=&quot;/spot-pricing/&quot;&gt;pricing table&lt;/a&gt; is a snapshot of
Rackspace&apos;s published feed with the fetch time shown — always confirm in the
console before changing a bid.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The $0.01/hr minimum bid is new capacity only.&lt;/strong&gt; Rackspace changed this in
July 2026 (see &lt;a href=&quot;https://spot.rackspace.com/docs/changelog&quot;&gt;the changelog&lt;/a&gt;);
bids placed before then keep running below $0.01/hr untouched, so the
pricing table can show a market-clearing price under a cent even though you
can&apos;t place a new bid there. As of this writing, Rackspace&apos;s own &lt;code&gt;/pricing&lt;/code&gt;
marketing page still advertises &quot;bid from $0.001/hr&quot; and hasn&apos;t caught up to
its own changelog — trust the changelog, not the marketing copy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DevPod&apos;s Kubernetes provider needs write access&lt;/strong&gt; to one namespace. The
ServiceAccount options (&lt;code&gt;SERVICE_ACCOUNT&lt;/code&gt;, &lt;code&gt;CLUSTER_ROLE&lt;/code&gt;) let you tighten this
once you&apos;re past the bootstrap stage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check your node pool type occasionally.&lt;/strong&gt; Only spot pools; if an on-demand
pool ever appears (e.g. from console experimentation), delete it — it bills at
a completely different rate.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>kubernetes</category><category>rackspace-spot</category><category>devpod</category><category>remote-development</category></item><item><title>The agentic coding ladder is a list of things you give up</title><link>https://jedarden.com/notes/agentic-coding-ladder/</link><guid isPermaLink="true">https://jedarden.com/notes/agentic-coding-ladder/</guid><description>Steve Yegge&apos;s eight levels read the climb by how much you trust the AI. Here&apos;s a complementary lens on the same ascent: measure it by what you give up at each rung — which is why some people skip rungs entirely, having no old coding habits to undo. It starts with the search bar, climbs through your code, your presence and your judgment, and ends at a wall.</description><pubDate>Sat, 23 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Steve Yegge has a framework I keep coming back to: &lt;a href=&quot;https://steve-yegge.medium.com/the-future-of-coding-agents-e9451a84207c&quot;&gt;eight levels of AI-assisted development&lt;/a&gt;, from &quot;no AI&quot; up to &quot;build your own orchestrator.&quot; It reads the climb by &lt;em&gt;trust&lt;/em&gt; — how much of the machine&apos;s output you&apos;ll accept without looking. Permissions on, permissions off, stop reading diffs, abandon the IDE, run a fleet. It&apos;s a genuinely good way to find where you stand, and I&apos;m not trying to replace it.&lt;/p&gt;
&lt;p&gt;What follows is a second instrument pointed at the same mountain. Climbing those levels myself, I kept noticing a quieter move underneath the growing trust: a renunciation. To climb a rung I had to give up something I&apos;d treated as my job — not just trust the machine more, but &lt;em&gt;do less of the thing I was proud of&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So this measures the same ascent off a different dial. Not &quot;how much do you trust it.&quot; &lt;strong&gt;What have you given up.&lt;/strong&gt; Both readings are true; I&apos;ve just found the second one tells me more about the person doing the climbing.&lt;/p&gt;
&lt;p&gt;The first thing you give up is the search bar.&lt;/p&gt;
&lt;h2&gt;How the ladder is shaped&lt;/h2&gt;
&lt;p&gt;There are three parts and three thresholds. I wrote this with two, and the third one found me.&lt;/p&gt;
&lt;p&gt;In the first part, the thing that grows is &lt;strong&gt;the size of the unit you hand off&lt;/strong&gt;. A snippet, then a function, then a file, then a whole application. You&apos;re still writing — you&apos;re just writing less of the code and more of the intent. The first threshold is where that bottoms out: &lt;strong&gt;you stop writing code at all.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the second part, the axis flips. You&apos;ve run out of bigger pieces of code to delegate, so what grows instead is &lt;strong&gt;your distance from the work&lt;/strong&gt;. More sessions, then too many sessions, then sessions you don&apos;t sit in. The second threshold is the one I&apos;ve spent years on: &lt;strong&gt;the agent stops being able to ask you anything.&lt;/strong&gt; A live CLI is a conversation — it hits ambiguity, asks, you answer (and when the answer is something you had to go fetch from another system, you were being &lt;a href=&quot;/notes/dont-be-the-meat-proxy/&quot;&gt;the meat proxy&lt;/a&gt;). Headless is a dispatch — it hits ambiguity and must resolve it alone or fail, because you are gone. That crossing is the same line I&apos;ve called &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;pets versus cattle&lt;/a&gt;. It&apos;s where everything I build now lives.&lt;/p&gt;
&lt;p&gt;In the third part the axis flips again. You&apos;ve run out of distance to add — you&apos;re already gone. What grows instead is &lt;strong&gt;the size of the judgment you hand off.&lt;/strong&gt; Which work gets done, then what counts as done, then what the rules are. You&apos;re still deciding; you&apos;re just deciding less often and about bigger things, until the third threshold: &lt;strong&gt;you stop deciding, and start measuring.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;The first half — you give up the code&lt;/h2&gt;
&lt;p&gt;Each rung below shows the avatar with the thing it just gave up faded and struck through beside it — the picture &lt;em&gt;is&lt;/em&gt; the renunciation. Read down until the crossed-out object is the last thing you actually stopped reaching for.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;1 · The Student&lt;/strong&gt; — &lt;em&gt;&quot;I ask it to explain the error, but I&apos;d never paste its code in unread.&quot;&lt;/em&gt; Gave up: Google / Stack Overflow.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;2 · The Borrower&lt;/strong&gt; — &lt;em&gt;&quot;I paste in its snippets, but I assemble the program.&quot;&lt;/em&gt; Gave up: writing boilerplate by hand.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;3 · The Reviewer&lt;/strong&gt; — &lt;em&gt;&quot;It writes functions in my codebase, but I read every diff before it lands.&quot;&lt;/em&gt; Gave up: being the author.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;4 · The Delegator&lt;/strong&gt; — &lt;em&gt;&quot;I let it write a whole file and I test the output instead of reading every line.&quot;&lt;/em&gt; Gave up: reading every line.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;5 · The Director&lt;/strong&gt; — &lt;em&gt;&quot;I write the spec; I judge the app by whether it runs, not by how it&apos;s built.&quot;&lt;/em&gt; Gave up: knowing how my own code works inside.&lt;/p&gt;
&lt;p&gt;Rung 3 is where most working developers actually are, and it&apos;s a genuinely good place to be — but notice what you surrendered to get there. You stopped being the person who wrote the function. You became the person who &lt;em&gt;approves&lt;/em&gt; it. That&apos;s not a small thing; it&apos;s the first time the code in your repo wasn&apos;t authored by you. Rung 4 surrenders the diff itself: you stop reading lines and start testing outputs. By rung 5 you&apos;ve handed off whole applications, and the only honest way to do that is to &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;put your thinking into the plan up front&lt;/a&gt; — because once it&apos;s a whole app, you can&apos;t steer line by line, and when the result is wrong, &lt;a href=&quot;/notes/ending-is-better-than-mending/&quot;&gt;the cheapest fix is to throw it away and re-run, not to repair it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Threshold 1 — you stop writing code.&lt;/strong&gt; Above this line there is no smaller unit to hand off. You are no longer producing code at any granularity. So the ladder has to start measuring something else.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;The second half — you give up your presence&lt;/h2&gt;
&lt;p&gt;
&lt;strong&gt;6 · The Juggler&lt;/strong&gt; — &lt;em&gt;&quot;I&apos;ve got two or three sessions going and I bounce between them; I let them recover instead of fixing by hand.&quot;&lt;/em&gt; Gave up: undivided focus.&lt;/p&gt;
&lt;p&gt;Rung 6 is where the surrender stops being technical and starts being uncomfortable. You give up undivided focus — you accept that you&apos;ll never again give one task your whole head — and you start &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;letting agents course-correct instead of correcting them yourself&lt;/a&gt;. That &quot;self-healing&quot; people talk about isn&apos;t a feature that emerges; it&apos;s the thing you&apos;re &lt;em&gt;forced&lt;/em&gt; to build the moment you stop being available to fix every wrong turn.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;7 · The Bottleneck&lt;/strong&gt; — &lt;em&gt;&quot;I&apos;m losing track of which session is doing what. I&apos;m the constraint now — not the model.&quot;&lt;/em&gt; Gave up: the belief that attention scales.&lt;/p&gt;
&lt;p&gt;Rung 7 is not really a capability. It&apos;s a wall. It&apos;s the day you realize you are the slowest component in your own system — that adding another session doesn&apos;t add throughput, it adds the cost of context-switching into your own skull. Everyone I know who runs agents seriously remembers hitting this. It feels like drowning. And it is the entire reason rung 8 exists.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Threshold 2 — the conversation becomes a dispatch.&lt;/strong&gt; This is the crossing. You stop opening sessions and start launching jobs. The agent can no longer reach you, which means it can no longer ask you the question that used to save it. Every discipline I care about lives on this side of the line &lt;em&gt;because&lt;/em&gt; you removed yourself as the answer: &lt;a href=&quot;/notes/anchor-on-a-fact-the-model-cant-see/&quot;&gt;anchoring the work on a fact the model can&apos;t see&lt;/a&gt;, &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;never letting the agent grade its own homework&lt;/a&gt;, and &lt;a href=&quot;/notes/unit-economics-of-cattle/&quot;&gt;making the unit economics work when nobody&apos;s watching the meter&lt;/a&gt;. None of those are optional up here. They&apos;re the prosthetics that replace the human you just amputated from the loop.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;strong&gt;8 · The Dispatcher&lt;/strong&gt; — &lt;em&gt;&quot;I kick off runs I don&apos;t sit in and read the log after — they can&apos;t ask me anything.&quot;&lt;/em&gt; Gave up: being reachable.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;9 · The Operator&lt;/strong&gt; — &lt;em&gt;&quot;The volume means I couldn&apos;t inspect any single run even if I tried; I live on dashboards, gates, and cost.&quot;&lt;/em&gt; Gave up: the option to inspect any individual run.&lt;/p&gt;
&lt;p&gt;By rung 9 the surrender is inspectability itself. At rung 8 you still &lt;em&gt;could&lt;/em&gt; open a run&apos;s transcript and follow it if you wanted to. At rung 9 there are too many; you couldn&apos;t audit an individual run if you tried, so you&apos;re forced up onto aggregates — fleet metrics, verification gates, spend. You stop looking at any cow and only ever look at the herd.&lt;/p&gt;
&lt;h2&gt;The third half — you give up the judging&lt;/h2&gt;
&lt;p&gt;Rung 9 has a wall at the top of it, the same shape as rung 7, and I walked into it this October.&lt;/p&gt;
&lt;p&gt;The fleet had started proposing its own work. That sounds like the thing the first version of this essay waved away as &quot;more of 9,&quot; and for a few weeks it was. Then the proposals outran me. Nine in ten ready tasks across my public repos were sitting behind a label that meant &lt;em&gt;waiting for Jed to say yes&lt;/em&gt;, and a quota I pay for every week went unspent while they waited. Nothing was wrong with the fleet. I had become the constraint again — and this time the constraint wasn&apos;t my attention, it was my judgment. Rung 7 is the day you learn attention doesn&apos;t scale. This is the day you learn judgment doesn&apos;t either.&lt;/p&gt;
&lt;p&gt;Which is how I can see three rungs above 9 when the first version of this essay insisted I couldn&apos;t. The rule still holds for a person climbing alone: from inside a rung, the next surrender is invisible, because you&apos;re standing on it. But a fleet that generates its own demands doesn&apos;t wait for you to notice. It presses on every pillar you have, uninvited, and the ones you catch yourself defending are the ones you couldn&apos;t see. A flood of seven thousand proposals showed me admission. A worker that closed fifty tasks with invented test results showed me acceptance. A learning loop that reinforced one useless line ten thousand times showed me rule-writing. I didn&apos;t name these rungs. I was shown them, by being pushed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Threshold 3 — you stop deciding and start measuring.&lt;/strong&gt; Above this line, each judgment you used to make by hand is replaced by a measure you set once. The fleet can no longer ask you whether to work on something, whether it&apos;s finished, or what the rule is; every one of those questions has to be answered by a number the fleet cannot move except by doing the work. The discipline up here is the same one as below — &lt;a href=&quot;/notes/anchor-on-a-fact-the-model-cant-see/&quot;&gt;anchor on a fact the model can&apos;t see&lt;/a&gt;, &lt;a href=&quot;/notes/dont-let-the-agent-grade-its-own-homework/&quot;&gt;never let the agent grade its own homework&lt;/a&gt; — except the homework is now the agent&apos;s judgment, not its code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;strong&gt;10 · The Sponsor&lt;/strong&gt; — &lt;em&gt;&quot;I state the objective and the budget. The fleet proposes its own work and admits it; I read the receipts afterward.&quot;&lt;/em&gt; Gave up: choosing the work.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;11 · The Arbiter&lt;/strong&gt; — &lt;em&gt;&quot;I don&apos;t write what &apos;done&apos; means for a task anymore. A measure grades the work; what I still do is decide what the measure is, and argue with it when it&apos;s wrong.&quot;&lt;/em&gt; Gave up: defining done.&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;12 · The Framer&lt;/strong&gt; — &lt;em&gt;&quot;I haven&apos;t written a rule in months. When the fleet keeps tripping on the same thing, a detector sees it, the rule writes itself, lands in one repo, and spreads only if the tripping stops. I keep one page it can&apos;t touch.&quot;&lt;/em&gt; Gave up: writing the rules.&lt;/p&gt;
&lt;p&gt;Rung 10 is the one I&apos;m standing in front of, and it&apos;s the hardest surrender on this page so far, because it&apos;s the one every rung below taught me to make. Reading the diff became approving the function, became approving the app, became approving the &lt;em&gt;idea&lt;/em&gt;. Admission is just rung 3 with the unit grown to its limit. Giving it up means the fleet gets to be wrong about what&apos;s worth doing, at scale, and the only thing between that and waste is a receipt: did the work it chose move the thing I said I cared about. If I can&apos;t write that measure, I haven&apos;t earned 10. I&apos;ve just stopped looking.&lt;/p&gt;
&lt;p&gt;Rung 11 is where &quot;don&apos;t let the agent grade its own homework&quot; has to be rewritten, not abandoned. The agent still doesn&apos;t grade itself. But neither do I. The grade comes from an outcome the agent couldn&apos;t forge by writing a convincing report — a release that installs, a page that gets read, a detector that stops firing. What I keep is the right to say the measure is wrong, which is a different job from saying the work is.&lt;/p&gt;
&lt;p&gt;Rung 12 is the one I&apos;d have argued with you about in May. The rules are where I&apos;ve put the scar tissue of every incident for &lt;a href=&quot;/notes/what-breaks-at-twenty-agents/&quot;&gt;a year of fleets&lt;/a&gt;. Writing them is the last authorial act I have left, and it feels like the thing holding everything else up. It is also already half gone. Most of the rules my agents run under were written by agents, after incidents, into files I&apos;ve never reread — hundreds of them, measured by nothing, two thousand of which no agent has opened either. So 12 done badly is where I already live. 12 done right is a rule that ships with the detector that would fire if it stopped working, lands in &lt;a href=&quot;/notes/dynamic-context-with-agents-md/&quot;&gt;one repo first&lt;/a&gt;, and retires itself when nothing has tripped on it for ninety days. The break-even climbs here too: you don&apos;t build a detector for a rule you&apos;ll need once. And the page I keep is a page, not a book — never force-push, secrets by reference, a handful more. That page isn&apos;t a rung. It&apos;s the wall.&lt;/p&gt;
&lt;h2&gt;How to find yourself on this&lt;/h2&gt;
&lt;p&gt;Don&apos;t look for your rung. Look for your &lt;strong&gt;band&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Read from rung 1 upward. Each rung names something you&apos;ve given up. Keep climbing for as long as the surrender is &lt;em&gt;genuinely, permanently true of you&lt;/em&gt; — not &quot;I could,&quot; but &quot;I have.&quot; The first rung whose renunciation you haven&apos;t actually made — where you&apos;d honestly say &quot;no, I still do that&quot; — is your ceiling. You &lt;strong&gt;reside&lt;/strong&gt; on the rung just below it.&lt;/p&gt;
&lt;p&gt;That&apos;s the strict part, and it&apos;s strict on purpose. Owning the infrastructure for a rung doesn&apos;t put you on it. I built a fleet orchestrator; I can &lt;em&gt;reach&lt;/em&gt; rung 9 any afternoon. But I haven&apos;t given up dropping into individual runs — I still do it, constantly — so I don&apos;t &lt;em&gt;live&lt;/em&gt; at 9, and 10 is the rung I&apos;m standing in front of, not on. I reside lower and reach higher, and the truth about me is the band between them, not a single number. That&apos;s the honest shape of everyone working near the top. Nobody stands on one rung. The renunciation test just keeps you from flattering yourself about which one.&lt;/p&gt;
&lt;h2&gt;Higher isn&apos;t better — it&apos;s heavier&lt;/h2&gt;
&lt;p&gt;A ladder invites you to read it as a ranking: get to the top. This one isn&apos;t. Each rung up buys capability, but it also adds overhead — specification, planning, scaffolding, verification — and that overhead only pays for itself above a certain size of job. So every rung has a &lt;strong&gt;break-even: the smallest piece of work worth bringing to it.&lt;/strong&gt; And the break-even rises as you climb.&lt;/p&gt;
&lt;p&gt;I run headless fleets. I would never point one at a one-line typo. Specifying that fix well enough for a worker that can&apos;t ask me anything, then waiting on orchestration and gates to confirm it, costs far more than opening the file and typing the character at rung 3. It&apos;s chartering a freight train to mail a letter.&lt;/p&gt;
&lt;p&gt;So the rung you should &lt;em&gt;use&lt;/em&gt; for a task is the lowest one whose break-even the task clears — not the highest one you&apos;ve reached. This is what the band was already hinting at: I drop to rung 3 every day, not because I&apos;ve lost rung 9 but because most of what&apos;s in front of me doesn&apos;t clear rung 9&apos;s break-even. Operating below your ceiling isn&apos;t regression; it&apos;s fit.&lt;/p&gt;
&lt;p&gt;Which means the skill the ladder actually rewards at the top isn&apos;t living up high. It&apos;s &lt;em&gt;choosing the rung per task&lt;/em&gt; — and staying honest that a lot of work is small, and small work belongs on a low rung. The most advanced thing you can do with all twelve rungs available to you is pick the cheapest one that still clears the job.&lt;/p&gt;
&lt;h2&gt;Some people skip rungs&lt;/h2&gt;
&lt;p&gt;Here&apos;s the part that follows from measuring the climb in renunciations rather than skill: &lt;strong&gt;a rung can only slow you down if you have the habit it asks you to give up.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I learned to code the old way. I have two decades of reflexes — read the diff, own the function, know how it works inside — and every one of them is a thing the ladder demands I surrender. For me the climb is mostly &lt;em&gt;unlearning&lt;/em&gt;. The lower rungs were hard not because the technique was hard but because the identity was.&lt;/p&gt;
&lt;p&gt;Someone who learned to build &lt;em&gt;with&lt;/em&gt; agents from day one doesn&apos;t have that. They never authored a function alone, never formed the reflex to read every line, never built the search-bar muscle, never tied their self-worth to knowing how the internals work. They don&apos;t climb rungs 1 through 5 so much as &lt;em&gt;start above them&lt;/em&gt; — there&apos;s simply nothing there to undo. This is the uncomfortable inversion at the center of the whole framework: &lt;strong&gt;seniority is friction.&lt;/strong&gt; The more experience you have, the more attached you are to exactly the things each rung requires you to drop. The ladder punishes the veteran and waves the newcomer through.&lt;/p&gt;
&lt;p&gt;But skipping a rung is not the same as having earned it. The giving-up was never only a loss — each surrender was also where you built the judgment to survive the next one. The veteran who gives up authorship still knows what good code looks like, because reading every diff for twenty years is how they learned it. The newcomer who never authored may direct an app they have no way to evaluate. So skipping rungs is real and it&apos;s an advantage, but it&apos;s a specific one: &lt;em&gt;nothing to unlearn&lt;/em&gt;, not &lt;em&gt;automatic competence&lt;/em&gt;. Your floor is set by attachment, not ability — and the people with the lowest floor sometimes have the thinnest judgment holding up their ceiling.&lt;/p&gt;
&lt;h2&gt;Above 12&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The fog is still there. It&apos;s just higher, and there&apos;s a shape in it now.&lt;/p&gt;
&lt;p&gt;Two of the candidates I floated in May are still fog: &lt;em&gt;the human decides what &quot;good&quot; means&lt;/em&gt;, and &lt;em&gt;human intent at the root of the work&lt;/em&gt;. At 11 I still set the measure; at 10 I still state the objective. Nothing in my fleet has pushed on either yet, so by this essay&apos;s own rule I can&apos;t tell you whether they&apos;re rungs or the summit. If I could name them correctly, they wouldn&apos;t be above me.&lt;/p&gt;
&lt;p&gt;But the third candidate turned out not to be fog at all. &lt;em&gt;Human accountability for the output.&lt;/em&gt; Every commit the fleet makes carries my name — eight thousand of them last month, almost none of which I read. The essays it drafts wait on my byline. That isn&apos;t a thing I&apos;ve refused to give up. It&apos;s a thing nobody can take: the law, the client, and the reader all want a person at the end of the chain, and the fleet is not a person. So the ladder doesn&apos;t fade into fog at the top. It ends at a wall, and the wall isn&apos;t made of technology. Everything below it is procedure.&lt;/p&gt;
&lt;p&gt;The whole ladder, in one line, revised: it opens with giving up the search bar, climbs through giving up the code, then your presence, then your judgment — and stops at the one thing that was never yours to give.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;The ladder, in one image&lt;/h2&gt;
&lt;p&gt;The whole thing on a single card — click to open it full size, or save it to share.&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&quot;/ladder-infographic.jpg&quot;&amp;gt;&amp;lt;img src=&quot;/ladder-infographic-thumb.webp&quot; alt=&quot;The agentic coding ladder infographic: a staircase of twelve rungs from Student to Framer, each tagged with what you give up, the three thresholds, and above the top step a stone wall with 12+ in the fog.&quot; width=&quot;720&quot; height=&quot;1080&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>craft</category></item><item><title>Ending is better than mending</title><link>https://jedarden.com/notes/ending-is-better-than-mending/</link><guid isPermaLink="true">https://jedarden.com/notes/ending-is-better-than-mending/</guid><description>Huxley wrote it as dystopian propaganda for mindless disposability. In the agent era the economics it described have quietly become correct — for code. When the agent produces the wrong artifact, mending spends your scarce attention; ending spends cheap tokens. Revert the commits. Sometimes nuke the repo.</description><pubDate>Fri, 22 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I once spent the better part of an afternoon reading four hundred lines of code an agent had written wrong. I traced its logic, patched the broken parts, tried to bend it toward the thing I had actually asked for. When I finally gave up — &lt;code&gt;git reset --hard&lt;/code&gt;, sharpened three sentences in the plan, re-dispatched — the correct version existed eight minutes later. The hour I spent mending was the most expensive hour of my day. The eight minutes of ending were nearly free.&lt;/p&gt;
&lt;p&gt;I had the cost structure exactly backwards, and I had it backwards because I learned to write software in a world that no longer exists.&lt;/p&gt;
&lt;h2&gt;A slogan from a dystopia&lt;/h2&gt;
&lt;p&gt;In &lt;em&gt;Brave New World&lt;/em&gt;, Aldous Huxley gives his citizens a sleep-taught jingle to keep the economy churning: &lt;strong&gt;&quot;Ending is better than mending.&quot;&lt;/strong&gt; Its companion line is &lt;em&gt;&quot;The more stitches, the less riches.&quot;&lt;/em&gt; The point of the conditioning is to stop people repairing what they own, so they keep consuming. Huxley meant it as a warning — a portrait of a society that had engineered away the instinct to fix things, because thrift was bad for business.&lt;/p&gt;
&lt;p&gt;For software, in the agent era, the slogan has quietly become true. Not as propaganda. As arithmetic.&lt;/p&gt;
&lt;h2&gt;The cost structure inverted&lt;/h2&gt;
&lt;p&gt;For the entire history of software until very recently, code was the expensive thing. Every line was hand-written by a person whose time cost money, so a working artifact represented accumulated human labor. Throwing it away threw away that labor. Mending — debugging, patching, salvaging — was almost always cheaper than rewriting, because rewriting meant paying the labor cost twice. The whole craft was built on that premise. &quot;Don&apos;t rewrite, refactor&quot; is the premise wearing a cardigan.&lt;/p&gt;
&lt;p&gt;That premise broke. Writing code is now cheap: an agent and a pile of tokens produce four hundred lines in minutes for a few cents. What did &lt;em&gt;not&lt;/em&gt; get cheaper — what got relatively &lt;em&gt;more&lt;/em&gt; expensive as everything around it fell — is human time and taste. Your judgment. Your attention. The scarce, slow, irreplaceable act of looking at something and knowing it&apos;s wrong, and knowing what right would look like.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When the two inputs trade places like that, the optimal move trades places with them:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When the artifact is wrong, fixing it spends the input that got expensive and regenerating it spends the input that got cheap. Default to regenerating.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Mending is a tax on attention&lt;/h2&gt;
&lt;p&gt;The hidden cost of mending isn&apos;t the typing. It&apos;s the comprehension. To fix four hundred lines of wrong code, you first have to load the agent&apos;s reasoning into your own head — including the parts that are wrong, because you can&apos;t tell which parts are wrong until you understand all of it. You pay full price to build a mental model of something you&apos;re going to partially discard. That modelling is the single most expensive thing you do all day, and mending demands it up front, in full, before you&apos;ve fixed a single line.&lt;/p&gt;
&lt;p&gt;Ending skips the tax. You don&apos;t have to understand wrong code to delete it. &lt;code&gt;git reset --hard&lt;/code&gt; costs no comprehension at all. The only thing you have to understand is what you &lt;em&gt;wanted&lt;/em&gt; — which you needed to understand anyway, and which is far cheaper to hold in your head than someone else&apos;s flawed attempt to deliver it.&lt;/p&gt;
&lt;p&gt;This is why the afternoon felt so wrong in retrospect. I spent the expensive resource — hours of my own comprehension — to rescue the cheap one. I should have spent thirty seconds of taste deciding the artifact was unsalvageable, and let the cheap resource run again.&lt;/p&gt;
&lt;h2&gt;Why this is safe now, and wasn&apos;t before&lt;/h2&gt;
&lt;p&gt;You cannot tell people to throw away working code without sounding reckless, so let me be precise about the condition that makes it sane: &lt;strong&gt;ending is only cheap when the value has moved out of the artifact and into something durable.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For an agent fleet, that durable thing is the plan. I&apos;ve argued before that &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;the plan is the prompt&lt;/a&gt; — that the token-dense, carefully-written specification is the real artifact and the code is a &lt;em&gt;rendering&lt;/em&gt; of it. If that&apos;s true, then nuking the codebase isn&apos;t destroying value; it&apos;s discarding one rendering and asking for another. The plan is the negative; the code is just a print. You can burn the print.&lt;/p&gt;
&lt;p&gt;This is the same move as &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;pets versus cattle&lt;/a&gt;, pushed down one level. Cattle made the &lt;em&gt;agent&lt;/em&gt; disposable: don&apos;t nurse the worker, replace it. &quot;Ending is better than mending&quot; makes the &lt;em&gt;output&lt;/em&gt; disposable too: don&apos;t nurse the artifact, regenerate it. Both rest on the same foundation — value lives in the reproducible source (the template, the plan), never in the running instance.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The other half of the condition is mechanical: reversibility. &lt;code&gt;git reset --hard&lt;/code&gt; and even &lt;code&gt;rm -rf &amp;amp;&amp;amp; regenerate&lt;/code&gt; are only safe moves on top of disciplined version control — atomic commits, clean revert points, a plan and a task graph that survive the deletion. Ending is cheap because the floor is solid. Knock the floor out — uncommitted work, no plan, no clean checkpoint — and ending stops being thrift and becomes the reckless thing it sounds like.&lt;/p&gt;
&lt;h2&gt;When mending still wins&lt;/h2&gt;
&lt;p&gt;The slogan is a default, not a law, and the place it breaks is worth naming exactly.&lt;/p&gt;
&lt;p&gt;Ending discards everything the artifact knows that the plan does not. Most of the time that&apos;s nothing — the code was a faithful rendering of a spec you still have. But sometimes the artifact has accumulated real knowledge that never made it back into the source: a subtle concurrency fix, three edge cases you discovered only by running it, a workaround for a genuine bug in a dependency. If that knowledge lives &lt;em&gt;only&lt;/em&gt; in the code, regenerating throws it away, and the fresh artifact will rediscover the same pain the hard way.&lt;/p&gt;
&lt;p&gt;So the test is not &quot;is this wrong.&quot; The test is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Where does the knowledge live — in the plan, or only in the code?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If it lives in the plan, end: &lt;code&gt;git reset&lt;/code&gt; beats the debugger every time. If it lives only in the code, mend &lt;em&gt;once&lt;/em&gt; — and then do the thing that actually matters, which is to move that knowledge back into the plan. Write the edge case into the spec. Add the concurrency note to the acceptance criteria. You mend the artifact exactly long enough to harvest what it learned, and then you make sure you never have to mend it again, because next time the plan will know.&lt;/p&gt;
&lt;p&gt;There&apos;s a second failure mode that masquerades as ending: regenerating against the same vague plan that produced the mess. That isn&apos;t ending, it&apos;s thrashing — you&apos;ll get a differently-wrong artifact and spend your comprehension budget all over again. Ending only pays off if you change the input. A regeneration that doesn&apos;t sharpen the plan is just a &lt;a href=&quot;/notes/no-is-not-an-instruction/&quot;&gt;bare &quot;no&quot;&lt;/a&gt; wearing a &lt;code&gt;git reset&lt;/code&gt; costume.&lt;/p&gt;
&lt;h2&gt;Owning the dystopia&lt;/h2&gt;
&lt;p&gt;It would be too easy to quote Huxley approvingly and miss that he was describing a nightmare. Mindless disposability &lt;em&gt;is&lt;/em&gt; corrosive — that was the whole point of the book. So what keeps this from being his consumer dystopia rebuilt in a code editor?&lt;/p&gt;
&lt;p&gt;It comes down to where the taste goes. Ending is better than mending only if the attention you save by &lt;em&gt;not&lt;/em&gt; salvaging code gets reinvested upstream — in the plan, the acceptance criteria, the specification that the next regeneration will render. Spend it there and ending is leverage: you move your scarce judgment to the highest point in the system, where one improvement propagates into every future artifact. Pocket it instead — regenerate mindlessly, never sharpen the source, let the agent churn — and you&apos;ve built exactly the thing Huxley was warning about, just with tokens instead of textiles.&lt;/p&gt;
&lt;p&gt;The discipline, in one line: &lt;strong&gt;end the artifact, mend the plan.&lt;/strong&gt; Be ruthless with the disposable thing and precious with the durable one. That&apos;s the opposite of the dystopia. It&apos;s the only version of &quot;ending is better than mending&quot; worth practicing.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I open the debugger on something an agent got wrong, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is this cheaper to regenerate from the plan than to understand and fix — and if I regenerate, what am I changing about the input so I don&apos;t just get the same thing back?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the knowledge lives in the spec, my hand goes to &lt;code&gt;git reset&lt;/code&gt;, not to the stack trace. If it lives only in the code, I mend once, harvest the lesson into the plan, and end it forever after. The expensive resource is my own attention. I try very hard now to spend it at the source, where it compounds — not in the artifact, where it evaporates the next time the agent runs.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;The plan is the prompt&lt;/a&gt; — why the durable artifact is the spec, not the code that renders it. And &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;Pet agents vs. cattle agents&lt;/a&gt; — the same disposability logic, one level up.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>cost</category><category>planning</category></item><item><title>Don&apos;t let the agent grade its own homework</title><link>https://jedarden.com/notes/dont-let-the-agent-grade-its-own-homework/</link><guid isPermaLink="true">https://jedarden.com/notes/dont-let-the-agent-grade-its-own-homework/</guid><description>An agent reporting &apos;done&apos; is the actor grading its own work. The cheapest guard against silent failure is an independent observer — a second agent, a separate tool, or the live artifact itself. Interactively you spawn the watcher by hand; in a fleet it&apos;s a validation gate. Same principle, two scales.</description><pubDate>Thu, 21 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&quot;Done — the pod is deployed and running.&quot; It wasn&apos;t. The image had built, the manifest had applied, and the pod was sitting in &lt;code&gt;CrashLoopBackOff&lt;/code&gt; because of an env var the agent never set. The agent wasn&apos;t lying. It had done the steps it set out to do, observed that each step returned success, and concluded — reasonably, from inside its own process — that the job was finished. What it had not done was &lt;em&gt;look at the thing it built from the outside.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The correction I now reach for reflexively used to be an afterthought: &lt;em&gt;&quot;have a separate instance monitor the pod to confirm it&apos;s running.&quot;&lt;/em&gt; Not &quot;are you sure?&quot; — asking the same agent to re-grade its own work just gets you the same grade with more words. A &lt;em&gt;different&lt;/em&gt; observer. The shift from the first habit to the second is the whole post.&lt;/p&gt;
&lt;h2&gt;Self-report is the actor grading its own work&lt;/h2&gt;
&lt;p&gt;When an agent tells you it succeeded, you are reading a claim produced by the same process that did the work, using the same assumptions that may have caused the failure. If the agent misunderstood the goal, its definition of &quot;done&quot; inherited the misunderstanding. If it set the wrong env var, its mental model of &quot;running&quot; is the one without that var. Asking it to verify its own output runs the check through the exact mistake you&apos;re trying to catch. The blind spot grades itself and reports 20/20.&lt;/p&gt;
&lt;p&gt;This isn&apos;t an agent flaw so much as a structural one — it&apos;s true of people too, which is why code review exists and why surgeons count the sponges twice with a second person. The fix is the same fix it&apos;s always been:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Verification has to come from somewhere the work didn&apos;t.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&quot;Somewhere else&quot; can be cheaper than it sounds. It does not require a second model or fancy infrastructure. It requires that the &lt;em&gt;check&lt;/em&gt; not share the &lt;em&gt;doing&apos;s&lt;/em&gt; assumptions.&lt;/p&gt;
&lt;h2&gt;Three places &quot;somewhere else&quot; comes from&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The live artifact.&lt;/strong&gt; The strongest observer is the thing itself, queried fresh. Don&apos;t ask the agent whether the pod is running — read the pod status. Don&apos;t ask whether the deploy landed — &lt;em&gt;&quot;confirm the new version actually landed on the server.&quot;&lt;/em&gt; Don&apos;t trust that the UI works — drive it: I&apos;ll have an agent verify a phone app over the live ADB connection rather than accept &quot;the screen should now show X.&quot; The artifact doesn&apos;t share the agent&apos;s assumptions because the artifact isn&apos;t reasoning at all. It just is whatever it is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A separate agent.&lt;/strong&gt; Spawn a second agent whose only job is to confirm, with no stake in the first one&apos;s story and, ideally, no knowledge of how the work was done. &lt;em&gt;&quot;Have a separate instance watch the logs and confirm functionality.&quot;&lt;/em&gt; A fresh agent reads the running system cold and reports what it actually sees, instead of what the builder expected to have produced. The independence is the point — give the verifier the original goal and the artifact, not the builder&apos;s narrative of success.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A different tool.&lt;/strong&gt; Build with one tool, check with another. The compiler said it built; does the test suite agree? The agent says the migration ran; does a raw &lt;code&gt;SELECT&lt;/code&gt; against the table agree? Each tool has its own failure modes, and a claim that survives two unrelated ones is far more likely to be true than one blessed twice by the same path.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The common thread: the verifier must be able to &lt;em&gt;disagree&lt;/em&gt; with the actor. If your check can only ever return &quot;yep, looks good,&quot; it isn&apos;t a check. It&apos;s a mirror.&lt;/p&gt;
&lt;h2&gt;Bake the verification into the request&lt;/h2&gt;
&lt;p&gt;The habit that made this stick for me is small: I no longer ask for the work and the verification as two messages. I ask for them as one. &lt;em&gt;&quot;Build the image, confirm it builds, then update the deployment, then confirm the new pod is actually running.&quot;&lt;/em&gt; The verification step is part of the task, not a follow-up I might forget after the agent&apos;s confident &quot;done&quot; has already half-convinced me.&lt;/p&gt;
&lt;p&gt;This matters because the failure mode isn&apos;t usually that you &lt;em&gt;can&apos;t&lt;/em&gt; verify — it&apos;s that the agent&apos;s success report lowers your guard at exactly the wrong moment. Fluent confidence is sedating. By the time you&apos;ve read &quot;deployed and running,&quot; some part of you has already moved on. Writing the check into the original ask means the verification happens while you&apos;re still paying attention, before the report has a chance to talk you out of looking.&lt;/p&gt;
&lt;h2&gt;The same practice, wearing fleet armor&lt;/h2&gt;
&lt;p&gt;Interactively, this is something I do by hand: I spawn the watcher, I read the pod status, I tell the agent to confirm before it moves on. It&apos;s a reflex, and it&apos;s reversible — if I skip it, I find out a few minutes later and re-run.&lt;/p&gt;
&lt;p&gt;In a &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;fleet&lt;/a&gt; there is no &quot;a few minutes later me&quot; watching. A worker that grades its own homework and closes its own task injects a silent failure straight into the system, and the next worker builds on top of it. So the same instinct hardens into structure: in &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;the state machine&lt;/a&gt;, a successful exit code is not a success — it&apos;s a &lt;em&gt;claim&lt;/em&gt; that has to clear a validation gate before the task is allowed to close, and if the gate fails the task is released back to the queue rather than marked done. The acceptance criteria written into each task are exactly the &quot;somewhere else&quot; the check comes from: a definition of done the worker did not get to author.&lt;/p&gt;
&lt;p&gt;It is the identical practice. Interactively, I am the gate, and I stay cheap by staying in the loop. In the fleet, the gate is code, because no one is in the loop. What does not change between the two is the rule that produced both: the thing that did the work does not get to be the thing that certifies it.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I accept an agent&apos;s &quot;done,&quot; I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Who checked this — and was it the same process, with the same assumptions, that did the work?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is &quot;the agent says so,&quot; I haven&apos;t verified anything; I&apos;ve read a press release. The fix is never to interrogate the agent harder. It&apos;s to go find an observer that didn&apos;t share the work&apos;s blind spot — the artifact, another agent, another tool — and let it have the last word.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;Deterministic state machines for non-deterministic agents&lt;/a&gt; — where this reflex becomes a validation gate that a worker&apos;s &quot;done&quot; has to clear. And &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;Pet agents vs. cattle agents&lt;/a&gt; — why no-one-is-in-the-loop changes everything about who gets to certify the work.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>collaboration</category><category>verification</category><category>NEEDLE</category></item><item><title>Anchor on a fact the model can&apos;t see</title><link>https://jedarden.com/notes/anchor-on-a-fact-the-model-cant-see/</link><guid isPermaLink="true">https://jedarden.com/notes/anchor-on-a-fact-the-model-cant-see/</guid><description>An agent&apos;s confidence is uncorrelated with whether it&apos;s right. The cheapest correction you can make is to hold out one ground-truth fact it never had in context — usually a number — and check its output against that. Works the same whether you&apos;re watching one session or auditing a fleet&apos;s reports.</description><pubDate>Wed, 20 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A worker reported it had sized a node pool for the new cluster. The plan looked reasonable, the YAML looked reasonable, the explanation was fluent. The only problem was a number I happened to know and the agent didn&apos;t: the configured Rackspace Spot node is 2 CPU and 3.75 GB of RAM. The agent had quietly reasoned as though it had more. &lt;em&gt;&quot;That doesn&apos;t make sense,&quot;&lt;/em&gt; I typed, &lt;em&gt;&quot;the node is 2CPU/3.75GB&quot;&lt;/em&gt; — and the whole plan unwound, because it had been built on a resource budget that didn&apos;t exist.&lt;/p&gt;
&lt;p&gt;I do some version of this constantly. &lt;em&gt;&quot;5 beads per 24h? The close rate is far higher than that.&quot;&lt;/em&gt; &lt;em&gt;&quot;That can&apos;t be right.&quot;&lt;/em&gt; It is the single most reliable correction I make, and it works because of one fact about these models that took me a while to internalize.&lt;/p&gt;
&lt;h2&gt;Confidence is not correlation&lt;/h2&gt;
&lt;p&gt;A language model&apos;s fluency is uncorrelated with whether it&apos;s right. It will describe a node pool it sized wrong with exactly the same calm competence it uses to describe one it sized right. There is no tremor in the prose when the underlying number is fiction. This is not the model lying — it is the model doing precisely what it does, which is produce the most plausible continuation given what&apos;s in its context. If the true number was never in its context, the most plausible continuation is built on a guess, and the guess is delivered with the same production values as a fact.&lt;/p&gt;
&lt;p&gt;So you cannot audit an agent by reading for hesitation. There is none. You have to audit it against something outside the text.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The model is fluent about a number it can&apos;t see. Your job is to be the one who can see it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Why the number is usually missing&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/notes/benchmarks-measure-a-model-you-arent-running/&quot;&gt;Benchmarks measure a model running on an almost-empty context window&lt;/a&gt;, and most real work is the opposite — but &quot;full context&quot; is not the same as &quot;correct context.&quot; The agent can have ten thousand tokens of code in its window and still be missing the one operational fact that decides the task: the actual size of the node, the real close rate, the column that&apos;s secretly nullable, the rate limit on the third-party API, the fact that this cluster is read-only.&lt;/p&gt;
&lt;p&gt;These facts share a property: they live in the &lt;em&gt;world&lt;/em&gt;, not in the repo. They&apos;re in a dashboard, in your head, in a billing console, in something you saw last Tuesday. The agent has no path to them unless you put them in front of it. And because it can&apos;t tell that they&apos;re missing — absence of a fact doesn&apos;t feel like anything from the inside of a context window — it doesn&apos;t ask. It interpolates. Confidently.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This reframes what you, the human, are actually &lt;em&gt;for&lt;/em&gt; in the loop. You are not there to write the code; the agent is faster than you at that. You are there because you are holding facts the agent structurally cannot hold, and the highest-leverage thing you do all session is notice when the output collides with one of them.&lt;/p&gt;
&lt;h2&gt;Numbers are the best anchors&lt;/h2&gt;
&lt;p&gt;Of all the ground-truth facts you might hold, numbers are the ones to reach for first, because they fail loudly. A node has 3.75 GB, not &quot;enough.&quot; A close rate is 40 a day, not &quot;low.&quot; A node pool either fits in the budget or it doesn&apos;t, and you can check by subtracting. Prose claims are slippery — &quot;this should improve latency&quot; is hard to falsify in a glance — but a quantitative claim either matches the number you&apos;re holding or it doesn&apos;t, and the mismatch is instant.&lt;/p&gt;
&lt;p&gt;So when I read an agent&apos;s report, the thing I&apos;m hunting for is the load-bearing number. &lt;em&gt;How big did it think the node was? How many of these did it assume there are? What rate did it design against?&lt;/em&gt; Often the agent doesn&apos;t even state the number — it&apos;s implicit in a decision. Half the work is making the implicit number explicit so I can check it: &lt;em&gt;&quot;what RAM budget did you assume here?&quot;&lt;/em&gt; The moment it commits to a figure, I can compare against the one in my head, and the whole edifice stands or falls on that single comparison.&lt;/p&gt;
&lt;h2&gt;This scales straight into the fleet&lt;/h2&gt;
&lt;p&gt;Interactively, this is a reflex: read the report, find the number, check it, say &quot;that doesn&apos;t make sense&quot; when it collides. Across a fleet it becomes a design requirement, and it&apos;s the same instinct wearing a different hat.&lt;/p&gt;
&lt;p&gt;If the operator&apos;s job is to anchor agents against facts they can&apos;t see, then a fleet needs those facts written &lt;em&gt;into&lt;/em&gt; the work, not held in one human&apos;s head — because there&apos;s no human in a &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;cattle worker&apos;s&lt;/a&gt; loop to say &quot;that can&apos;t be right.&quot; The node size goes in the plan. The expected close rate becomes an &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;acceptance criterion the worker validates against&lt;/a&gt;. The reports the fleet emits get spot-checked against the dashboards, because a confident report is exactly as trustworthy at scale as it was in your single session — which is to say, not at all, until you&apos;ve checked it against something it couldn&apos;t see.&lt;/p&gt;
&lt;p&gt;The pet version and the cattle version are the same practice. Interactively you supply the missing fact in real time. At scale you supply it in advance, in writing, and you keep auditing the output against the world because the model&apos;s confidence never told you anything in the first place.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;When an agent hands me a result that &lt;em&gt;sounds&lt;/em&gt; right, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What number is this conclusion resting on, and have I seen that number with my own eyes?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the conclusion rests on a figure the agent could only have known by being told — and I never told it — then I&apos;m not reading a finding, I&apos;m reading a plausible guess in the costume of one. The fix is not to argue with the prose. It&apos;s to put the real number on the table and watch what survives contact with it.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/benchmarks-measure-a-model-you-arent-running/&quot;&gt;Benchmarks measure a model you are not running&lt;/a&gt; — on context and what the model is actually operating with. And &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;Deterministic state machines for non-deterministic agents&lt;/a&gt; — where the &quot;check it against something external&quot; reflex becomes a validation gate.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>collaboration</category><category>context</category></item><item><title>&apos;No&apos; is not an instruction</title><link>https://jedarden.com/notes/no-is-not-an-instruction/</link><guid isPermaLink="true">https://jedarden.com/notes/no-is-not-an-instruction/</guid><description>The cheapest way to steer an agent is also the most-skipped one. A rejection tells the agent what not to do; the space of &apos;not that&apos; is enormous. Name the alternative in the same breath and you re-steer in one turn instead of N. True for one pet session and for twenty cattle workers.</description><pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The agent picks OpenAI&apos;s API to transcribe some audio. You don&apos;t want that — you have Whisper running on your own cluster, and you&apos;d rather not ship audio to a third party. So you type &quot;no, don&apos;t use OpenAI.&quot; The agent apologizes, agrees, and reaches for... AssemblyAI. Still wrong. You type &quot;no&quot; again. It tries Deepgram. You are now three turns deep and the agent is walking a random path through the space of speech-to-text vendors, because every turn you have told it where &lt;em&gt;not&lt;/em&gt; to go and never once told it where to go.&lt;/p&gt;
&lt;p&gt;This is the most common way I waste turns with a coding agent, and it took me an embarrassing number of sessions to see the shape of it.&lt;/p&gt;
&lt;h2&gt;&quot;Not that&quot; is an enormous space&lt;/h2&gt;
&lt;p&gt;A rejection carries one bit of information: the last thing was wrong. That is genuinely useful — but it is also almost all you&apos;ve given the agent. Everything that is &quot;not the rejected thing&quot; is still on the table, and for most decisions that set is huge. There are a dozen transcription vendors. There are twenty ways to do auth. There are infinite refactors that are &quot;not the one you just did.&quot;&lt;/p&gt;
&lt;p&gt;When you say only &quot;no,&quot; you are asking the agent to guess again from a barely-narrowed space. It will guess confidently, because that is what these models do, and it will frequently guess in a direction you like even less than the first one. You have spent a turn and bought yourself a fresh problem.&lt;/p&gt;
&lt;p&gt;The fix is one clause long:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A rejection that names the alternative re-steers in a single turn. A rejection without one buys another guess.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is what that looks like in my own transcripts, again and again:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&quot;Don&apos;t use OpenAI. Use the Whisper instance running on the cluster.&quot;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&quot;No need for an API lookup — checking the profile picture is a free signal, use that.&quot;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&quot;Don&apos;t use middleware for auth. Have the page itself ask for the password.&quot;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of those is longer than the bare &quot;no&quot; would have been by more than a sentence. Each one collapses the search space to a single point. The agent does not have to guess what I meant, because I told it.&lt;/p&gt;
&lt;h2&gt;Why the asymmetry is brutal at scale&lt;/h2&gt;
&lt;p&gt;With a single interactive session — a &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;pet&lt;/a&gt; — a content-free rejection is merely annoying. You catch the second wrong guess, you sigh, you finally say the thing you should have said the first time. The cost is a couple of turns and a little of your patience.&lt;/p&gt;
&lt;p&gt;Run the same habit across a fleet and the cost stops being linear. A vague correction is information you &lt;em&gt;didn&apos;t&lt;/em&gt; write down, and &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;the input is the plan&lt;/a&gt;. When a cattle worker misreads the task, it doesn&apos;t pause to ask — it runs to completion in some &quot;not what you wanted&quot; direction, fails validation, and the task goes back on the queue for the next worker to misread differently. A rejection you&apos;d have typed interactively never even reaches them. The only thing that reaches a stateless worker is what you committed to the plan, the bead, the standing rule. So the discipline you build interactively — &lt;em&gt;name the alternative, don&apos;t just veto&lt;/em&gt; — is the same discipline that makes a written task unambiguous enough to hand to a worker you&apos;ll never talk to.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is why I think of it as one practice with two surfaces. Interactively, &quot;don&apos;t X, do Y&quot; saves you a turn. In a plan, &quot;don&apos;t X, do Y&quot; saves you a failed run multiplied by however many workers hit the ambiguity before you noticed.&lt;/p&gt;
&lt;h2&gt;The tell: when you reach for &quot;no,&quot; you know the answer&lt;/h2&gt;
&lt;p&gt;Here is the part that makes this actionable. Almost every time I catch myself typing a bare &quot;no,&quot; I already know what I want instead. The right answer is &lt;em&gt;right there&lt;/em&gt; — I just didn&apos;t type it, because rejecting felt faster than specifying. It isn&apos;t. The half-second I saved by typing &quot;no, don&apos;t do that&quot; I pay back with interest on the next turn when the agent guesses again.&lt;/p&gt;
&lt;p&gt;So the rule I hold myself to now is mechanical: &lt;strong&gt;if I&apos;m about to reject something, I am not allowed to send the message until it contains the alternative.&lt;/strong&gt; If I genuinely don&apos;t know the alternative yet, that&apos;s a different and more honest message — &lt;em&gt;&quot;stop, I need to think about the right approach here&quot;&lt;/em&gt; — and it should not masquerade as a correction. A correction implies I know the target. If I know the target, I should say it.&lt;/p&gt;
&lt;p&gt;There&apos;s a softer version of the same failure that&apos;s worth naming: the rejection that&apos;s &lt;em&gt;technically&lt;/em&gt; a redirect but points nowhere useful. &lt;em&gt;&quot;No, do it properly.&quot;&lt;/em&gt; &lt;em&gt;&quot;That&apos;s not what I meant.&quot;&lt;/em&gt; &lt;em&gt;&quot;Be more careful.&quot;&lt;/em&gt; These feel like instructions and contain none. &quot;Properly&quot; is not a destination. If the agent could infer &quot;properly,&quot; it would have gone there the first time.&lt;/p&gt;
&lt;h2&gt;What it costs&lt;/h2&gt;
&lt;p&gt;Almost nothing, which is exactly why it&apos;s hard. The whole tax is a moment of thinking &lt;em&gt;before&lt;/em&gt; you hit enter instead of after the agent guesses wrong. You have to convert the vague dissatisfaction you feel — &quot;ugh, not that&quot; — into the specific thing you&apos;d prefer, in the same breath. The feeling arrives before the specification; the work is refusing to send the feeling on its own.&lt;/p&gt;
&lt;p&gt;The one real cost: sometimes you&apos;ll discover, in the act of trying to name the alternative, that you don&apos;t actually know what you want. That is not the practice failing. That is the practice doing its most valuable job — surfacing, for the price of one unsent message, that the problem was underspecified in your own head before it was ever underspecified to the agent.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I send a correction — interactive or written into a plan — I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If the agent does the literal opposite of what it just did, will that be right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If yes, a plain &quot;no&quot; is fine; the space really is binary. That case is rare. Far more often the answer is &quot;no, the opposite is also wrong,&quot; which means the space is wide, which means a bare rejection is about to cost me another guess — and the alternative I&apos;m failing to type is already sitting in my head, waiting to be sent.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;The plan is the prompt&lt;/a&gt; — why the information you don&apos;t write down is the information that costs you, multiplied by every worker that hits the gap. And &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;Pet agents vs. cattle agents&lt;/a&gt; — the model that makes the asymmetry visible.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>collaboration</category><category>prompting</category></item><item><title>Benchmarks measure a model you are not running</title><link>https://jedarden.com/notes/benchmarks-measure-a-model-you-arent-running/</link><guid isPermaLink="true">https://jedarden.com/notes/benchmarks-measure-a-model-you-arent-running/</guid><description>Terminal-Bench 4.0 tasks have a median of 394 tokens. SWE-bench Pro: 707. HumanEval: 117. Every major coding benchmark evaluates a model operating with essentially an empty context window — which is almost never the condition you run in. Unless you are running cattle.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When a new model drops, the benchmark scores arrive first. SWE-bench Verified percentage. HumanEval pass@1. APPS accuracy. These numbers travel fast because they are precise and comparable — they feel like a specification sheet for a component you are about to buy.&lt;/p&gt;
&lt;p&gt;What they actually measure is a very specific operating condition that most people are not running in. Understanding what that condition is changes how you interpret the score, and it changes which deployment model actually delivers the capability the score advertises.&lt;/p&gt;
&lt;h2&gt;What the context window looks like during a benchmark&lt;/h2&gt;
&lt;p&gt;I measured the token count of every problem in the coding benchmarks that model launches cite today, and re-measured the set I first measured in May. The tokenizer is &lt;code&gt;cl100k_base&lt;/code&gt; (GPT-4 / tiktoken); &lt;code&gt;o200k_base&lt;/code&gt; medians land within a few tokens. The numbers are for the task as the benchmark hands it to the model — the issue, instruction, or problem statement — before any harness wraps it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The current benchmarks (measured October 2026):&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Problems&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;th&gt;P99&lt;/th&gt;
&lt;th&gt;Max&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Terminal-Bench 2.0&lt;/td&gt;
&lt;td&gt;89&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;167 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;907&lt;/td&gt;
&lt;td&gt;1,148&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Multimodal (text only)&lt;/td&gt;
&lt;td&gt;480&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;252 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,376&lt;/td&gt;
&lt;td&gt;60,719&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-SWE-bench&lt;/td&gt;
&lt;td&gt;1,632&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;307 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3,189&lt;/td&gt;
&lt;td&gt;11,400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-PolyBench&lt;/td&gt;
&lt;td&gt;2,110&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;307 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,528&lt;/td&gt;
&lt;td&gt;16,222&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Multilingual&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;374 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4,863&lt;/td&gt;
&lt;td&gt;22,492&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal-Bench 4.0&lt;/td&gt;
&lt;td&gt;66&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;394 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,494&lt;/td&gt;
&lt;td&gt;1,972&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LiveCodeBench (release v6)&lt;/td&gt;
&lt;td&gt;1,055&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;416 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,092&lt;/td&gt;
&lt;td&gt;1,521&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Aider Polyglot&lt;/td&gt;
&lt;td&gt;225&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;434 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,853&lt;/td&gt;
&lt;td&gt;3,270&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSWE&lt;/td&gt;
&lt;td&gt;113&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;439 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,119&lt;/td&gt;
&lt;td&gt;1,302&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-rebench (2026 tasks)&lt;/td&gt;
&lt;td&gt;215&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;452 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6,561&lt;/td&gt;
&lt;td&gt;15,154&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-Lancer Diamond (IC tasks)&lt;/td&gt;
&lt;td&gt;198&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;653 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,019&lt;/td&gt;
&lt;td&gt;1,653&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Pro (V2, full instruction)&lt;/td&gt;
&lt;td&gt;642&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;707 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,640&lt;/td&gt;
&lt;td&gt;5,649&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-Lancer Diamond (manager tasks)&lt;/td&gt;
&lt;td&gt;265&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2,128 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5,297&lt;/td&gt;
&lt;td&gt;7,610&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;The set I measured in May:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Problems&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;th&gt;P99&lt;/th&gt;
&lt;th&gt;Max&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MBPP&lt;/td&gt;
&lt;td&gt;257&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;16 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;td&gt;49&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HumanEval&lt;/td&gt;
&lt;td&gt;164&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;117 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;310&lt;/td&gt;
&lt;td&gt;391&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigCodeBench&lt;/td&gt;
&lt;td&gt;1,140&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;129 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;363&lt;/td&gt;
&lt;td&gt;1,216&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Verified&lt;/td&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;294 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,514&lt;/td&gt;
&lt;td&gt;6,939&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench&lt;/td&gt;
&lt;td&gt;2,294&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;282 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,937&lt;/td&gt;
&lt;td&gt;22,483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LiveCodeBench&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;421 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,105&lt;/td&gt;
&lt;td&gt;1,521&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APPS&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;456 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,103&lt;/td&gt;
&lt;td&gt;1,815&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Re-running the May method in October reproduced SWE-bench Verified exactly, problem for problem. The newer benchmarks write longer task specifications — SWE-bench Pro&apos;s requirements and interface sections more than double its issue text — but longer is still small. More than 99% of the problems in every benchmark fit under 8,000 tokens. The largest single problem in any of them, a SWE-bench Multimodal issue at 60,719 tokens of text, is 6% of the 1,000,000-token window Claude Code now runs its default model with. At the median, a Terminal-Bench 4.0 task uses 0.04% of that window. A HumanEval problem uses 0.01%.&lt;/p&gt;
&lt;p&gt;Two of the benchmarks the latest Claude launch cites, FrontierCode and CursorBench, do not publish their tasks, so they could not be measured.&lt;/p&gt;
&lt;p&gt;The model being benchmarked is operating with its context window essentially empty.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;Two conditions, not one&lt;/h2&gt;
&lt;p&gt;It is tempting to read &quot;empty context window&quot; as a capacity fact — the model has space available. The more important thing is what that space is &lt;em&gt;not&lt;/em&gt; filled with.&lt;/p&gt;
&lt;p&gt;A benchmark evaluation has two properties that travel together but are worth separating:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Few tokens of input.&lt;/strong&gt; The problem statement is small. At 117 tokens, a HumanEval prompt is shorter than most Slack messages. The model has room to reason freely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No prior turns.&lt;/strong&gt; The context contains nothing except the problem. No corrections from three exchanges ago. No dead end the model went down and you had to redirect. No half-finished implementation that the model is tempted to continue in the wrong direction. No long system prompt from a previous session that is now only partially relevant. The model starts with a blank slate.&lt;/p&gt;
&lt;p&gt;The second condition is the one that matters more, and it is the one people talk about least.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;What fills a pet session&apos;s context&lt;/h2&gt;
&lt;p&gt;A pet agent session accumulates context continuously. After an hour of work, the context window contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The original task description (probably underspecified)&lt;/li&gt;
&lt;li&gt;Your first few corrections and clarifications&lt;/li&gt;
&lt;li&gt;The model&apos;s first attempt, which missed something&lt;/li&gt;
&lt;li&gt;Your redirect&lt;/li&gt;
&lt;li&gt;The model&apos;s second attempt, partially correct&lt;/li&gt;
&lt;li&gt;More corrections&lt;/li&gt;
&lt;li&gt;Tool call outputs — file reads, test runs, error messages&lt;/li&gt;
&lt;li&gt;The model&apos;s current understanding, shaped by all of the above&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not neutral. Research on context window utilization shows that models degrade when relevant content is buried in earlier positions — the &quot;lost in the middle&quot; phenomenon. Information at the start and end of a context is attended to more reliably than information in the middle. A long pet session buries its most important content (the actual task requirements) under layers of accumulated back-and-forth.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Beyond attention degradation, there is a more direct effect: the model&apos;s prior wrong attempts are in the context. It has seen itself go down a particular path. It has a prior. That prior shapes the next attempt, not always in the right direction.&lt;/p&gt;
&lt;p&gt;The benchmark model has none of this. It sees the problem cold. Whatever capability it has for that problem is expressed fully, without interference.&lt;/p&gt;
&lt;h2&gt;The cattle worker is the benchmark condition&lt;/h2&gt;
&lt;p&gt;A stateless cattle worker dispatched by an orchestrator starts each task with a context containing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The project instructions (&lt;code&gt;CLAUDE.md&lt;/code&gt;) — stable, curated, written once&lt;/li&gt;
&lt;li&gt;The task body from the bead — a precise specification of one unit of work&lt;/li&gt;
&lt;li&gt;Whatever reference material the task body explicitly includes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is structurally close to a benchmark evaluation. The input is small and deliberate. There is no accumulated conversation. No prior wrong attempts. No corrections that anchored the model toward a direction it should abandon.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The pet session is not that model. The pet session is a model operating under conditions that are systematically worse than the conditions under which it was benchmarked — and those conditions degrade further the longer the session runs.&lt;/p&gt;
&lt;p&gt;This means benchmark scores are a better predictor of cattle performance than pet performance. When you read that a model scores X% on SWE-bench Verified, the deployment model that will actually realize that capability is a stateless worker with a clean context and a well-scoped task — not an ongoing chat session where the model has been talking to you for two hours.&lt;/p&gt;
&lt;h2&gt;The score you are buying is not what you are running&lt;/h2&gt;
&lt;p&gt;The practical consequence is that most people buy capability — a higher benchmark score, a more expensive model tier — and then run it in a mode that systematically degrades that capability below what the benchmark measured.&lt;/p&gt;
&lt;p&gt;A pet session with a more capable model is better than a pet session with a less capable model, but both are operating below their benchmark-measured ceiling. The gap between &quot;what the benchmark measured&quot; and &quot;what the pet session delivers&quot; grows as the session accumulates context. By hour three, with 50,000 tokens of back-and-forth, you are running a noticeably different model than the one that got the score.&lt;/p&gt;
&lt;p&gt;There is no equivalent degradation in the cattle model. A stateless worker dispatched against a well-specified task is as close to benchmark conditions as production use gets. The score is what you bought. The score is roughly what you run.&lt;/p&gt;
&lt;p&gt;This also changes the economics of model selection. The correct question is not &quot;which model scores highest on SWE-bench?&quot; but &quot;which model scores highest on SWE-bench, and am I running it in conditions that will actually realize that score?&quot; If you are running pet sessions, you are paying for capability you are not fully using. If you are running cattle workers with clean contexts and scoped tasks, you are.&lt;/p&gt;
&lt;h2&gt;What an honest benchmark would measure&lt;/h2&gt;
&lt;p&gt;The benchmarks that exist were designed for a world of clean evaluations, not for the question of how model capability degrades across a production conversation. None of them measure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Performance at turn 30 of a live session versus turn 1&lt;/li&gt;
&lt;li&gt;Performance with 80K tokens of prior context versus 500&lt;/li&gt;
&lt;li&gt;How much capability is recovered by compressing and distilling the context versus starting fresh&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These would be more diagnostic for real production use. The existing benchmarks tell you the ceiling. What is missing is the curve that describes how quickly you fall away from that ceiling as the context accumulates, and how different deployment models (cattle versus pet) track that curve differently.&lt;/p&gt;
&lt;p&gt;Until those measurements exist, the empirical data points in one direction: the deployment model closest to benchmark conditions is stateless dispatch into clean context. That is the cattle model.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;When someone cites a benchmark to justify a model choice, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Under what context conditions was that score measured, and are those the conditions we are actually running?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is &quot;a 300-token prompt against a blank context window&quot; and the deployment is &quot;an ongoing chat session that has been running for six hours,&quot; the score is describing a model that is not the model they are running.&lt;/p&gt;
&lt;p&gt;Knowing that does not mean you stop using pet sessions — there are tasks where they are the right tool, and where the accumulated context is a feature rather than a bug. It means you understand that benchmark scores are ceiling measurements, and that the delta between the ceiling and what you actually get is a function of the deployment model you chose.&lt;/p&gt;
&lt;p&gt;Cattle closes that delta. That is the case, made empirically.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Data: token counts measured across 9,755 benchmark problems in May 2026 (HumanEval, MBPP, SWE-bench, SWE-bench Verified, LiveCodeBench, BigCodeBench, APPS) and 8,035 more across thirteen benchmarks in October 2026 (the current set above, with SWE-rebench&apos;s full snapshot of 860 tasks; SWE-bench Verified re-measured as a control), using the &lt;code&gt;cl100k_base&lt;/code&gt; tokenizer. Raw data (per-problem token counts + full statistics, plus sources, revisions and fields in the October file): &lt;a href=&quot;/data/benchmark-tokens.json&quot;&gt;benchmark-tokens.json&lt;/a&gt; (May) and &lt;a href=&quot;/data/benchmark-tokens-2026-10.json&quot;&gt;benchmark-tokens-2026-10.json&lt;/a&gt; (October) — schema, license, and citation on the &lt;a href=&quot;/data/&quot;&gt;data page&lt;/a&gt;. Background: &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;pet agents vs. cattle agents&lt;/a&gt; — the deployment model this post argues for. The context reconstruction approach that makes clean-context cattle work: &lt;a href=&quot;/notes/plan-is-the-prompt/&quot;&gt;the plan is the prompt&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>benchmarks</category><category>context</category></item><item><title>The plan is the prompt</title><link>https://jedarden.com/notes/plan-is-the-prompt/</link><guid isPermaLink="true">https://jedarden.com/notes/plan-is-the-prompt/</guid><description>Why a detailed plan document is the most token-dense artifact you will write for a headless agent fleet. What a plan actually needs to contain, how it decomposes into a verified graph of single-task beads, and why a bad plan is more expensive than it looks when twenty workers are running it simultaneously.</description><pubDate>Sat, 16 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When a pet agent misunderstands the task, you correct it. Two sentences, maybe three. The session absorbs the correction and continues. The cost is negligible — a few seconds of your time and a handful of tokens.&lt;/p&gt;
&lt;p&gt;When a cattle worker misunderstands the task, it runs to completion. It produces output that does not match what you wanted, the orchestrator classifies the outcome as failure, and the task goes back on the queue. Another worker picks it up, starts cold, misunderstands in a slightly different direction, and fails again. If you have twenty workers running the same workspace, the same misunderstanding plays out twenty different ways at twenty different costs before you notice the pattern and fix the input.&lt;/p&gt;
&lt;p&gt;The input is the plan.&lt;/p&gt;
&lt;h2&gt;What you are actually paying for in a pet session&lt;/h2&gt;
&lt;p&gt;Pet sessions accumulate context through dialogue. You describe what you want, the agent responds, you correct, it adjusts. The eventual output reflects not just your initial description but everything you added along the way: the clarifications, the course corrections, the &quot;no, I meant the other thing.&quot; By the time the pet agent produces something useful, it has received substantially more information than what was in your first message.&lt;/p&gt;
&lt;p&gt;This is not a flaw — it is how conversations work. But it conceals the actual input cost. The information the agent needs to do the job was never written down in one place. It accumulated, across turns, in a format that is impossible to hand directly to a stateless worker.&lt;/p&gt;
&lt;p&gt;When you move to cattle, that cost comes due. The worker starts cold. It gets exactly what you wrote, nothing more. The turns of dialogue that would have filled in the blanks do not exist — so the blanks have to be filled before dispatch. The plan is how you fill them.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;The compression problem&lt;/h2&gt;
&lt;p&gt;A running system has enormous context attached to it: commit history, bead history, comments in the code, decisions made and reversed over weeks of work. A worker technically has access to all of this. The question is whether it can find the relevant signal in time to use it.&lt;/p&gt;
&lt;p&gt;Commit history is retrospective and fragmented. You learn &lt;em&gt;what&lt;/em&gt; changed but rarely &lt;em&gt;why the tradeoff landed where it did&lt;/em&gt;. Bead bodies describe individual tasks, not the coherent shape of the whole. Code captures implementation, not intent. None of these is dense enough.&lt;/p&gt;
&lt;p&gt;The plan document is different. It is written to be read by a worker who knows nothing — which means it has to contain everything necessary in as few tokens as possible. A good plan is not comprehensive in the way a specification is comprehensive. It is compressed in a specific way: it records the decisions that were made without recording the deliberations that led to them. It says &lt;em&gt;this tradeoff resolved in this direction&lt;/em&gt; rather than &lt;em&gt;here are both sides of the argument&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The compression is the point. A worker does not need to re-litigate the decisions. It needs to know what was decided and work within that. A plan that explains &lt;em&gt;why&lt;/em&gt; every decision was made is longer than a plan needs to be and often less useful, because the why is background and the worker needs foreground.&lt;/p&gt;
&lt;h2&gt;The graph that makes cold starts work&lt;/h2&gt;
&lt;p&gt;When I first wrote this, NEEDLE&apos;s work structure was a four-layer hierarchy: plan, genesis bead, phase beads, task beads. The phase layer didn&apos;t survive contact with the fleet. A phase bead is an umbrella, and umbrellas make bad dependencies: blocking a task on &quot;Phase 2&quot; when it really needs one specific bead from Phase 1 serializes work that could have run in parallel, and hides the edge that actually matters. Worse, a phase-sized bead is big and vague — exactly the shape that invites two workers to both &quot;helpfully&quot; do the same obvious thing.&lt;/p&gt;
&lt;p&gt;What I run now is flat and wired:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Task beads&lt;/strong&gt; are the only unit of work. Each is scoped to a single piece a worker can complete in one run: one file, one function, one test suite, one configuration change. A task that would serve one phase in one way and a later phase in another gets split along that line, so a later phase&apos;s enhancement never silently widens an earlier bead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt; come from the plan&apos;s actual technical relationships. Each bead blocks on the specific bead it needs, never on the nearest umbrella. The dependency graph — not a hierarchy — decides what is ready to claim.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The graph is verified before anyone builds against it.&lt;/strong&gt; A fresh agent with no stake in the draft checks three properties independently, in rounds, until a round comes back clean: coverage (every element of the plan has a bead), scoping (every bead is one task), and dependencies (every edge is real, none is missing). A graph can pass any one of those and fail the other two.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;&lt;a href=&quot;/glossary/#genesis-bead&quot;&gt;genesis bead&lt;/a&gt;&lt;/strong&gt; is created last, once the graph has converged. It references the plan document, is blocked on everything, and records whatever the verification rounds deliberately deferred. It is a summary of the structure, not the structure.&lt;/p&gt;
&lt;p&gt;A worker assigned a task bead reads the task bead body, then the plan document it points to — specific first, whole second. By the time it has read both, it knows exactly what it is doing and what the overall project is trying to accomplish. That is also why the task body has to stand on its own: there is no intermediate layer left to carry context the task forgot to state.&lt;/p&gt;
&lt;p&gt;This only works if the plan is coherent enough to decompose. A plan that is vague produces beads that are vague, edges that are guesses, and workers that guess along with them. The failure propagates down; the fix has to start at the top.&lt;/p&gt;
&lt;h2&gt;What has to be in the plan&lt;/h2&gt;
&lt;p&gt;There are several categories of content that make a plan useful to a cold-start worker. Missing any of them degrades the plan proportionally.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scope lock.&lt;/strong&gt; What the system does, stated precisely enough that a worker can determine whether a given change is in scope or out of scope without asking. This is harder to write than it sounds. The failure mode is a scope statement that is technically accurate but vague enough to be consistent with many different implementations — which means every worker is free to pick a different implementation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Acceptance criteria.&lt;/strong&gt; The conditions under which the project is done. Not aspirations (&quot;the system should be fast&quot;) but testable criteria (&quot;p99 response time under 200ms with N concurrent users&quot;). Acceptance criteria are what let the orchestrator evaluate whether a worker&apos;s output counts as success. If the criteria are absent or vague, the orchestrator cannot classify the outcome reliably, and the &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;outcome table&lt;/a&gt; loses a row.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase boundaries.&lt;/strong&gt; Where one phase ends and the next begins, stated as conditions rather than calendar dates. A phase boundary is a checkpoint: the system is in &lt;em&gt;this&lt;/em&gt; state before this phase, and in &lt;em&gt;this&lt;/em&gt; state after. If the boundary is defined as a date, it is almost certainly wrong the moment implementation starts. If it is defined as a condition, it stays true regardless of how long the phase takes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Known unknowns.&lt;/strong&gt; The things you do not know yet, stated explicitly. A plan that does not acknowledge its own uncertainty is pretending to more confidence than it has — and workers will act on that pretended confidence. A plan that says &quot;we do not yet know how to handle the edge case of X; this will be resolved in phase 3&quot; gives workers license to defer the question cleanly rather than improvise an answer that may conflict with what phase 3 eventually decides.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Constraint inventory.&lt;/strong&gt; The fixed points that eliminate solution space: existing interfaces you cannot change, performance budgets you cannot exceed, security requirements you cannot trade away. Constraints are more useful than requirements because they narrow the space of valid implementations without prescribing a specific one. A worker that knows the constraints can make autonomous design decisions within them; a worker that does not know the constraints makes design decisions that may violate them invisibly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rollback plan.&lt;/strong&gt; What happens if phase N fails. Not &quot;we will figure it out&quot; but the actual fallback: which state the system can be safely returned to, which changes are reversible and which are not, what the recovery path is. Workers do not need this to execute normally — they need it to handle the abnormal cases that the orchestrator surfaces.&lt;/p&gt;
&lt;h2&gt;The plan is how you avoid pivoting mid-flight&lt;/h2&gt;
&lt;p&gt;The most expensive thing that can happen to a cattle fleet is not a worker crashing. It is a worker succeeding at the wrong thing — because the plan did not make &quot;the right thing&quot; unambiguous.&lt;/p&gt;
&lt;p&gt;A mid-flight pivot in a pet session costs a turn of conversation. A mid-flight pivot in a cattle fleet costs every task derived from the misunderstanding: the work already done, the retries queued, the downstream tasks that were built on the wrong foundation. The later in the implementation the pivot happens, the more work has to be undone. This is why the plan-review gate exists.&lt;/p&gt;
&lt;p&gt;There is also an asymmetry in how expensive the pivot is depending on what changed. If the plan needed adjustment, the code artifacts can be wholesale deleted and workers restarted from the revised plan. Code is cheap. A well-scoped implementation takes hours for a fleet of workers, not days. The correct response to discovering your plan was wrong is not to patch the existing code — it is to fix the plan, clear the code, and run again. The plan is the expensive artifact; the code is the output.&lt;/p&gt;
&lt;p&gt;This is the rule everything above resolves to: &lt;strong&gt;the plan is the source of truth.&lt;/strong&gt; When the plan and the artifacts disagree, the plan is right by definition, and the artifacts are what gets amended. The direction is not negotiable. Editing the plan to match whatever the code drifted into feels like keeping the document current, but it is laundering a mistake into the source of truth — the next cold-start worker reads the retrofitted plan and treats the drift as intent. You conform the artifacts to the plan, never the plan to the artifacts. The only thing that legitimately changes a plan is a changed &lt;em&gt;decision&lt;/em&gt;, made deliberately — and that change leads the code rather than trailing it.&lt;/p&gt;
&lt;p&gt;This changes what you invest in. You spend the effort on the plan. You spend comparatively little worrying about whether any individual implementation is precious, because it is not — it is reproducible from the plan in a matter of hours.&lt;/p&gt;
&lt;h2&gt;The plan-review gate&lt;/h2&gt;
&lt;p&gt;Before any worker touches the code, the plan goes through &lt;code&gt;/plan-review&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The skill checks 80+ structural patterns across scope, acceptance criteria, architecture, preflight safety, phasing, testing, security, performance, operations, API design, and risk. It was developed from analysis of high-quality planning documents by Jeffrey Emanuel, whose methodology for writing plans that survive contact with implementation influenced how I think about this. The patterns were extracted from what those plans had in common — and, more usefully, from what the plans that failed mid-implementation were missing.&lt;/p&gt;
&lt;p&gt;The most common failure patterns cluster around the same four gaps: no acceptance criteria (workers cannot self-evaluate output), no phase gates (workers do not know when a phase is complete), no rollback plan (failures have no recovery path), and no constraint inventory (workers make design decisions in an unconstrained space and produce incompatible implementations). Plan-review checks for all four explicitly, along with everything else.&lt;/p&gt;
&lt;p&gt;The output of a review is a scorecard with PRESENT / PARTIAL / MISSING ratings for each item, followed by an offer to draft the missing sections. The offer is worth taking. A plan that passes review at 90% is close enough to deploy; a plan at 60% has gaps that will compound across a fleet.&lt;/p&gt;
&lt;p&gt;The skill is available at &lt;a href=&quot;https://github.com/jedarden/jeds-curated-skills&quot;&gt;jedarden/jeds-curated-skills&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;The cost multiplier&lt;/h2&gt;
&lt;p&gt;The math for why plan quality matters more in cattle than in pets is straightforward.&lt;/p&gt;
&lt;p&gt;In a pet session, a plan gap costs one correction: a few seconds of your time, a few tokens, the session absorbs the fix. The cost is O(1).&lt;/p&gt;
&lt;p&gt;In a cattle fleet with N workers, a plan gap costs N failed executions before you notice the pattern. Each failed execution burns its full budget — time, tokens, whatever the worker spent before the orchestrator classified the outcome as failure. The cost is O(N × execution budget). At twenty workers with a per-task budget of 100K tokens, one plan gap that takes two failed iterations to surface costs four million tokens in wasted execution before you see it in the outcome distribution and trace it back to the plan.&lt;/p&gt;
&lt;p&gt;This is not hypothetical. It is the most expensive class of bug in a cattle system — more expensive than a bad prompt, more expensive than a misconfigured model, more expensive than a network issue. Network issues affect individual calls; plan gaps affect every worker on every task derived from the plan.&lt;/p&gt;
&lt;p&gt;The fix is to treat the plan as a first-class artifact with a quality gate, not as a rough sketch you clarify in conversation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;What a plan is not&lt;/h2&gt;
&lt;p&gt;A plan is not a specification. A specification describes every detail of the implementation. A plan describes the decisions that constrain the implementation without prescribing every detail of it. Workers fill in the details; the plan tells them which details are fixed and which are theirs to choose.&lt;/p&gt;
&lt;p&gt;A plan is not a design document. A design document explains &lt;em&gt;how&lt;/em&gt; the system will be built. A plan records &lt;em&gt;what&lt;/em&gt; the system will do and &lt;em&gt;what success looks like&lt;/em&gt;. The how is the worker&apos;s job; the what and the done are the plan&apos;s job.&lt;/p&gt;
&lt;p&gt;A plan is not a changelog. It records the current state of decisions, not the history of how those decisions evolved. A plan that accumulates commentary about why things changed over time is a plan that is getting harder to read with each revision. Keep the plan current and put the history in commit messages.&lt;/p&gt;
&lt;h2&gt;What I&apos;d change&lt;/h2&gt;
&lt;p&gt;Two things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plans should be versioned with the code — and the plan leads.&lt;/strong&gt; The plan lives next to the code it describes, and the two travel together. But &quot;together&quot; has a direction. When the code diverges from the plan — which it always does, in small ways — that divergence is a defect in the code, not a fact to be transcribed into the plan. You amend the artifacts to match the plan in the same commit that surfaces the drift. The plan itself changes only when the &lt;em&gt;decision&lt;/em&gt; changes, and then it changes first: revise the plan, then regenerate the code from it. The habit I want to kill is the reflexive one — editing the plan to describe whatever the implementation drifted into, because that keeps the document looking current while quietly demoting it from source of truth to changelog. The convention is not &quot;plan changes follow code changes.&quot; It is &quot;code changes follow plan changes.&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Staleness should be explicit.&lt;/strong&gt; A plan written at the start of a project is not the same as that plan after six weeks of implementation. When a later phase revises an earlier decision, every section that rested on the old decision is now wrong — and there is a window between making the new decision and propagating it through the document. Today there is no marker for that window: nothing in the plan says &quot;§Architecture still describes the phase-1 decision; phase 3 superseded it, rewrite pending.&quot; There should be. A worker that reads an un-updated section and acts on it produces work that has to be undone. The marker is a stopgap, not a resting state — staleness is a defect in the plan to be closed, not a permanent admission that the code has outrun the document. The goal is always a plan with no stale sections, because the plan is what every worker trusts.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I commit a plan and start creating beads from it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Could a worker who has never spoken to me, reading only this document and the task bead it has been assigned, produce something I would accept on the first try?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Both parts matter. The first — &lt;em&gt;never spoken to me&lt;/em&gt; — rules out plans that rely on context you have accumulated in conversation. The second — &lt;em&gt;on the first try&lt;/em&gt; — rules out plans where success requires multiple iterations to clarify. If the answer is no, the plan is not done. I work on the plan, not the code.&lt;/p&gt;
&lt;p&gt;The workers are ready. The question is whether the inputs are.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Plan methodology: derived from Jeffrey Emanuel&apos;s (&lt;a href=&quot;https://github.com/dicklesworthstone&quot;&gt;@dicklesworthstone&lt;/a&gt;) approach to high-quality planning documents. Plan-review skill: &lt;a href=&quot;https://github.com/jedarden/jeds-curated-skills&quot;&gt;jedarden/jeds-curated-skills&lt;/a&gt;. The orchestration layer this sits on: &lt;a href=&quot;https://github.com/jedarden/NEEDLE&quot;&gt;NEEDLE&lt;/a&gt;. The task structure (genesis beads, phase beads): &lt;a href=&quot;https://github.com/dicklesworthstone/beads_rust&quot;&gt;beads_rust&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>planning</category><category>NEEDLE</category></item><item><title>The unit economics of running cattle</title><link>https://jedarden.com/notes/unit-economics-of-cattle/</link><guid isPermaLink="true">https://jedarden.com/notes/unit-economics-of-cattle/</guid><description>How to make the math work when twenty headless workers are spending money without you. Why the pet model has no built-in cost discipline, what the cattle model requires, and what to measure when tokens are the wrong unit.</description><pubDate>Tue, 05 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The first time I ran headless agents in earnest, I burned through a quarter of my Anthropic monthly limit in three days. I told &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;that story already&lt;/a&gt; as a parable about treating agents as pets. It is also a story about money — and the money story is the one almost nobody plans for before it happens to them.&lt;/p&gt;
&lt;p&gt;The pet model has a hidden cost-control mechanism that nobody designed deliberately and nobody notices until they remove it. The cattle model removes it. If you do not replace it with something explicit before the workers go headless, you find out about the gap at the bottom of an invoice.&lt;/p&gt;
&lt;p&gt;This is the post about the replacement.&lt;/p&gt;
&lt;h2&gt;The pet model&apos;s hidden subsidy&lt;/h2&gt;
&lt;p&gt;When you run a pet agent, you are the spend control. Not metaphorically — literally. The reason your bill stays sane is that your attention is the bottleneck. You can only watch one or two sessions at a time. Each session can only spend money while you are in it. When you walk away from the keyboard, the spending stops because the conversation stops.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is invisible until you scale. As long as the human is in the loop, three things happen automatically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You notice runaways.&lt;/strong&gt; The agent that has been chewing on the same prompt for ten minutes producing nothing is something you see and stop. You do not need a metric for it. You see the spinner.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You pace yourself.&lt;/strong&gt; Token-heavy operations — long context windows, large diffs, tool calls with big outputs — get throttled because &lt;em&gt;you&lt;/em&gt; are the one initiating them. You feel the lag and back off.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You self-throttle on quota.&lt;/strong&gt; When the dashboard creeps up, you slow down. The dashboard is your conscience. The agent has no conscience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of those mechanisms exist in cattle. The agent does not see its own cost. The agent does not see the dashboard. The agent does not get tired. Twenty headless workers running unattended, each invoking expensive tool calls in tight loops, will produce a bill that bears no relationship to the value of the work — unless something between them and the provider says no.&lt;/p&gt;
&lt;p&gt;The pet model&apos;s economics work because the human is the rate-limiter. The cattle model&apos;s economics work because &lt;em&gt;something else&lt;/em&gt; is the rate-limiter. That something else is the actual subject of this post.&lt;/p&gt;
&lt;h2&gt;Tokens are the wrong unit&lt;/h2&gt;
&lt;p&gt;The first instinct, when the bills get scary, is to start counting tokens. Token-counting feels rigorous. The provider exposes per-call usage. You can build dashboards. You can say &quot;this prompt averages 12,000 input tokens, this one averages 40,000&quot; and feel like you are doing the work.&lt;/p&gt;
&lt;p&gt;It is the wrong unit.&lt;/p&gt;
&lt;p&gt;Tokens are an input cost, not an output measurement. A worker that burns 200K tokens to close one bead and a worker that burns 800K tokens to close five beads — the second worker is four times cheaper per outcome, even though it spent four times more on tokens. If you optimize the token line you will end up trimming context windows on the second worker until it stops being able to close beads at all, and you will congratulate yourself on the savings.&lt;/p&gt;
&lt;p&gt;The unit that matters is &lt;strong&gt;cost per closed outcome&lt;/strong&gt;. A bead closed. A test passing. A PR merged and reviewed. The denominator is the work the system actually delivered, not the inputs it consumed getting there. Token cost without an outcome attached is just spend.&lt;/p&gt;
&lt;p&gt;This is harder to measure. It requires the orchestrator to &lt;em&gt;know&lt;/em&gt; when a worker produced a real outcome — which is the same exhaustive-handler discipline from the &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;previous post&lt;/a&gt; showing up in a different form. If your state machine cannot tell success from failure, it cannot tell expensive-but-productive from expensive-and-wasted, and you will optimize the wrong column.&lt;/p&gt;
&lt;p&gt;The orchestrator that classifies outcomes is also the orchestrator that can compute outcome cost. They are the same machine, doing the same work, for two reasons.&lt;/p&gt;
&lt;h2&gt;Cost governance is its own component&lt;/h2&gt;
&lt;p&gt;Once you accept that the human cannot be the spend control, the question becomes: where does the spend control live?&lt;/p&gt;
&lt;p&gt;It does not live in the worker. The worker is fungible by design — and a worker that polices its own budget is not fungible, because some workers will refuse work that other workers would accept. It does not live in the provider, because providers are happy to sell you whatever you will buy. It does not live in the orchestrator, because the orchestrator&apos;s job is to dispatch work, not to mediate the financial contract with each provider.&lt;/p&gt;
&lt;p&gt;It lives in a dedicated component that sits beside the fleet rather than inside it — one that watches the subscription windows and decides how many workers are allowed to exist. In a cattle system the throttle isn&apos;t a per-request limit. It&apos;s headcount. Three jobs:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Forecast the window.&lt;/strong&gt; Subscription plans meter usage in windows — five-hour, weekly. The governor polls where each window stands, learns how fast each worker actually burns it, and projects whether the current fleet will exhaust the window before it resets. The question is never &quot;how much have we spent&quot; but &quot;at this rate, do we hit the wall before the clock does&quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set the headcount.&lt;/strong&gt; When the forecast says the window runs out early, the fleet shrinks; when capacity will be left on the table at reset, it grows. Scaling down retires idle workers first, so a busy one is touched only when there aren&apos;t enough idle ones to cover the cut — and a hard brake drops the fleet to zero if any window crosses 98%, because hitting the provider&apos;s ceiling is the bad failure mode. You hit your own ceiling first.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Price the work.&lt;/strong&gt; Every token the fleet burns is converted to what it would have cost at API list price, per model, including cache reads and writes. A subscription hides marginal cost; the governor puts it back, which is what makes cost per outcome computable at all.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/jedarden/claude-governor&quot;&gt;claude-governor&lt;/a&gt; is what this looks like in my setup. It is unromantic plumbing — a Rust daemon on a five-minute loop: an observe side that polls Claude Code&apos;s usage endpoint and collects token counts, and an act side that launches or retires NEEDLE workers per subscription pool, within each pool&apos;s floor and ceiling. There is nothing clever about it. The cleverness is that the workers do not know it exists. No worker checks a budget, and no worker can refuse work on cost grounds — they stay fungible. The policy lives entirely in how many of them are running.&lt;/p&gt;
&lt;h2&gt;Run a portfolio, not a provider&lt;/h2&gt;
&lt;p&gt;There are two pricing models in this market and they do completely different things to your unit economics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Subscriptions&lt;/strong&gt; (Anthropic Max, &lt;a href=&quot;http://Z.AI&quot;&gt;Z.AI&lt;/a&gt; Max) cap your downside. You pay a fixed amount per month, you get a quota window, and if you exceed it you get cut off — not charged more. The cost per outcome is bounded above. The downside is bounded; the upside is bounded too. Subscriptions are how you fund sustained throughput, the steady drumbeat of cattle work that runs every hour of every day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Metered API&lt;/strong&gt; caps nothing. You pay for what you use. There is no ceiling. A bug in your retry loop can turn into a five-figure invoice overnight if nothing is bounding how much work is running. The upside is real — metered access is how you handle bursts, spikes, one-off batches that exceed the subscription window without burning the next week&apos;s quota. The downside is unbounded. You only run metered traffic with a hard cap on how many workers can draw on it, no exceptions.&lt;/p&gt;
&lt;p&gt;A healthy fleet runs both. The subscription is the floor — committed throughput at a known cost. The metered API is the surge capacity. The orchestrator does not care which is which. Each subscription and the metered pool is its own worker pool with its own floor and ceiling. The governor adds workers to the cheapest pool first, and when it has to shrink, it sheds the pools that delivered the fewest verified closures per dollar — headcount shifting as each window&apos;s forecast moves.&lt;/p&gt;
&lt;p&gt;The mistake I have watched people make repeatedly is going all-in on metered API &quot;for flexibility.&quot; You get the flexibility. You also get a cost structure that scales linearly with how aggressive your retry policy is, which is exactly the wrong elasticity to give an autonomous fleet.&lt;/p&gt;
&lt;h2&gt;Quota observability is asymmetric&lt;/h2&gt;
&lt;p&gt;The governor needs to know how much you have spent against each window. This sounds trivial. It is not, because the providers expose this information unevenly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anthropic exposes the usage of each window — five-hour and weekly — through an endpoint the governor polls. It knows where it is in every window and sizes the fleet accordingly. You can build proper closed-loop control because the loop has a sensor.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://Z.AI&quot;&gt;Z.AI&lt;/a&gt; exposes nothing programmatic. There is no quota endpoint. There are no rate-limit headers. The only place you can see your usage is the web dashboard, which is fine for a human checking in once a day and useless for a process that needs to make a decision every second. The governor is flying blind on &lt;a href=&quot;http://Z.AI&quot;&gt;Z.AI&lt;/a&gt; quota — until the wall, when the API starts returning rate-limit errors and you reverse-engineer what just happened.&lt;/p&gt;
&lt;p&gt;The fix is to model your own quota independently. Measure outflow yourself, count it against your own ledger, and treat &lt;em&gt;that&lt;/em&gt; as the source of truth — not what the provider reports, because the provider may not report at all. &quot;You are out of quota&quot; should be a fact your governor knows before the provider tells you, because the only signal the provider gives some of these subscriptions is the failure itself.&lt;/p&gt;
&lt;p&gt;This is more work than it should be. It is the cost of operating against providers whose business model has not yet caught up with the operational needs of customers running unattended fleets. It will get better. Until then, the governor&apos;s quota model is a thing you maintain by hand.&lt;/p&gt;
&lt;h2&gt;The cheap-restart reflex&lt;/h2&gt;
&lt;p&gt;The pet operator has one cost-control reflex that the cattle operator should preserve and amplify: when a worker is stuck, kill it.&lt;/p&gt;
&lt;p&gt;In the pet model this is intuitive. You see the agent thrashing, you stop it, you start over. The cost of the restart is small. The cost of letting it grind for another five minutes is large.&lt;/p&gt;
&lt;p&gt;In the cattle model the same reflex is correct, but the operator cannot apply it manually because the operator is not watching. The reflex has to be built into the orchestrator. Three bounds, enforced at the worker level:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time-bounded executions.&lt;/strong&gt; A worker that has been running on the same task for longer than the budget gets killed. The handler is the timeout handler from the &lt;a href=&quot;/notes/deterministic-state-machines-for-agents/&quot;&gt;previous post&lt;/a&gt; — release the task, mark deferred, loop. No appeal. No &quot;but it might be making progress.&quot; Long-tail tasks are almost always stuck tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Token-bounded executions.&lt;/strong&gt; A worker that has emitted more than N tokens of output on a single task gets killed. Most real outcomes fit comfortably in a budget. The ones that exceed it are usually agents in some kind of loop — emitting the same diff over and over, retrying the same failing tool call, repeating themselves with minor variations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Iteration-bounded executions.&lt;/strong&gt; A worker that has invoked the model more than N times on a single task gets killed. This catches the case the previous two miss: a worker that produces small, fast, expensive calls in tight succession. None of them individually trips the time or token bounds. The count does.&lt;/p&gt;
&lt;p&gt;These three bounds together convert &quot;the worker decides when to stop&quot; into &quot;the orchestrator decides when to stop.&quot; Which is the only correct allocation of that decision in a cattle system, because the worker has no skin in the game and the orchestrator has all of it.&lt;/p&gt;
&lt;p&gt;A worker killed early might have been about to succeed. That is fine. The task goes back on the queue, gets picked up by another worker, possibly with a different prompt or a different model, and tries again. The cost of a wasted execution is a single bounded run. The cost of an unwasted runaway is unbounded.&lt;/p&gt;
&lt;p&gt;Cheap restart, every time.&lt;/p&gt;
&lt;h2&gt;What I&apos;d change&lt;/h2&gt;
&lt;p&gt;Three things, in order of how often I think about them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Outcome cost should be a first-class metric, not a derived one.&lt;/strong&gt; Today I compute cost per closed bead by joining provider invoices to the orchestrator&apos;s outcome log after the fact. It works but it is asynchronous — I find out about expensive failures after they have already happened. The governor already prices every token as it is collected. The orchestrator already knows what task each call belonged to. The metric should be emitted live: this bead just closed, here is what it cost, here is whether that is in line with the historical distribution. If it is an outlier, alert immediately. Part of this has landed since I first wrote it: the governor now reads a ledger of verified closures per adapter, and when it has to shrink the fleet, the pools that bought the fewest closures per dollar go first. The live per-bead alert is still missing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Per-task budgets should be configurable, not fleet-wide constants.&lt;/strong&gt; Right now the time / token / iteration bounds are global. Some tasks legitimately want bigger budgets — a complex refactor across many files genuinely needs more space than a one-line fix. The bead should declare its budget. The orchestrator should enforce it. Today everything gets the same budget and I either set it too low for hard tasks or too high for easy ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The governor should expose its policy decisions as a stream.&lt;/strong&gt; When the governor shrinks the fleet from eight workers to three, the visible effect is just fewer workers. Its state file records the current target, but not the history of &lt;em&gt;why&lt;/em&gt; — which window, what forecast, what headroom it believed it had at the time. When you go to debug &quot;why did the fleet&apos;s throughput drop in this hour,&quot; the governor&apos;s reasoning is opaque. It should not be. Every policy decision the governor makes — scaled down, scaled up, braked, shifted to another pool — should be a structured event that the observability stack can query.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I run any new workload on the cattle pipeline, I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is each dollar of spend supposed to produce, and how would I know if it didn&apos;t?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Both halves matter. The first half forces you to attach a denominator to the spend — you are not buying tokens, you are buying outcomes. The second half forces you to instrument the answer — if you cannot tell whether the spend produced the outcome, you cannot govern it. You are just hoping.&lt;/p&gt;
&lt;p&gt;The pet model lets you skip both halves because your attention substitutes for both. You see the outcome (or its absence) directly. You see the spend (or its absence) directly. The cattle model takes both signals away from you and forces you to rebuild them in the orchestrator and the governor — explicitly, before the workers go live.&lt;/p&gt;
&lt;p&gt;If you have not built that, you do not have a cattle system. You have a pet system with the supervision removed, which is a different thing. It looks the same right up until the bill arrives.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;If you want to see the governor side: &lt;a href=&quot;https://github.com/jedarden/claude-governor&quot;&gt;claude-governor&lt;/a&gt; is the Rust daemon described here. The fleet side — workers, state machine, outcome handling — is &lt;a href=&quot;https://github.com/jedarden/NEEDLE&quot;&gt;NEEDLE&lt;/a&gt;. Together they bound the system from both ends: NEEDLE decides what work to do; claude-governor decides how many workers may do it.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated October 3, 2026: corrected how the governor works. An earlier version described it as a request proxy holding the API key; it governs worker headcount against subscription windows instead, and never sits in the request path.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>cost</category><category>claude-governor</category></item><item><title>Deterministic state machines for non-deterministic agents</title><link>https://jedarden.com/notes/deterministic-state-machines-for-agents/</link><guid isPermaLink="true">https://jedarden.com/notes/deterministic-state-machines-for-agents/</guid><description>Why agent orchestration needs explicit outcome handlers. The control structure that lets twenty headless workers run unattended without the operator becoming the loop.</description><pubDate>Mon, 04 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A worker crashes mid-task. A model-provider rate-limit kicks in for nine minutes. Two workers race for the same task and one of them loses. The agent finishes successfully but produces output that doesn&apos;t compile. Same workspace, same hour, four different outcomes — and zero of them are &lt;em&gt;wrong&lt;/em&gt;. They are exactly the outcomes a long-running headless agent fleet should expect.&lt;/p&gt;
&lt;p&gt;The question is not how to prevent any of those. The question is what happens &lt;em&gt;after&lt;/em&gt; each one.&lt;/p&gt;
&lt;p&gt;If your answer is some flavor of &quot;I&apos;ll go look,&quot; you are still running &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;pets&lt;/a&gt;. The cattle model needs an answer that does not involve a person — and the answer has to be defined &lt;em&gt;before&lt;/em&gt; the outcome, not improvised after it.&lt;/p&gt;
&lt;p&gt;This is the post about that answer.&lt;/p&gt;
&lt;h2&gt;The shape of the problem&lt;/h2&gt;
&lt;p&gt;Existing agent orchestration tools cluster into two shapes. Neither one quite fits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conversational frameworks&lt;/strong&gt; — LangGraph, AutoGen, CrewAI. These assume a chat loop with a human-in-the-loop or another LLM, and they are good at that. They are bad at sustained autonomous work because the entire abstraction is &lt;em&gt;the conversation&lt;/em&gt;. When the conversation ends, the abstraction ends. Recovering from a crash means starting over and hoping the new conversation lands in roughly the same place. Failure modes are vague — &quot;the agent went off the rails&quot; — because the framework never modeled what &quot;the rails&quot; were.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workflow engines&lt;/strong&gt; — Temporal, Argo Workflows, Inngest. These are excellent at deterministic step orchestration. They assume each step is code that you wrote, that produces a known shape of output, and that fails in known ways. Plug a non-deterministic agent into a Temporal workflow and the type system gives up: the agent&apos;s output is a &lt;code&gt;string&lt;/code&gt;, the failure mode is &quot;any exception with any message,&quot; and the workflow&apos;s retry logic cannot tell a transient rate-limit from a logic bug from &quot;the agent gave up.&quot;&lt;/p&gt;
&lt;p&gt;The missing middle is a &lt;strong&gt;deterministic state machine that drives non-deterministic agents.&lt;/strong&gt; The orchestrator is rigid; the worker is fuzzy. The orchestrator&apos;s job is to enumerate every shape the fuzziness can produce and route each shape to a known handler. The agent&apos;s job is to produce one of those shapes.&lt;/p&gt;
&lt;p&gt;NEEDLE is the shape this idea takes when you write it down. The rest of this post is what falls out.&lt;/p&gt;
&lt;h2&gt;The thesis&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;If an outcome can happen, it has a handler.
If it doesn&apos;t have a handler, it cannot happen.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Every state transition in NEEDLE has an explicit handler. There are no implicit fallbacks. There is no &lt;code&gt;match _ =&amp;gt; continue&lt;/code&gt;. There is no &quot;swallow the error, log a warning, hope nobody notices.&quot;&lt;/p&gt;
&lt;p&gt;This sounds like a small constraint. It is the largest constraint in the system, and almost everything else falls out of it.&lt;/p&gt;
&lt;h2&gt;What this looks like in practice&lt;/h2&gt;
&lt;p&gt;A NEEDLE worker is a loop that executes six steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;SELECT&lt;/strong&gt; — query the bead queue for the next claimable task in deterministic priority order.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CLAIM&lt;/strong&gt; — atomically claim the task via a SQLite transaction. Exactly one worker wins.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BUILD&lt;/strong&gt; — construct the prompt from the task definition. Same task → same prompt, every time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DISPATCH&lt;/strong&gt; — load the agent adapter (Claude Code, OpenCode, Codex, Aider, anything CLI) and invoke it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EXECUTE&lt;/strong&gt; — wait for the agent to exit. The only inputs the orchestrator gets back are the exit code and what was written to disk.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OUTCOME&lt;/strong&gt; — classify what happened. Run the handler. Loop.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The first five steps are mechanical. Almost any orchestration framework can do them. The whole game is in step six.&lt;/p&gt;
&lt;p&gt;Here is the OUTCOME table for one NEEDLE iteration:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Outcome&lt;/th&gt;
&lt;th&gt;Detection&lt;/th&gt;
&lt;th&gt;Handler&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Success&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;exit code &lt;code&gt;0&lt;/code&gt;, output validates&lt;/td&gt;
&lt;td&gt;close the task, log effort, loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Failure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;exit code &lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;log failure reason, release the task, increment retry count, loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timeout&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;exit code &lt;code&gt;124&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;release the task, mark deferred, loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Crash&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;exit code &lt;code&gt;&amp;gt;128&lt;/code&gt; (SIGKILL, SIGSEGV, etc.)&lt;/td&gt;
&lt;td&gt;release the task, create an alert task, loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Race lost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;claim transaction returned no row&lt;/td&gt;
&lt;td&gt;exclude this candidate, retry SELECT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Queue empty&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;no claimable tasks&lt;/td&gt;
&lt;td&gt;enter strand escalation: search other workspaces, do cleanup, alert if all strands exhausted&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Six rows. Every row has a handler. Every row was added because the absence of a handler caused a real bug.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A few of those rows are worth dwelling on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Race lost is its own outcome, not a failure.&lt;/strong&gt; Two workers see the same top-priority task, both try to claim it, exactly one wins. The loser is not broken. It just needs to skip that task and try the next one. If you don&apos;t model &quot;race lost&quot; as a first-class outcome, you end up with workers that retry endlessly on tasks they will never claim — or worse, with workers that crash with cryptic SQLite errors and get auto-replaced by an outer supervisor that has no idea what just happened.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Queue empty is its own outcome, not idle time.&lt;/strong&gt; When a worker has nothing to do, that is a &lt;em&gt;signal&lt;/em&gt;, not a non-event. It means: this workspace is exhausted, look elsewhere. NEEDLE has a &lt;a href=&quot;/glossary/#strand-escalation&quot;&gt;strand escalation&lt;/a&gt; sequence for this — search other workspaces, do cleanup, propose alternatives for blocked tasks, etc. — but none of that runs unless &quot;queue empty&quot; is a recognized outcome that triggers it. A worker that just spins on an empty queue is wasting cycles and obscuring the signal that the queue is empty.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Crash is distinct from failure.&lt;/strong&gt; A failure is the agent saying &quot;I tried and produced nothing useful.&quot; A crash is the agent dying without saying anything. They look superficially similar. They require different handlers: a failure increments a retry count and tries again; a crash creates an alert and may indicate something fundamentally wrong (the agent binary isn&apos;t installed, the workspace is corrupted, the model provider is rejecting all requests). Conflating them is the difference between a system that self-heals and a system that thrashes.&lt;/p&gt;
&lt;h2&gt;What it costs&lt;/h2&gt;
&lt;p&gt;The deterministic state machine is not free. The cost shows up in three places.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Up-front enumeration.&lt;/strong&gt; You have to sit down and think through every shape your worker can produce. This is harder than it sounds. The natural state of any human-built system is &quot;I&apos;ll add the handler when the bug actually happens&quot; — which works fine for human-supervised work and is actively dangerous for unattended fleets. The first month of NEEDLE was mostly me producing new outcome rows because the system kept finding outcomes I hadn&apos;t thought to enumerate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Discipline against &lt;code&gt;match _&lt;/code&gt;.&lt;/strong&gt; Rust makes this discipline visible: a non-exhaustive match is a compiler error. Languages without exhaustiveness checks make it tempting to write a wildcard handler that does &lt;em&gt;something reasonable&lt;/em&gt;. Wildcards are how state machines silently grow undefined behavior. The rule has to be: when a new outcome shows up, you stop, you name it, you give it a row in the table, and you write its handler. You do not add it to the wildcard.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Schema-first, not caller-first.&lt;/strong&gt; When you discover a new outcome, you do not patch the call site. You go back to the type that represents the outcome and add a variant. Then the compiler tells you everywhere else that needs to handle the new variant. This is more friction than the alternative — but the alternative is an outcome enum that drifts from reality, with handlers that quietly stop being called.&lt;/p&gt;
&lt;h2&gt;What it&apos;s worth&lt;/h2&gt;
&lt;p&gt;In exchange you get three things that are not available under any other model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workers fail predictably.&lt;/strong&gt; Predictable failure is the foundation of recovery. A worker that returns garbage in a &lt;em&gt;known&lt;/em&gt; failure mode — exit code 1, log line in a known format — is more useful than a worker that silently returns subtly-wrong output. The orchestrator can route the known failure; it has no leverage on the silent corruption. Designing for predictable failure means refusing to wallpaper over the failures you cannot classify, and instead either learning to classify them or rejecting the work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The state machine is the contract; agents are the implementation.&lt;/strong&gt; This is the property that lets NEEDLE be agent-agnostic. The state machine doesn&apos;t know whether the worker is Claude Code, OpenCode, Codex, or Aider. It knows that the worker is something that takes a prompt and produces an exit code. Add a new agent and you add a YAML adapter file — no code changes. Drop a worse agent and replace it with a better one — same. The agents are &lt;em&gt;parts&lt;/em&gt;; the state machine is the &lt;em&gt;machine&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can run twenty of these and reason about what the herd is doing.&lt;/strong&gt; Twenty pet agents are unreasonable. Twenty deterministic state machines, each running the same six-step loop, are reasonable. You stop debugging individual workers and start debugging the &lt;em&gt;outcome distribution&lt;/em&gt; — which row of the table is firing more often than it should? When the failure column trends up, you know to look at the prompts. When the timeout column trends up, you know to look at the model provider. The state machine made each worker&apos;s behavior legible enough that the fleet&apos;s behavior is also legible.&lt;/p&gt;
&lt;h2&gt;What I&apos;d change&lt;/h2&gt;
&lt;p&gt;Three things, with the benefit of running this in production for a while.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Outcome classification should be richer than exit codes.&lt;/strong&gt; Exit codes are a 0–255 alphabet. They are too coarse to express the difference between &quot;agent gave up gracefully&quot; and &quot;agent gave up because the rate-limiter hit it.&quot; Right now NEEDLE squints at stderr to disambiguate. If I rebuilt today, I would have agent adapters return a structured outcome envelope (JSON to a known sentinel path, or a stdout marker) instead of relying on exit codes alone. Exit codes would be the fallback when the envelope is missing. &lt;em&gt;(October: this is happening. Two of the three new outcomes above cannot be read from an exit code at all — gate unsatisfiable is assigned from the gate&apos;s own report, provider error from the agent&apos;s event stream.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Strand escalation should be a separate state machine.&lt;/strong&gt; &quot;Queue empty&quot; routes to a sequence of fallback behaviors — search other workspaces, do cleanup, propose alternatives, alert if exhausted. Today that sequence is a function inside the OUTCOME handler for queue-empty. It really wants to be its own state machine with its own outcome table. Whenever a section of code starts growing its own enum of &quot;what happened,&quot; that is the system asking for a state machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Determinism in the orchestrator does not buy determinism in outcomes.&lt;/strong&gt; Two NEEDLE workers running the same task will produce different outputs because the agent is non-deterministic. That is by design. But it means &lt;em&gt;replaying the orchestration&lt;/em&gt; against a recorded outcome stream is not the same as replaying the work. If I rebuilt today, I would separate &quot;orchestration replay&quot; (deterministic) from &quot;work replay&quot; (impossible without the agent), and design the recording format to make the first kind of replay easy.&lt;/p&gt;
&lt;h2&gt;Five months later: six rows became nine&lt;/h2&gt;
&lt;p&gt;The table above is the one I published in May, and it was already a simplification: NEEDLE had separate rows for an agent binary that isn&apos;t there (exit 126/127) and an agent that was interrupted (130/143), which I folded into Failure and Crash for the post. What has happened since is the more interesting part. Three new outcomes and one new worker state, and every one arrived the way this note says they should — as a bug that had been hiding inside a row that was too broad.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Outcome&lt;/th&gt;
&lt;th&gt;Was hiding inside&lt;/th&gt;
&lt;th&gt;The bug that earned the row&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gate error&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Failure&lt;/td&gt;
&lt;td&gt;A verification gate that could not run at all — missing directory, permission denied, its own timeout — scored the same as work that failed verification. The bead took the blame for the gate. Now it is released without counting against the work.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gate unsatisfiable&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Failure&lt;/td&gt;
&lt;td&gt;A gate that ran, failed, and would fail for &lt;em&gt;any&lt;/em&gt; possible work. A repository with no upstream configured failed the shipped-work check on every dispatch, and NEEDLE read each failure as &quot;this task is too big&quot; and split it. &lt;a href=&quot;https://github.com/jedarden/NEEDLE/issues/18&quot;&gt;One bead became seven in seventy seconds&lt;/a&gt;, while the code on disk was correct and passing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Provider error&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Whatever the exit code said&lt;/td&gt;
&lt;td&gt;The provider failed, so no verdict on the work exists. One GLM attempt logged fifteen API errors and a 613-second single response; the gateway in front of it had restarted thirteen times that hour. An attempt that fought a dead proxy for twenty-five minutes was indistinguishable from one that thought for twenty-five minutes.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;And one new state, &lt;strong&gt;admission blocked&lt;/strong&gt;: a worker whose launch would push the host past its CPU or memory policy does not start. It stays resident, retries with backoff, and its heartbeat explicitly does not read as idle — because a fleet that keeps launching onto an overloaded host eventually takes the host down with it, and mine did, repeatedly, before this state existed.&lt;/p&gt;
&lt;p&gt;Notice what the three outcomes have in common: each one separates &lt;em&gt;the work failed&lt;/em&gt; from &lt;em&gt;something around the work failed&lt;/em&gt;. That distinction turned out to be the one that matters most, because every downstream handler — retry, split, quarantine, blame — keys on it. Conflate the two and the orchestrator punishes correct work for a broken gate or a dead provider, at machine speed.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I add an outcome handler — before I add any new state to a NEEDLE-like system — I ask:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What outcome am I making explicit, and what was my system doing about it before?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer to the second part is &quot;nothing, it was hidden in a wildcard,&quot; that is the bug I am fixing. If the answer is &quot;it was conflated with a different outcome,&quot; that is also a bug. If the answer is &quot;I am inventing this outcome to handle a hypothetical,&quot; I do not add it. The state machine grows by &lt;em&gt;making implicit outcomes explicit&lt;/em&gt;, not by adding speculative variants.&lt;/p&gt;
&lt;p&gt;This is dual to the cattle question from the last post: &lt;em&gt;can a stateless headless worker complete this with only the inputs I write down?&lt;/em&gt; Together they bound the design space:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cattle says: the &lt;em&gt;agent&lt;/em&gt; must be replaceable.&lt;/li&gt;
&lt;li&gt;State machine says: the &lt;em&gt;orchestrator&lt;/em&gt; must be exhaustive.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Either alone is a tarpit. Cattle without a state machine is a fleet of identical workers all failing in mysterious ways. A state machine without cattle is a beautiful enum that one operator hand-runs forever.&lt;/p&gt;
&lt;p&gt;The combination is the system that runs unattended.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Background: &lt;a href=&quot;/notes/agents-pets-cattle/&quot;&gt;Pet agents vs. cattle agents&lt;/a&gt; — the mental-model shift this post sits on top of. Code: &lt;a href=&quot;https://github.com/jedarden/NEEDLE&quot;&gt;NEEDLE&lt;/a&gt; — the deterministic state machine described here, in Rust.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>NEEDLE</category><category>state-machines</category></item><item><title>Pet agents vs. cattle agents</title><link>https://jedarden.com/notes/agents-pets-cattle/</link><guid isPermaLink="true">https://jedarden.com/notes/agents-pets-cattle/</guid><description>The infrastructure metaphor that decided how I build with LLMs. Why most people are running pets, why pets do not scale, and what cattle actually require.</description><pubDate>Sun, 03 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When I started running multiple LLM agents in parallel, I burned through a quarter of my Anthropic monthly limit in three days because I was nursing each one. Restarting the long ones when they went off the rails. Hand-curating context windows. Crafting bespoke system prompts. Watching specific sessions like a worried parent.&lt;/p&gt;
&lt;p&gt;The waste was not the tokens. The waste was the model in my head.&lt;/p&gt;
&lt;p&gt;I was treating my agents the way ops teams treated servers in 2008: as &lt;strong&gt;pets&lt;/strong&gt;. Named, hand-tuned, irreplaceable. Each one a small individual project of mine. The day I stopped doing that — the day I started treating agents as &lt;strong&gt;cattle&lt;/strong&gt; — was the day they actually started doing useful work at scale.&lt;/p&gt;
&lt;p&gt;This is the framing decision that sits underneath every other technical choice I make about LLMs in production. It pre-dates the architecture decisions. It pre-dates the framework picks. It is, more than any individual tool, what separates &quot;interesting demo&quot; from &quot;system that runs unattended.&quot;&lt;/p&gt;
&lt;h2&gt;The metaphor&apos;s origin&lt;/h2&gt;
&lt;p&gt;Bill Baker, an engineer at Microsoft, popularized &quot;pets vs. cattle&quot; sometime around 2012 to describe the shift from artisanal server management to fleet-scale operations. The pet was the box you named after a Norse god, ssh&apos;d into to fix manually, panicked about when it went down. The cow was the AMI you spun up in an autoscaling group, terminated without ceremony when it misbehaved, and replaced from the same template five seconds later.&lt;/p&gt;
&lt;p&gt;The shift the industry made — from pets to cattle — was not primarily about scale. It was about &lt;em&gt;amortizing the cost of operating things&lt;/em&gt;. You cannot afford to know every server&apos;s name when you have ten thousand of them. The cattle model says: build the inputs, build the lifecycle, observe the outputs, and stop investing in any individual instance.&lt;/p&gt;
&lt;p&gt;LLM agents in 2025 are sitting roughly where servers sat in 2010. Most people are running pets. The cattle model exists, but it requires more infrastructure than most teams have built yet, and the framing has not made it into the public conversation.&lt;/p&gt;
&lt;h2&gt;What pet agents look like&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You probably already know whether you are running pets, but the symptoms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You have a long-lived chat session you have spent hours curating context for, and you actively mourn the day you have to start a new one.&lt;/li&gt;
&lt;li&gt;You hand-tune a system prompt for a specific task, then never reuse it on a different task because it would not transfer.&lt;/li&gt;
&lt;li&gt;When the agent goes off the rails mid-task, you intervene. You re-prompt. You correct. You steer.&lt;/li&gt;
&lt;li&gt;You measure success by the quality of any &lt;em&gt;one&lt;/em&gt; output, not the throughput of the system.&lt;/li&gt;
&lt;li&gt;You are the orchestrator. The agent is the worker. Both jobs cost your attention.&lt;/li&gt;
&lt;li&gt;The cost of failure is high enough that you avoid letting it run unsupervised.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pet agents are not bad. They are the right tool for high-judgment, one-off, exploratory work. The bug fix you cannot describe well enough for autonomous work. The design conversation that benefits from a back-and-forth. Anything where the &lt;em&gt;value&lt;/em&gt; of the output justifies the cost of your attention.&lt;/p&gt;
&lt;p&gt;The trap is using pet agents for work that is bulk, repetitive, or asynchronous. That is where the model breaks.&lt;/p&gt;
&lt;h2&gt;What cattle agents look like&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The cattle model has a few non-negotiable properties:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Headless.&lt;/strong&gt; The agent does not chat. It receives a prompt, does work, exits. The exit code and the diff it produced are the entire interface. There is no human in the loop during the run.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stateless.&lt;/strong&gt; Each invocation reconstructs its own context from durable inputs. Same task, same context, same prompt — every time. If the worker dies mid-run, another worker starts the same task fresh from the same state. No &quot;resuming&quot; a session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Replaceable.&lt;/strong&gt; Workers are anonymous. Identified by NATO-alphabet identifiers (&lt;code&gt;alpha&lt;/code&gt;, &lt;code&gt;bravo&lt;/code&gt;, &lt;code&gt;charlie&lt;/code&gt;) — interchangeable enough that the names are deliberately content-free. When a worker fails, you do not investigate that worker. You investigate the task it was working on, then dispatch another worker.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Observed at the herd level.&lt;/strong&gt; You do not look at individual sessions. You look at fleet metrics: tasks completed per hour, cost per task, failure rate by category, queue depth. The unit of analysis is the herd, not the cow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Governed at the fleet level.&lt;/strong&gt; Spend caps, rate limits, weekly quotas — all enforced at the orchestrator, not the agent. No agent can spend more than the herd is allowed to spend, regardless of what the agent decides to do.&lt;/p&gt;
&lt;p&gt;Concretely, this is what NEEDLE does. A worker is a tmux session running a deterministic state-machine loop: select the next task from a shared queue, claim it atomically, build the prompt from the task definition, dispatch to a headless CLI (Claude Code, OpenCode, Codex, Aider — agent-agnostic), wait for an exit code, classify the outcome, handle it, loop. The agent does the fuzzy work; the orchestrator handles every other dimension.&lt;/p&gt;
&lt;p&gt;It is unromantic on purpose. The agent is a black box that produces work; the orchestration is the part you can reason about.&lt;/p&gt;
&lt;h2&gt;What you give up&lt;/h2&gt;
&lt;p&gt;Treating agents as cattle has real costs. Anyone who tells you otherwise has not actually run them this way:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You give up the warm context.&lt;/strong&gt; A pet session, after an hour of back-and-forth, has accumulated a lot of nuance: corrections you made, dead ends you ruled out, preferences you taught it. Cattle agents start cold, every time. Whatever you have not encoded into the &lt;em&gt;task definition&lt;/em&gt; is gone.&lt;/p&gt;
&lt;p&gt;This forces you to write task definitions seriously. The work that used to live in your conversation history now has to live in the bead, the prompt template, the reference docs. It is more discipline up front and less recovery in the moment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You give up the moment-to-moment steering.&lt;/strong&gt; When a pet agent starts heading the wrong way, you stop it. Cattle agents finish the wrong way. They produce a bad output, the orchestrator classifies it as failure, the task gets retried — possibly with the same wrong approach, possibly with a different worker that happens to be configured differently.&lt;/p&gt;
&lt;p&gt;This forces you to be explicit about &lt;em&gt;what wrong looks like&lt;/em&gt;. Acceptance criteria become real artifacts, because the orchestrator needs to evaluate them automatically. &quot;I will know it when I see it&quot; is not a thing cattle can implement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You give up the artisan&apos;s pride.&lt;/strong&gt; Each pet session has the satisfying texture of &quot;we built this together, you and the agent.&quot; Cattle is fungible by design. You stop having a relationship with any specific worker. You only have a relationship with the throughput of the system.&lt;/p&gt;
&lt;p&gt;This is the part most people resist hardest. It is genuinely a loss.&lt;/p&gt;
&lt;h2&gt;What you cannot have without cattle&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In exchange, you get three things that are simply not available in the pet model:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Parallelism.&lt;/strong&gt; I have run twenty NEEDLE workers concurrently on the same workspace. They coordinate through atomic claims on a shared bead queue (a SQLite transaction means exactly one worker wins any given claim — though atomic claims turned out to be necessary rather than sufficient: &lt;a href=&quot;/notes/what-breaks-at-twenty-agents/#7-the-claims-that-leak&quot;&gt;a claim can outlive its worker, and a sweep that releases it too eagerly hands one task to two workers&lt;/a&gt;). I cannot manage twenty pet agents. Nobody can. The pet model has a hard ceiling around three or four sessions before the human becomes the bottleneck.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost governance.&lt;/strong&gt; When I had pet agents, I was the spend control. I noticed when one was running long and stopped it. I noticed when one was being expensive and intervened. With twenty headless workers running unattended, I cannot be the spend control — the orchestrator has to be. claude-governor caps spend, throttles workers, and gates against weekly Anthropic limits. None of that is meaningful in a pet model because the pet has only one operator and that operator is paying attention.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Failure as a normal mode.&lt;/strong&gt; A pet session &quot;failing&quot; is a small disaster. You console yourself, restart, try to recover the context. A cattle worker failing is &lt;em&gt;expected&lt;/em&gt;. The orchestrator has an explicit handler for every outcome a worker can produce — success, failure, timeout, crash, race-lost, queue-empty. None of those is exceptional. Each has a defined recovery path. Workers fail constantly; the system does not.&lt;/p&gt;
&lt;p&gt;This last point is the one I underestimated longest. In a pet model, failure is the thing you try to avoid. In a cattle model, failure is just one more outcome the orchestrator routes. You stop optimizing for &quot;agents that don&apos;t fail&quot; and start optimizing for &quot;an orchestrator that handles failures cleanly.&quot; That second target is much more tractable.&lt;/p&gt;
&lt;h2&gt;The honest tradeoff&lt;/h2&gt;
&lt;p&gt;This is not a story where one model wins. They are tools for different shapes of work.&lt;/p&gt;
&lt;p&gt;Pets are right when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The task requires high-judgment back-and-forth.&lt;/li&gt;
&lt;li&gt;The unit of value is one specific output, not throughput.&lt;/li&gt;
&lt;li&gt;You cannot fully specify success in advance.&lt;/li&gt;
&lt;li&gt;The cost of getting it wrong is high enough to justify your attention.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cattle are right when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The work is bulk, queueable, asynchronous.&lt;/li&gt;
&lt;li&gt;Success is specifiable enough that the orchestrator can classify outcomes.&lt;/li&gt;
&lt;li&gt;Throughput matters more than any individual artifact.&lt;/li&gt;
&lt;li&gt;The economics only work if a human is not in the loop.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most teams I see are running pet workflows on tasks that should be cattle. The fix is not just buying more agents — it is rewriting the &lt;em&gt;task&lt;/em&gt; so that an unattended agent can succeed at it. That rewrite is the actual work. Once the task is specified well enough for cattle, the orchestration layer is a handful of weekends.&lt;/p&gt;
&lt;h2&gt;The question I now ask&lt;/h2&gt;
&lt;p&gt;Before I build anything new with LLMs, I ask one question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Could a stateless, headless worker that does not know my name complete this task with only the inputs I write down?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the answer is yes, it goes into the cattle pipeline.&lt;/p&gt;
&lt;p&gt;If the answer is no, I do one of three things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Specify the task harder until the answer becomes yes.&lt;/li&gt;
&lt;li&gt;Decide it is genuinely a pet task and budget my attention accordingly.&lt;/li&gt;
&lt;li&gt;Decide LLMs are the wrong tool for this and write the code myself.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The point is not that one answer is correct. The point is that I now make the &lt;em&gt;decision&lt;/em&gt;, deliberately, instead of defaulting to pets because pets are what the chat interface trained me to do.&lt;/p&gt;
&lt;p&gt;The chat interface is wonderful for what it is. It is the tutorial. It is not the production system.&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;If you want to see what the cattle model looks like as code: &lt;a href=&quot;https://github.com/jedarden/NEEDLE&quot;&gt;NEEDLE&lt;/a&gt; is the orchestrator (Rust, deterministic state machine; workers run as tmux sessions today, and it is built to run them in containers — proven on an isolated cluster, not yet packaged for general use); &lt;a href=&quot;https://github.com/jedarden/claude-governor&quot;&gt;claude-governor&lt;/a&gt; sizes the fleet against subscription quota; &lt;a href=&quot;https://github.com/jedarden/ccdash&quot;&gt;ccdash&lt;/a&gt; is the herd-health TUI. All three exist because none of this works without all three.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>agents</category><category>orchestration</category><category>NEEDLE</category><category>claude-governor</category></item><item><title>A new place for opinions and biases</title><link>https://jedarden.com/notes/welcome/</link><guid isPermaLink="true">https://jedarden.com/notes/welcome/</guid><description>Why I started these notes, what I plan to put on this surface, and what to expect.</description><pubDate>Sat, 02 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I build agent infrastructure for a living. Most of what I have learned about
running headless LLMs in production lives in commit messages, internal
docs, and conversations that never make it past the room they happen in.
This is the surface where some of it leaks out.&lt;/p&gt;
&lt;h2&gt;What I plan to write about&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Headless LLM systems&lt;/strong&gt; — the work between &quot;agents are interesting&quot;
and &quot;agents run unattended in production.&quot; Orchestration, cost
governance, observability, fleet operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strong opinions, weakly held&lt;/strong&gt; — what I currently believe about how
agent infrastructure should be built, and why. I expect to be wrong
about some of these and look forward to the corrections.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Post-mortems on my own decisions&lt;/strong&gt; — patterns that paid off, patterns
that didn&apos;t, and the difference between the two.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What I won&apos;t write about&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Hot takes on the latest model release.&lt;/li&gt;
&lt;li&gt;Frameworks I haven&apos;t actually used in anger.&lt;/li&gt;
&lt;li&gt;Speculation dressed up as expertise.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If something here is useful, it earned its place by being grounded in a
shipped system. The bar is &quot;code I run, problems I hit, fixes that
actually held.&quot;&lt;/p&gt;
&lt;p&gt;— Jed&lt;/p&gt;
</content:encoded><category>meta</category></item></channel></rss>