Skip to content

fix(session): fall back when generated titles stay default#19177

Closed
hoop71 wants to merge 4 commits intoanomalyco:devfrom
hoop71:fix/upstream-session-title
Closed

fix(session): fall back when generated titles stay default#19177
hoop71 wants to merge 4 commits intoanomalyco:devfrom
hoop71:fix/upstream-session-title

Conversation

@hoop71
Copy link
Copy Markdown

@hoop71 hoop71 commented Mar 25, 2026

Issue for this PR

Closes #13710

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Some sessions remain on the default New session - <timestamp> title when the title-generation path returns no usable title. This change keeps the existing generated-title flow, but adds a deterministic fallback using the first real user message when the session title is still the default placeholder. It only applies to default titles, so it does not overwrite titles that were already set.

How did you verify your code works?

  • Ran bun test test/session/prompt.test.ts from packages/opencode
  • Ran bun typecheck from packages/opencode

Screenshots / recordings

Not a UI layout change. No screenshot needed.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Co-authored-by: Legion Intel AI <no-reply@legionintel.com>
OpenCode-Session: ses_2d99c801bffe8QKwyvSpSW7goa
OpenCode-Repo: yurtsai/opencode
OpenCode-Branch: fix/session-title-fallback
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. and removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Mar 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Co-authored-by: Legion Intel AI <no-reply@legionintel.com>
OpenCode-Session: ses_2d99c801bffe8QKwyvSpSW7goa
OpenCode-Repo: yurtsai/opencode
OpenCode-Branch: fix/session-title-fallback
@hoop71 hoop71 closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode Desktop Session Name is no longer written with AI at times

1 participant