5 Commits
Author SHA1 Message Date
NB 6fbd8bfc20 Let the main chat and side threads of an agent use each other's browser tabs (#13433)
* Let every chat of an agent use the browser tabs of the agent

Main chats and side threads of an agent can now use all browser tabs of
that agent. list_tabs shows the chat that opened each tab and tells when
another chat uses a tab now. Takeover, submit_secret and list_logins use
the same rule. Channel and messaging threads still use only their own
tabs and the tabs shared with an @ tag.

* Keep channel tabs out of other chats and make the working hint reliable

The main chat and side threads use only the tabs that the main chat, a
side thread or no chat opened. Tabs of a channel or a messaging thread
stay out of these chats unless a person tags them with @.

otherChatWorking now also uses the last chat that used each tab in the
last 2 minutes, because control sessions end 1.2 s after a call.

A takeover from one chat no longer deletes the held takeover result of
another chat. list_tabs looks up each chat once per call.

The browser user-control E2E now covers the cross-chat access.

* Keep a held takeover result for each chat of a tab

Held takeover results used only the tab id as the key. When two chats of
one agent took over the same tab, the second result replaced the first.
The key is now the tab id and the thread id.
2026-11-20 13:51:50 +01:00
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* 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>
2026-11-19 12:19:28 +01:00
NBandClaude Opus 5.5 b18d30f3c4 Let a user tag browser tabs and threads in chat (#5021)
* Let a user tag browser tabs and threads in chat

The @ picker of the chat composer now has sections for agents, browser
tabs and threads. A tag becomes a chip in the message.

- A tab tag lists only the tabs of the agent of the chat. When the user
  sends it, the host shares that tab with the target thread of the same
  agent, so a side thread can use a tab of the main chat.
- A thread tag gives the agent one short line: the title, the task id,
  the state and the start of the result. The agent reads more with
  history_read or history_search and the new optional taskId.
- The stored text keeps the marker. The marker expands at delivery, so
  the agent gets the current title and state.
- A click on a chip opens the tab page or the thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Share a tagged tab when its prompt is built

- Share the tab with the public thread that gets the prompt, not when
  the message is queued. A queued message can move or change.
- Use the strict name rule for tab and thread titles.
- A popup keeps the shares of its opener tab.
- A tag from a teammate shows as a name only.
- The picker lists only tabs that have an owner agent.
- Use browserDisplayUrl in the picker.
- Make the thread question in chat-tags-e2e exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep TaggedThreadState private to delivery-content

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:43:21 +01:00
Aleksander DygońandClaude Opus 5.5 8c1ca2ecf0 Show the cost of OpenCode turns in Usage (#3222)
* Show the cost of OpenCode turns in Usage

OpenCode sends the session's total cost in `usage_update` before the
prompt result. OpenBot dropped it, and has no OpenCode price, so every
OpenCode turn had no cost. Keep the last total in its own checkpoint for
each session and book the difference for each turn. A session that has
records but no cost checkpoint started before this change: its first
total is only the start.

Fixes #3135

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Look up older sessions only for a reported cost

Run the records query for a missing cost checkpoint only when the sample
has a cost. The E2E finds the session through the active provider
session. The release note names each case with an unpriced first cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Read the history of one Claude session one scan at a time

A Claude history scan holds a write transaction on its index while it
awaits transcript reads. A second scan of the same session at the same
time failed at once with "database is locked". The boot backfill and a
backup-model continuation can read one session together, and the
backup-model-failover E2E failed on Linux CI. Scans of one index now
wait for the scan before them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:48:05 +01:00
NBandClaude Opus 5.5 1949bf7a16 Add an Anthropic API key for Claude and fix agent cache and usage counts (#3071)
* 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>
2026-10-25 13:58:09 +01:00