Skip to content

[Web UI] Task never stops — agent runs indefinitely when using opencode serve #26365

Closed as not planned

Description

@lileilei-camera

Bug Description

When using OpenCode via the web interface (opencode serve), tasks never stop. The agent enters an infinite loop and continues running indefinitely, even after the task appears to be completed. The TUI stops correctly — this issue only occurs in the web UI.

Steps to Reproduce

  1. Start OpenCode: opencode serve
  2. Open browser, access web UI via SSH port forwarding
  3. Give the agent a coding task
  4. Agent completes the task but never stops — keeps running in an endless loop

Expected Behavior

Agent should stop after completing the task.

Actual Behavior

Agent runs indefinitely. Web UI shows task as still active with no way to stop it. No error message, agent just keeps "thinking".

Environment

  • OpenCode Version: 1.14.29
  • Server OS: Linux (Ubuntu)
  • Browser: Chrome 148 on Windows 10
  • Access method: SSH port forwarding to opencode serve

Additional Context

  • The same task works correctly in TUI mode
  • Only happens in web UI mode
  • Wastes API credits as the agent keeps making calls in the loop
  • This makes the web UI unusable for any meaningful work

Activity

  1. github-actions commented on May 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these (e.g. specific to the browser-based web UI rather than opencode attach), please add clarifying details to help distinguish it.

  2. added a commit that references this issue on May 30, 2026
    cda0913
  3. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions