[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)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu từ packages/provider-opencode/src/server/v2/adapter.ts quanh dòng 4906, nơi session.create được gọi với tiêu đề khởi tạo của thread. So sánh với adapter OpenCode 1 (packages/provider-opencode/src/server/adapter.ts, quanh dòng 3648) và PR #13368, PR này đã bỏ tiêu đề để OpenCode tự tạo. Xóa đối số tiêu đề khỏi lệnh gọi v2, sau đó tạo một thread trên máy chủ OpenCode 2 và kiểm tra qua /api/session rằng tiêu đề được tạo sau prompt đầu tiên thay vì lặp lại tin nhắn đầu tiên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 1 giờ 27 phút
- Pull request đã merge (30 ngày)
- 530
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#42253 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Muse is still Unavailable by default on Windows: the version check keeps its 4-second timeoutĐang mởvia-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#41868 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Do no abbreviate pathsĐang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/ui#1108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
garethgeorge/backrest#1451 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderCó thể đã có người làm @ManyaS-Git đã nhận 1 ngày trước. Đang mởstatus:in-linear
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n8n-io/n8n#45027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Activity indicator ignores prefers-reduced-motionCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
joinmarket-webui/jam#1675 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 13 ngày