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
{{ message }}
Repository navigation
MCP tool completes successfully but session never resumes or finalizes in serve/web mode #22156
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
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.js
workspace-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_current and receives a successful result.
Query the session state and auxiliary endpoints.
Observe:
the MCP tool part is marked completed
/permission returns []
/question returns []
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 bash tool 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=100
GET /permission
GET /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.