Session auto naming
Description
Session use to automatically have name but now it does not happen anymore, I can only rename them. I did like when session would be auto named.
OpenCode version
1.0.39
Steps to reproduce
Create a new session type anything, leave and open open code again.
Screenshot and/or share link
Operating System
macOS 15.7.1
Terminal
iTerm2
This issue might be a duplicate of existing issues. Please check:
- #1389: Feature Request: Rename Session Title - Discusses similar concerns about session naming and requests ability to rename sessions manually
- #1790: Feature Request: Edit session name - Specifically requests ability to manually set session names when auto-naming doesn't work properly
- #3779: Session rename (via /rename or /session + ctrl-r) not working - Reports broken rename functionality in recent versions
- #3655: Restore ability to rename sessions (CLOSED) - Previously reported missing rename functionality in OpenTUI version
Feel free to ignore if none of these address your specific case about automatic session naming no longer working.
@zippeurfou what model/provider do you primarily use? Some of them fail a lot more frequently than others
@rekram1-node thanks for answering. I am using amazon bedrock as a provider.
I can confirm this does not happen when I use anthropic. So this seems to be linked to bedrock.
@zippeurfou I think i can fix this pretty easily, but curious, if you look at this getsmallmodel function: https://github.com/sst/opencode/blob/14397651b5e2a673aa069fb82eedb690c17eba4c/packages/opencode/src/provider/provider.ts#L598
Do you see any reason the model it selects would fail for you everytime? it is doing includes in the string matching so it wont send requests with a model that doesnt exist, but im not familiar with the bedrock flow, is it like azure where you need a specific setup for each model?
In the meantime you can set “small_model” in your opencode.json and it will use that model for title gen, you can run “opencode models” to see what models you have available
I might be wrong but the model listed have different name in bedrock eg "amazon-bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"
Could that be linked ?
That being said using a small model in my config did the trick. Thank you.
@zippeurfou what i was trying to say is it'd handle that because it is doing "includes" checks rather than matches so it can't select a model that doesnt exist
I see, I think bedrock might be a bit different as you can see the list of models but when you try to access it you might get error if it is not enabled by the AMI. For example I can see a lot of models on bedrock when I list the models with the /model command that I can't actually select.
Yeah that's prolly it I think a good default for bedrock then is always defaulting to the model u have selected instead of trying to find a "small" one
ofc if u set "small_model" we will respect it
I am fine to close this issue. I am not sure there is an easy fix to it wdyt?
@zippeurfou ill close once I make a fix, easiest work around is to default to your currently selected model for title gen, and for azure that makes extra sense since each model needs a deployment (so gonna do this for azure + aws bedrock)
Ill just use this to track that change
I would like to have the --rename as parameter when starting opencode.
@Thorium and what would your expected behavior be
Also is your issue similar to his^^ where the titles never gen?
no, I'm using opencode 1.0,67 on Windows, and opencode 1.0.110 on Ubuntu, and both /rename works well. But it relies me to remember to name the session, I would like a script that renames a session to me when I start opencode, so that like a --port I could do --rename so that if I have 2 specialized agents in parallel, and I'll try to spin an old session, I don't struggle to identify who was who.
But it relies me to remember to name the session
I don't understand why do you have to remember to name it?
I'm also having this problem using Gemini 3 Flash Preview
@JaredEzz what provider are you using?
consider setting small_model in your opencode config!
i have the same issue for
{
"$schema": "https://opencode.ai/config.json",
"theme": "transparent",
"autoupdate": false,
"model": "github-copilot/claude-sonnet-4.5",
"small_model": "github-copilot/gemini-3-flash-preview",
}
changing small model to, e.g. some google model does not work either.
edit:
opencode --version
1.0.202