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
Currently, when wanting to restart OpenCode (e.g., to reload configuration), users need to:
Execute /exit to quit OpenCode
Manually start OpenCode again
This two-step process is cumbersome and interrupts the workflow. It is very slow too, around 4-5 seconds for me, and you need to baby-sit it to wait for it to exit cleanly.
Note also that on Windows, we still cannot spam Ctrl+C to quit, as that will cause Bun to print strange control characters into the console without exiting properly.
Proposed Solution
Add a /restart command that:
Restarts the OpenCode session in a single command
Thus reloads configuration automatically
Maintains the current working directory (maybe even with --continue flag)
Benefits
Improved user experience and workflow efficiency when making config changes
If the command is going to behave as if --continue had been passed (which I am not sure if I would agree with to begin with), then I think that /reload would be a more appropriate command name than /restart.
If the command is going to behave as if --continue had been passed (which I am not sure if I would agree with to begin with), then I think that /reload would be a more appropriate command name than /restart.
Yeah, it's ultimately what I want, but this is more of a workaround to get an actual /reload command from #6719! Thus /restart. Do you disagree?
If anyone can give me pointers on how to implement this ticket using a Plugin, I'm all ears!
I just think that /reload would be a more apt name if it isn't going to result in a return to the startup screen. Since #6719 hasn't actually been resolved yet, if a /reload is indeed actually what you'd prefer, then any solution that resolves one would simultaneously resolve the other. Do you agree with this assessment? I could, of course, be overlooking something I just woke an hour ago and haven't had any caffeine yet.
I could, of course, be overlooking something I just woke an hour ago and haven't had any caffeine yet.
I know the feeling ☕⚰️
Yeah, let me see. I suppose time would be better spent in the other ticket. I just figured that this one would maybe be easier to get going - but may aswell be wrong. I just ran an analysis on the codebase and posted it below: #6719 (comment)
Activity
github-actions commentedon Jan 17, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
[-]Feature Request: Add /restart command[/-][+][FEATURE] Add /restart command[/+]ariane-emory commentedon Jan 18, 2026
If the command is going to behave as if
--continuehad been passed (which I am not sure if I would agree with to begin with), then I think that/reloadwould be a more appropriate command name than/restart.tui: add /restart command
JosXa commentedon Jan 18, 2026
Yeah, it's ultimately what I want, but this is more of a workaround to get an actual /reload command from #6719! Thus /restart. Do you disagree?
If anyone can give me pointers on how to implement this ticket using a Plugin, I'm all ears!
ariane-emory commentedon Jan 18, 2026
I just think that
/reloadwould be a more apt name if it isn't going to result in a return to the startup screen. Since #6719 hasn't actually been resolved yet, if a/reloadis indeed actually what you'd prefer, then any solution that resolves one would simultaneously resolve the other. Do you agree with this assessment? I could, of course, be overlooking something I just woke an hour ago and haven't had any caffeine yet.JosXa commentedon Jan 18, 2026
I know the feeling ☕⚰️
Yeah, let me see. I suppose time would be better spent in the other ticket. I just figured that this one would maybe be easier to get going - but may aswell be wrong. I just ran an analysis on the codebase and posted it below:
#6719 (comment)
OC thinks it's not too hard.
github-actions commentedon Mar 27, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.