GeezerVison is showing github.com — fix(opencode): OpenCode 2 sessions get OpenCode's own title by shivamhwp · Pull Request #41832 · pingdotgg/t3code
Conversation
shivamhwp
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
Threads on OpenCode 2 keep their first message as the native session title. The adapter passed the thread title to session.create, and OpenCode never titles a session that was created with a title. Reproduce: create a thread on an OpenCode 2 server, send a first message, then run opencode api get /api/session; the title is the raw message. The OpenCode 1 adapter already creates sessions untitled (#13368).
Change
session.create no longer receives a title, so OpenCode titles the session from its first prompt.
- At turn start, the adapter writes the thread title into the native session only when the thread was renamed or is a child thread (fork, side chat, subagent). A root thread's seed or generated title is no longer written.
- Workflow steps and scheduled tasks pass their chosen name marked as renamed, so those names still reach the native session.
- Title writes for forks, side chats and subagents are unchanged.
Scope
Closes #41748. Live titling on OpenCode 2.4.2 is now shown below.
Before / after on a live OpenCode 2 server
Same steps on both sides, in the real web app with headless Chromium: @opencode/[email protected] installed in a temporary prefix with its own home, T3 Code spawning it as the OpenCode provider, the free OpenCode Zen model opencode/big-pickle (no account or key), a new thread sent what is the capital of france? answer in one word from the composer, then OpenCode's own web UI opened on the same OpenCode data.
Before (origin/main at ae945dd42a): OpenCode's session list shows the raw first message as the session title.


After (this branch at 0e3e666c35): OpenCode titles the session itself, "Capital of France".

The second row, "T3 Code generateThreadTitle", is T3 Code's temporary title-generation session, which it removes once the thread title is generated. This change doesn't touch it. The screenshot was taken before generation finished.

The run asserted that the native title returned by OpenCode's /api/session isn't the first message. It failed on base ("what is the capital of france? answer in one word") and passed on head ("Capital of France"). The scenario installs OpenCode and calls a live model, so it isn't committed. Base retried once, and the retry failed earlier for a harness reason: the retried test started a new OpenCode data dir, but T3 Code kept the server from the first attempt. The screenshots above are from the first attempt.
Verification
At the merge with origin/main, 0e3e666c35:
OpenCode2AdapterV2.test.ts and ScheduledTaskService.test.ts (from apps/server): 222 passed.
OpenCode2OrchestratorV2.integration.test.ts: 9 passed.
vp run check:changed: format, lint, knip, graphql, typecheck (10 packages), and tests (7 files, 312 passed).
From the earlier head:
OpenCode2AdapterV2.test.ts: two new tests.
- creates the session without the thread title: the replayed
session.create body must carry title: null.
- does not write a seed title into the session before the first turn: a root thread with a seed title sends no native title update before its first prompt.
- Both fail on the base adapter (2 failed, 196 passed) and pass with this change.
ScheduledTaskService.test.ts: an unbound task's launch carries its name as a chosen title checks the scheduled-task launch sends its name with the rename flag.
- With the three source files put back to their base versions at
9e4a89944d, those two test files give 3 failed, 215 passed. The three failures are the three new tests above.
Not shown
- Threads started with
t3 thread start without --title still take the first line of the message as their native title. The CLI sends that fallback in the same field as a chosen title, so the launch contract can't tell them apart. Fixing it needs a decision on the contract, so it is left as is.
- Renamed, forked and side-chat threads on a live server. Their title writes are unchanged and covered by the adapter tests.
- Device or web surfaces: none. The change is server-side and visible only in OpenCode.
Model and harness: Claude Haiku 5.5 in Claude Code; reviewed in two rounds by Codex (gpt-6.2-sol). Base-source test run by Claude Fable 5.2 in Claude Code. Merge with main, live OpenCode 2 run and screenshots by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… the thread's seed title
The OpenCode 2 adapter passed the thread title to session.create, and OpenCode never
auto-titles a session created with a title. The adapter also wrote the seed title into
the native session on the first turn. Now the session is created untitled, and a thread
title is written at turn start only for a renamed thread or a child thread. Named launches
from workflow steps and scheduled tasks are marked as renamed so their names still sync.
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Codex |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
21.5 KiB |
21.5 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Codex |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
| Claude |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Claude |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
21.9 KiB |
21.9 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Claude |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
Other scenarios
All 64 scenario measurements match main.
All 64 scenario measurements
| Provider |
Scenario |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
short turn resume |
WebSocket decoded |
10.5 KiB |
10.5 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Codex |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn running, cold open |
HTTP decoded |
281.7 KiB |
281.7 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Codex |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn running, history page |
HTTP decoded |
92.4 KiB |
92.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Codex |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn finished, cold open |
HTTP decoded |
381.5 KiB |
381.5 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket decoded |
381.6 KiB |
381.6 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, work page |
HTTP decoded |
186.2 KiB |
186.2 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Codex |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Codex |
idle thread resume |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell snapshot |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
fleet shell subscribe |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Codex |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Codex |
stale shell reload |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Codex |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
HTTP decoded |
72.4 KiB |
72.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Codex |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
short turn resume |
WebSocket decoded |
10.6 KiB |
10.6 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Claude |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn running, cold open |
HTTP decoded |
283.3 KiB |
283.3 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Claude |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn running, history page |
HTTP decoded |
93.4 KiB |
93.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Claude |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn finished, cold open |
HTTP decoded |
384.2 KiB |
384.2 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket decoded |
384.3 KiB |
384.3 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, work page |
HTTP decoded |
188.1 KiB |
188.1 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Claude |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Claude |
idle thread resume |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell snapshot |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
fleet shell subscribe |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Claude |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Claude |
stale shell reload |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Claude |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
HTTP decoded |
73.4 KiB |
73.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Claude |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
Baseline: 81f8990 · PR result: b90fd37 · Source CI: success
Scenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resume to resume automatic reviews.
@coderabbitai review to trigger a single review.
Use the checkboxes below for quick actions:
- Resume reviews
- Trigger review
No actionable comments were generated in the recent review.
Walkthrough
-
The OpenCode 2 adapter creates sessions without app-thread seed titles and uses the title returned by OpenCode. It writes the app-thread title at turn start only for renamed or child threads. Scheduled-task and workflow-agent launches mark new threads as renamed.
Changes: OpenCode session title handling
| Layer / File(s) |
Summary |
Session creation and title updates packages/provider-opencode/src/server/v2/adapter.ts, apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts, apps/server/src/orchestration-v2/OpenCode2OrchestratorV2.integration.test.ts |
Session creation no longer passes the app-thread title. Registration uses OpenCode’s returned title. Turn startup writes a title only for renamed or child threads. Tests cover seed titles, renamed threads, and the session creation request. |
Thread launch title flags apps/server/src/scheduledTasks/ScheduledTaskService.ts, apps/server/src/workflows/WorkflowAgentThreads.ts, apps/server/src/scheduledTasks/ScheduledTaskService.test.ts |
New scheduled-task and workflow-agent threads launch with titleRenamed: true. A test checks the scheduled-task title and launch option. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- pingdotgg/t3code#41748 — Reports that passing a thread title to
session.create suppresses OpenCode’s native title generation. This PR removes the title from session creation and tests that behavior.
Suggested reviewers: juliusmarminge, gabrielelpidio
Merge Risk: Minimal · previous review 0e3e6
-
OpenCode 2 sessions now keep OpenCode's own title unless the thread was renamed or is a child thread. Scheduled tasks and workflow agents mark their chosen names as renamed. Coverage for the scheduled-task naming path has been added. No concrete merge-blocking risk remains; live OpenCode 2 auto-titling is still untested on a real server.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: OpenCode 2 sessions no longer carry the thread title, so OpenCode applies its own title from the first prompt. The title follows the conventional commit format and mat… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The description follows the repository template closely. It has a clear Problem section with reproduction steps and an expected behavior, a Change section listing the four code-level changes, a Scope … |
Full details: Title check
-
Explanation
The title names the main change: OpenCode 2 sessions no longer carry the thread title, so OpenCode applies its own title from the first prompt. The title follows the conventional commit format and matches the changeset, which removes the title from session.create and limits title writes at turn start.
Full details: Description check
-
Explanation
The description follows the repository template closely. It has a clear Problem section with reproduction steps and an expected behavior, a Change section listing the four code-level changes, a Scope section that links issue #41748 and explains the bug-fix scope, and a detailed Verification section with specific test names, counts, and base-versus-head results. It also states what was not checked (threads started via the CLI without --title, renamed/forked/side-chat threads on a live server, and device/web surfaces). It ends with the model and harness used, as the template asks. Minor issues: the Problem section does not explicitly describe expected behavior, the Scope section does not say why the title-from-first-prompt behavior is a bug rather than a feature, and the Verification section mixes results from different commits. These gaps are non-critical.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between dafad2f and 0e3e666.
Files selected for processing: 3
-
apps/server/src/scheduledTasks/ScheduledTaskService.ts
apps/server/src/workflows/WorkflowAgentThreads.ts
packages/provider-opencode/src/server/v2/adapter.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The scheduler marks a fresh launch's name as renamed so the OpenCode 2 adapter still syncs
it. Nothing tested that flag, so a regression would only show up in a live native session.
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|