Repository navigation
Description
Description
In serve/web mode, an MCP tool can complete successfully but the session never resumes to the next assistant turn and never finalizes a user-visible answer.
This is not the same as a pending permission or pending question state.
In our repro, the tool call finishes successfully, /permission returns [], /question returns [], and the session remains stuck after the completed tool part.
This was reproduced in a Build-embedded OpenCode deployment behind a launcher/reverse proxy, but the stuck behavior appears to be in the OpenCode orchestration/runtime path after a successful MCP tool result.
Representative failing flow:
- User prompt:
what git orgs do I have access to? - Agent follows prompt guidance and calls
gitea_gitea_user_current - Tool returns successfully with the current user login
- No pending permission request remains
- No pending question request remains
- No final assistant continuation appears
Representative successful tool output:
{
"id": 1,
"login": "gitea_admin",
"full_name": "",
"email": "[email protected]",
"avatar_url": "https://git.thepeoples.dev/avatars/257dfd123bbdae720b16c78fe50454c0"
}We also reproduced a similar shape on a generic bash-tool prompt after switching bash permissions to allow: the tool executes successfully, but the assistant still may not continue to a final answer.
Plugins
Build-local plugins plus a local MCP server:
secret-guard.jsworkspace-shell.js- local Gitea MCP server (
gitea-mcp-tool)
OpenCode version
1.3.15
Steps to reproduce
- Run OpenCode in serve/web mode.
- Configure a local MCP server for Gitea.
- Create a session using a normal tool-capable agent.
- Send a prompt like:
what git orgs do I have access to? - Observe that OpenCode calls
gitea_gitea_user_currentand receives a successful result. - Query the session state and auxiliary endpoints.
- Observe:
- the MCP tool part is marked completed
/permissionreturns[]/questionreturns[]- no follow-up assistant answer is generated
Additional repro signal:
- Configure bash permission so shell calls do not block on approval.
- Prompt:
Use tools to tell me what files are in the current directory. - Observe the
bashtool call completes successfully. - The assistant may still fail to continue to a final natural-language answer.
Screenshot and/or share link
No share link. We validated this through the serve/web session endpoints directly:
GET /session/{id}/message?limit=100GET /permissionGET /question
Representative session IDs from our environment:
ses_27dae160affelgEU106T8voc7d(Gitea repro)ses_27dae1677ffeP91bFZpxOrhhSW(generic tool repro after bash allow)
Operating System
Linux (Kubernetes pod on Fedora CoreOS host)
Terminal
Web UI / serve mode behind a reverse proxy launcher
Activity
github-actions commentedon Apr 12, 2026
This issue might be a duplicate of existing issues. Please check:
opencode runhangs after completing tool calls — process never exits #17516:opencode runhangs after completing tool calls — same symptom (session/process does not continue after a successful tool result), though that issue reproduces in headlessopencode runmode rather than serve/web modegithub-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.