Delegation release handoff, 2026-08-24
This document hands off unfinished work on model-driven delegation. The CLI side
is published. The server side is committed and pushed to forge main, but
production still runs the previous release, so the new behavior is not live yet.
What is live
- Production runs openagents.com
adc413e98c701e1aa23db5d82eac525e5cca23e2, image digestsha256:28e7bafa803f8125cb60f139d38df7fbe6f5ef313b261ecbc14249f9211683c0, onsarah-fleet-1,sarah-fleet-2, andsarah-fleet-3. Forge target0c4f5374-d693-4b6a-a2a4-3b679887e2d1islive. POST /api/v3/threadsanswers201, soopenagents coderopens a thread.@openagentsinc/cli@0.3.5is the published latest release.0.3.3is deprecated because it shipped unresolvedcatalog:dependencies.- In
0.3.5the model calls adelegatetool during a conversation. There is no slash command, no--child-modelflag, and no client-side provider credential. Children are realopencodeprocesses that spend a grant the CLI obtains from the server.
What is committed but not deployed
Forge main for openagents.com is
26a7e605e9c3462a79ecd2aa185abe293cc0d9c7, "Give a signed-in account credit, a
chat scope, and a second model". It carries three behavior changes, each with
tests, and the full suite passes locally (3 doctests, 4141 tests, 0 failures):
- A chat scope on ordinary login.
openagents auth loginnow mints["chat:account", "forge:write"].OpenAgents.ApiTokens.default_scopes/0is the single source, and the device authorization schema, service, and controller all defer to it. Before this change, a plain login produced a token thatPOST /api/v3/threadsrefused, which is the failure Christopher hit. - Account-level credit. A signed-in account draws against
account_credit_microusd,100_000_000microUSD, for the life of the account rather than per thread. An anonymous visitor keepsvisitor_credit_microusd,2_000_000microUSD.OpenAgents.Inference.Credit.spent/1sums usage across every grant the visitor owns, including revoked and expired ones, andOpenAgents.Threads.ceilings/1mints each new grant for the remainder. An exhausted account is refused withcredit_exhaustedand an actionable sentence. - A second model, routed to OpenRouter.
OpenAgents.Inference.Modelsis the registry that separates the public ID, the provider module, and the provider's own model string.ox-alpharesolves toOpenAgents.Providers.OpenRouterwith provider modelstealth/ox-alpha;gpt-5.6-lunastays onOpenAgents.Providers.OpenAI.POST /api/v3/threadsaccepts{"model": "ox-alpha"}, validates it through the registry, and mints the grant against it. The inference proxy resolves the provider from the grant, never from the request body.
On the CLI side, 0.3.5 opens a separate child thread on ox-alpha for
delegated children, so the parent conversation stays on Luna. A refusal to open
that thread is reported, never absorbed: the session says which refusal stopped
it rather than quietly running children on the parent's Luna grant.
Remaining work, in order
- Deploy
26a7e60to production. Followdocs/operations/production-deploy-runbook.md: release gate, image build and push, promote, migration job, rolling replacement, settle, verify. - Verify the routing end to end against production, with the published
CLI. Do not report success from configuration alone. The claims to prove are:
plain
openagents auth loginopens a thread; the parent grant reportsgpt-5.6-luna; the child thread request carries"model": "ox-alpha"and its grant reportsox-alpha; the proxy callsOpenAgents.Providers.OpenRouterwithstealth/ox-alpha; no client-side OpenRouter key is involved; a child-thread failure surfaces its real code and message; both grants are revoked on exit. - Review credit minting under concurrency.
Threads.ceilings/1reads remaining credit and then mints. Two simultaneous thread opens can each read the same remainder, so an account can oversubscribe by one grant's ceiling. Decide whether to serialize on the visitor row or accept the overshoot, and record the decision. - Consider registry uniqueness. If
openai_modelis ever configured asox-alpha,Models.all/0returns two entries with the same ID. Deduplicate, or assert uniqueness in a test. - Rotate the npm token pasted in the working session. It published
0.3.4and0.3.5and is now in a transcript.
Deploy notes for this box
The release gate ran repeatedly here and stalled on environment flakes rather than on the candidate:
- The gate needs Node 24. Node 20 fails
assets/test/sidebar_section_test.mjs. Useexport PATH="$HOME/.nvm/versions/node/v24.19.0/bin:$PATH". - The gate's
version_chainand later stages connect over TCP, wherepg_hba.confrequiresscram-sha-256. The localubunturole needs a password, and the smoke URL must carry it:OPENAGENTS_RELEASE_SMOKE_DATABASE_URL='ecto://ubuntu:PASSWORD@127.0.0.1/openagents_release_smoke'. mix precommitfailed once per run on a different load-sensitive test each time, and every one of them passed in isolation on the same commit:OpenAgents.SCV.RunTest,OpenAgents.SCV.OpenCodeExecutorTest, andOpenAgents.Machines.IndexReachTest. The first two spawn real processes and the third asserts a planner index choice. On an 8-core box under load they are unreliable. Treat a single failure of one of these as a flake, confirm it in isolation, and rerun rather than changing the candidate. Making them robust is worth its own issue.- Two checkouts exist on this box.
~/repos/openagents.comhas the forge asorigin;~/repos/openagents-comhas the GitHub mirror proxy and holds the warm_build,deps, and the gate receipts under.git/openagents/release-gate-receipts/. The gate keys a receipt to the exact SHA, so it must run in the checkout that will build the image. - Promotion needs
deployments:promoteand live operator standing. Saved tokens expire within 7 days, so mint one through the device authorization flow, or on a fleet node, at deploy time.
Reference material
docs/2026-08-23-nested-thread-delegation-audit.md, the delegation audit this work follows.- In the openagents monorepo,
docs/teardowns/2026-08-23-cc-tool-and-agent-fleet-rendering-reproduction.mdanddocs/teardowns/2026-08-23-openagents-coder-tui-agent-fleet-port-plan.mdhold the tool contract, task registry, and fleet rendering specification the Coder TUI is being ported against. INVARIANTS.mdrecords the credit and scope statements this change updated.