* Remove code comments and add the no-comments rule
Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.
Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.
Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep comments that are data in strings
The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep released migrations and mobile native inputs unchanged
check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.
List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Add an Anthropic API key for Claude and fix agent cache and usage counts
- Claude: a saved Anthropic API key starts each Claude process with
ANTHROPIC_API_KEY. Claude Code uses it before a claude.ai sign-in.
An account after the first does not get the key. Local and joined
servers show the key when the host advertises claude-api-key-v1
(a marker capability with no routes; the providers-v1 key routes
save the key).
- A custom provider on api.anthropic.com now uses the @ai-sdk/anthropic
adapter, so OpenCode sends cache_control breakpoints. Anthropic's
OpenAI-compatible endpoint does not cache.
- OpenCode usage: each prompt is its own counter, and inputTokens is the
uncached input. A missing cache or thinking field is 0.
- Provider download failures send a failure code from the catalog key,
not "unknown".
E2E: claude-api-key, opencode-anthropic-cache (needs the OpenCode
binary), opencode-usage-metering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release usage limit holds when a provider key changes
A saved or removed key replaces the credential of the provider's own
sign-in. A usage limit of the old credential held the agents until its
reset. Now the credential change ends those holds. Claude's Sign in on
an older joined host does not open the key dialog, because that host
does not read the key. The Codex usage reset e2e has a case for the
credential change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the provider key object across server-list updates
The key object read the active server, and each server-list update
gives new server objects. So each update cleared the key badges and
read the key status again. A boolean memo now holds the Claude key
capability, and it notifies only when the value changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Remove the unused Claude apiKeyInUse flag
Nothing read apiKeyInUse for Claude: the key card reads the key status.
The flag is Gemini only again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Let each agent choose between the Claude plan and the API key
A saved Anthropic key is now its own Claude account, "API key", with a fixed id that all released
account checks accept. Select it in an agent's model menu to bill that agent to the key; the other
agents keep the Claude plan. When Claude has no sign-in, the own sign-in uses the key, so all agents
work with no change. Removing the key removes the account and moves its agents back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep Claude plan holds when the key does not serve the own sign-in
A claude.ai login does not use the saved key, so a key change no longer
releases the usage-limit holds of that plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Remove the Claude key account before the key is cleared
The idle check of the key account now runs before the key is deleted.
When an agent on the account has work, the request fails and the key
stays, so no agent stays on the account without its key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refuse a Claude key removal while Claude is busy, before the account goes
The key change refuses while a Claude turn runs. That check now also runs
before the key account is removed, so a busy refusal keeps both the key
and its account.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>