Repository navigation
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Summary:
Exiting the TUI closes the UI but the opencode process doesn’t return control to the shell.
I have to Ctrl+C to regain the prompt.
This does not occur if I remove my opencode.json, but it consistently reproduces when I restore it.
Steps to reproduce
- Use opencode with the config below.
- Open the TUI, then /exit
- Observe that the terminal does not return to the shell; process appears suspended until Ctrl+C.
Behaviour
- Expected behavior: After exiting the TUI, opencode should terminate and return control to the shell.
- Actual behavior: TUI closes, but the opencode command hangs and requires Ctrl+C.
- Workaround: Remove opencode.json (issue no longer reproduces).
Environment
- OS: Darwin Varuns-MacBook-Pro.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:48:46 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8103 arm64
- Shell: zsh 5.9
- sst-opencode version: 0.4.1
- Install method: YOLO (Curl + Bash)
- Additional context
- The issue seems tied to the config below.
Notably, MCP providers are launched via docker run -i which may be keeping stdin open after the TUI exits.
- The issue seems tied to the config below.
Config:
{
"$schema": "https://opencode.ai/config.json",
"share": "disabled",
"permission": {
"bash": {
"git commit": "ask",
"git status*": "allow",
"git log*": "allow",
"git diff*": "allow",
"git push": "deny",
"git reset": "ask",
"git rebase": "ask",
"git merge": "ask",
"git cherry-pick": "ask",
"sudo": "ask",
"rm": "ask",
"mv": "ask",
"chmod": "ask",
"chown": "ask"
}
},
"mcp": {
"memory": {
"type": "local",
"command": [
"docker",
"run",
"-i",
"-v",
"claude-memory:/app/dist",
"--rm",
"mcp/memory"
],
"enabled": true
},
"sequentialthinking": {
"type": "local",
"command": [
"docker",
"run",
"--rm",
"-i",
"mcp/sequentialthinking"
],
"enabled": true
}
},
"provider": {
"openai": {
"models": {
"gpt-5": {
"name": "OpenAI GPT-5 (high reasoning)",
"options": {
"reasoningEffort": "high"
}
},
"o3": {
"name": "OpenAI o3 (high reasoning)",
"options": {
"reasoningEffort": "high"
}
}
}
}
}
}Reacted by Tor Arvid Lund and Arthur Andrade
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
thdxr commentedon Aug 11, 2025
can you try with mcp disabled?
V4G4X commentedon Aug 12, 2025
Yup, deleting the MCPs from the config removed the hangup.
Also I should add that the hangup happens after there's something in the conversation.
I typically send a "hi" to recreate the issue.
wlecki commentedon Aug 12, 2025
I can confirm it happens to me as well, even with no MCP servers or no providers. When I quit the opencode, sometimes I can't even
Ctrl+Cagain and I have to quit the whole terminal. I honestly don't know what more information I can provide. It's very "generic"?arthur404dev commentedon Aug 12, 2025
I've noticed my hangs happened after I've added mcps to opencode @thdxr , maybe that's the source of it ?
veracioux commentedon Oct 10, 2025
Fixed by #3083.
Try it out if you feel so inclined.