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
{{ message }}
Repository navigation
Unnecessary Haiku calls on every user message for per-message title generation #13802
summarizeMessage() in packages/opencode/src/session/summary.ts makes a small-model (typically Haiku) LLM call on every user message to generate a short per-message title stored in UserMessage.summary.title.
This is separate from the session-level title generated by ensureTitle() in prompt.ts, which runs once per session and populates Session.Info.title — the one shown in the session list.
The per-message summary.title is only consumed in one place: packages/ui/src/components/message-nav.tsx as a fallback label when getLabel is not provided. In practice, the main app always provides getLabel (which returns the raw prompt text), so summary.title is only reached on the enterprise share page tooltip. The TUI never displays it.
For a session with N user messages, this results in N unnecessary Haiku calls — one per message, every session, for every user.
Steps to reproduce:
Start opencode, send multiple messages in a session
Monitor API activity — observe a small-model call firing after each user message
The fix is to remove the LLM title generation from summarizeMessage() while keeping the diff computation intact.
For context on how this code got here: the per-message title generation was introduced in fb40dc6b2 ("generate user message title and body", Oct 24 2025) alongside a per-message body summary that used a second LLM call via the summary agent.
In 71a7ad1a4 ("core: fix model selection in title generation to use user's model instead of assistant's", Jan 12 2026), the body generation was removed entirely — but the title call was left in. The summary.body field is still on the schema but has been dead code since that commit.
This PR completes what that January cleanup started by removing the remaining per-message LLM call that isn't meaningfully consumed anywhere.
Verified the desktop app is unaffected — it wraps packages/app, which always passes getLabel (raw prompt text) to MessageNav, so summary.title is never reached.
Activity
rmk40 commentedon Feb 16, 2026
For context on how this code got here: the per-message title generation was introduced in
fb40dc6b2("generate user message title and body", Oct 24 2025) alongside a per-messagebodysummary that used a second LLM call via thesummaryagent.In
71a7ad1a4("core: fix model selection in title generation to use user's model instead of assistant's", Jan 12 2026), thebodygeneration was removed entirely — but thetitlecall was left in. Thesummary.bodyfield is still on the schema but has been dead code since that commit.This PR completes what that January cleanup started by removing the remaining per-message LLM call that isn't meaningfully consumed anywhere.
rmk40 commentedon Feb 16, 2026
Verified the desktop app is unaffected — it wraps
packages/app, which always passesgetLabel(raw prompt text) toMessageNav, sosummary.titleis never reached.