[Bug]: OpenCode 2 adapter still passes the thread title at session.create, suppressing OpenCode's native title generation (regression of #13368 on the OpenCode 2 path)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
packages/provider-opencode/src/server/v2/adapter.ts の約4906行目から始めてください。そこではスレッドの初期タイトルを使って session.create が呼ばれています。OpenCode 1 のアダプター(packages/provider-opencode/src/server/adapter.ts、約3648行目)と、タイトルを削除して OpenCode に自動生成させた PR #13368 と比較してください。v2 の呼び出しからタイトル引数を削除し、次に OpenCode 2 サーバーに対してスレッドを作成して、/api/session で、タイトルが最初のプロンプトの後に生成され、最初のメッセージをそのまま繰り返していないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Connect T3 Code to an OpenCode 2 server (
opencode serve --service, OpenCode 2.4.1). - Create a thread and send a first message.
- Check the native session title:
opencode api get /api/session(or the OpenCode TUI/web).
Expected behavior
OpenCode 2 generates its own session title after the first prompt (server-side
SessionTitle service in packages/core/src/session/title.ts), like sessions
created from the native OpenCode UI. Auto-titling only runs while the title is
still the New session - <timestamp> fallback (SessionTitle.isUntitled,
packages/core/src/session/runner/llm.ts).
Actual behavior
The native session keeps the thread's seed title (the raw first message),
because the OpenCode 2 adapter passes the thread title at creation —
packages/provider-opencode/src/server/v2/adapter.ts (~line 4906):
const title = threadInput.title?.trim() || undefined;
// A session created with a title is never titled by OpenCode's own model.
const created = yield* client.session.create({
location: Location.PublicRef.make({ directory: AbsolutePath.make(directory) }),
model,
permissions,
...(title === undefined ? {} : { title }),
});
The OpenCode 1 adapter behaves correctly since PR #13368
(packages/provider-opencode/src/server/adapter.ts ~line 3648):
client.session.create({ permission }) — no title, with the comment
"OpenCode generates a title only when session.create leaves it unset".
The fix was not carried over to the OpenCode 2 adapter.
Verified independently that OpenCode 2 auto-titling works when the session is
created untitled: a session created via the API (no title) followed by a prompt
received a generated title. Not passing the seed title is therefore sufficient.
Impact
Minor bug or occasional failure
Version or commit
t3 v0.1.11
Environment
Fedora Linux (Atomic/COSMIC); T3 Code mobile app, web and desktop, same
behavior; OpenCode server 2.4.1; provider: OpenCode 2 (adapter server/v2).
Logs or stack traces
$ opencode api get /api/session | jq -r '.data[0] | .title, .location.directory'
<raw first message of the thread> ...
/home/<user>/homelab
Every T3-created OpenCode 2 session has title == first user message
(verified across all recent sessions on the server).
Workaround
Rename the native session manually: opencode api patch /api/session/<id> -d '{"title":"..."}'
(visible in OpenCode web/TUI; it does not sync back to the T3 thread).
Related (separate reports if useful)
Thread renames in T3 do not reach the native OpenCode 2 session
(applyThreadTitle is not implemented by the v2 adapter; done for Claude Code
in PR #34775), and OpenCode-side renames are not synced back to T3.
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 1時間 27分
- マージ済み PR(30日)
- 530
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#42253 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
needs more info
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#41868 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/ui#1108 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 半日 初心者へのやさしさ 62/100
garethgeorge/backrest#1451 ·
メンテナーはふだん 1 日以内に返信
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument order対応中かも @ManyaS-Git が 1 日前に担当しました。 オープンstatus:in-linear
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Activity indicator ignores prefers-reduced-motion対応中かも @CapThunder19 が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
joinmarket-webui/jam#1675 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 13 日以内に返信