4 Commits
Author SHA1 Message Date
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
Aleksander DygońandClaude Fable 5.2 64b420c091 Stop the "Working" state when an OpenCode background subagent ends (#10389)
* Stop the "Working" state when an OpenCode background subagent ends

After a turn that started a background subagent, the watch reloaded the
session on each change of its `updatedAt`. OpenCode 2.2.7 stops the
updates of a subagent after a `session/load`, so the end of the subagent
did not come. Its card and the agent's avatar showed "Working" with no end.

The watch now does not reload the session while a background subagent of
the session runs. The reload occurs after the last one ends, and it shows
the agent's answers to the results in one turn.

Fixes #8352

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Test the end of an OpenCode background subagent that works on after its turn

The fake `opencode acp` now has a background subagent that reports in
`opencode/session/child_update` and sends no more updates after a
`session/load`, as OpenCode 2.2.7 and 2.3.0 do. The test fails without
the fix for #8352.

The release note now says that all answers to finished background work
wait for the last background subagent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 14:13:12 +01:00
Aleksander DygońandClaude Opus 5.5 7586597d12 Show OpenCode replies after a background shell command (#8538)
OpenCode answers a finished background shell command in a turn that it
sends no ACP update for. OpenBot watches the session and replays such a
turn, but it started the watch only for a tool result with a subagent
sessionID. A background shell result has a shellID and no sessionID
(OpenCode 2.2.7), so its replies never showed in the chat.

Start the same watch for a running tool result with a shellID. The fake
OpenCode agent and the background-turn E2E test now cover a background
shell command.

Fixes #7713

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:01:52 +01:00
Aleksander DygońandClaude Opus 5.5 39913977a3 Show the answer of an OpenCode turn that a background subagent starts (#3433)
* Show OpenCode background turns and text before a tool call

OpenCode 2.2.0 sends no session update for the turn that a finished
background subagent starts. The answer was only in its store, and the
chat did not show it (#3406). After a tool call leaves a background task
running, the ACP client now watches `session/list`. When the session
changes, it sends `session/load` and shows the new entries in a turn
with `unprompted: true`. A message sent during that turn waits in the
queue.

Text that an ACP agent writes before a tool call is now a `narration`
item. The chat shows it as a message, with the turn's steps between
its messages. Narration is not the answer of the turn: it does not
count as unread, set the preview, or show as a channel reply.

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

* Fix the review findings of the background replay and the steps rows

- Show the steps of a running turn above each answer that it wrote.
  The turn's trace and facts go on its last answer that has steps.
- A stop of a turn of the agent's own marks its open tool calls as
  stopped. For 30 seconds after any turn that did not complete, a
  replay does not show new entries.
- The watch goes on while a turn of the agent's own is open.
- The background `session/list` and `session/load` have the request
  time limit, so a prompt cannot wait for them with no end.
- A prompt counts as opening before its session opens again.
- Only OpenCode starts a new message at a new `messageId`.
- The dynamic island does not show narration as a reply.

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

* Keep a failed background replay for the next poll

- A failed or timed-out background `session/load` does not mark the
  session change as handled, so the next poll tries it again.
- After a timeout, the agent goes on with its replay. The session's
  updates stay apart, a prompt waits, and no second replay starts until
  the load answers.

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

* Release a background replay only after its entries apply

A load that answered in time released the waiting prompt before the
replay started the agent's turn. The prompt could then start its own
turn first, and one of the two turns did not complete. Now such a load
releases the prompt after its entries apply. Only a load that the watch
stopped waiting for releases when it answers.

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

* Keep text before a tool call in the thinking

The developer does not want the agent's notes between tool calls as
chat messages. Text before a tool call is commentary again, and only
the last text of a turn is the answer. This removes the `narration`
item type and the steps rows between answers.

For OpenCode, the text of an earlier ACP message in a turn also ends
as commentary, so the text of two steps does not show as one line.

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

* Keep the text of two OpenCode steps in one answer

The text of an earlier ACP message with no tool call after it went into
the thinking, so an answer that the agent wrote in two steps lost its
first part. Now the text of a new `messageId` starts a new paragraph of
the same answer. An empty chunk does not start one. The background
replay compares only the current message's text when that text grows.

The E2E case is now `steps` and covers two steps with no tool call
between them. The docs describe this under its own heading.

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

* Wait for a background replay before the session opens again

A prompt that had to open its session again did that before it waited
for a background replay. Opening the session replaces the thread, so a
turn that the replay started on the old thread never completed. The
prompt now waits for the replay first.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:06:37 +01:00