[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)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Inizia da packages/provider-opencode/src/server/v2/adapter.ts intorno alla riga 4906, dove session.create viene chiamata con il titolo iniziale del thread. Confronta con l'adapter di OpenCode 1 (packages/provider-opencode/src/server/adapter.ts, intorno alla riga 3648) e con la PR #13368, che ha rimosso il titolo così che OpenCode ne generi uno proprio. Rimuovi l'argomento del titolo dalla chiamata v2, poi crea un thread su un server OpenCode 2 e verifica in /api/session che il titolo venga generato dopo il primo prompt e non ripeta il primo messaggio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 24.8k
- Fork
- 6.4k
- Merge medio
- 1h 27m
- PR unite (30g)
- 530
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingdotgg/t3code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pingdotgg/t3code#42253 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Muse is still Unavailable by default on Windows: the version check keeps its 4-second timeoutApertavia-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
needs more info
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pingdotgg/t3code#41868 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pingdotgg/t3code
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vercel-labs/ui#1108 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
garethgeorge/backrest#1451 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderForse già presa @ManyaS-Git l’ha presa 1 giorno fa. Apertastatus:in-linear
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n8n-io/n8n#45027 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Activity indicator ignores prefers-reduced-motionForse già presa @CapThunder19 l’ha presa oggi. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
joinmarket-webui/jam#1675 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 13 giorni