You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify and implement V2 title/session naming behavior.
Context
OpenCode already has a customizable title agent for internal title generation. The remaining design work is to make session naming/title generation explicit and useful for V2 consumers without bypassing that customization model.
The generate endpoint was originally mentioned here, but it has since been merged and is not the scope of this issue.
Work
Clarify when and how sessions receive generated titles.
Decide whether session/title naming is automatic, explicitly triggered, or both.
Preserve customizability through the existing title agent.
Ensure any protocol/client surface for title/session naming is clear.
Cover Discord thread naming as a consumer/use case if it still needs session title output.
Acceptance criteria
V2 session title generation behavior is documented.
Session naming path uses the customizable title agent where appropriate.
Any API/client surface for title naming is clearly named and tested.
Discord thread naming has a clear source for generated names.
Implemented V2 automatic session title generation in 5710064 (pushed to `v2`):
New `SessionTitle` service (`packages/core/src/session/title.ts`) generates a title from the session's sole user message via the existing customizable `title` agent (model override, system prompt, permissions all honored as before), then renames the session via `SessionEvent.Renamed`.
Runs at most once per session, gated on durable history having exactly one user message (no default-title string matching).
Wired into `SessionRunner` as a background fork that runs after the first turn's prompt promotion, so it doesn't block/extend the provider turn.
Covered by `packages/core/test/session-title.test.ts` (generates+renames, skips once a second message exists, skips child sessions, skips when the `title` agent is removed via config) plus full `packages/core` suite (1078 tests) passing.
This covers the core acceptance criteria: automatic title generation is implemented, uses the customizable `title` agent, and is tested. Filing follow-ups separately for Discord thread naming and any additional client/protocol surface work if still needed.
Activity
opencode-agent commentedon Jun 29, 2026
Narrowed this issue to title/session naming only. The
generateendpoint has already landed, so it is intentionally out of scope here.[-]V2: add generate endpoint and clarify title/session naming flow[/-][+]V2: clarify title/session naming flow[/+]feat(core): generate session titles from first prompt
thdxr commentedon Jul 1, 2026
Implemented V2 automatic session title generation in 5710064 (pushed to `v2`):
This covers the core acceptance criteria: automatic title generation is implemented, uses the customizable `title` agent, and is tested. Filing follow-ups separately for Discord thread naming and any additional client/protocol surface work if still needed.
feat(core): generate session titles from first prompt