Uh oh!
There was an error while loading. Please reload this page.
fix(session): don't let auto-title overwrite a title set mid-turn - #32739
fix(session): don't let auto-title overwrite a title set mid-turn#32739adityachaudhary99 wants to merge 1 commit into
Conversation
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found. |
First-turn auto-title generation guarded on the session title captured once at the start of the turn, so a plugin (or user) that renamed the session while the turn was in flight had its custom title clobbered when auto-title resolved. Re-read the session from storage immediately before setTitle and skip when the title is no longer the default. Adds a test (and a holdTitle gate in the LLM test harness to deterministically rename mid-generation). Closesanomalyco#32710 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
60a56f3 to
1e5107dCompareAutomated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#32710
Type of change
What does this PR do?
First-turn auto-title generation checked the session title captured once at the start of the turn, so if a plugin (or the user) renamed the session while the turn was still running, the auto-generated title clobbered the custom one. I re-read the session from storage right before setTitle and skip when the title is no longer the default.
How did you verify your code works?
Added a test in test/session/prompt.test.ts that holds the title-generation response open (via a new holdTitle gate in the LLM test harness), renames the session mid-flight, then releases it and asserts the custom title survives. Ran it locally with bun — passes.
Screenshots / recordings
N/A — no UI change.
Checklist