Skip to content

OpenCode hangs without responding to a simple prompt when AGENTS.md is present #59556

Open

Description

@bl4ckswat

Description

Description

OpenCode hangs indefinitely and produces no response, even when given a simple prompt such as halo.

This happens when OpenCode is launched from /home/xxxx with my original AGENTS.md file. The issue occurs in both Plan and Build modes.

OpenCode works normally from /home/xxxx/test. Renaming the original /home/xxxx/AGENTS.md to disable it restores normal responses. Replacing it with a simplified version also resolves the issue.

The original AGENTS.md contains general workflow instructions, including language preferences, tool creation rules, Git restrictions, and a requirement to archive and update result.md after each completed task.

I have not isolated the exact instruction responsible.

Environment

  • OS: Lubuntu Linux
  • OpenCode version: 1.19.4
  • API provider: The provider configured in OpenCode

Steps to Reproduce

  1. Place the original AGENTS.md in /home/xxxx.
  2. Launch OpenCode from /home/xxxx.
  3. Enter either Plan or Build mode.
  4. Send the simple prompt halo.
  5. Observe that OpenCode remains in a loading state without responding.
  6. Rename or disable the original AGENTS.md and repeat the test.
  7. Observe that OpenCode responds normally.

Expected Behavior

OpenCode should respond to a simple prompt or display a meaningful error instead of hanging indefinitely.

Actual Behavior

OpenCode remains in a loading state without returning a response when the original AGENTS.md is present.

Additional Notes

The issue appears related to the original AGENTS.md, but the exact cause has not been identified. Replacing it with a simplified version resolves the issue.

Plugins

No response

OpenCode version

1.19.4

Steps to reproduce

No response

Screenshot

No response

Operating System

Lubuntu

Terminal

QTerminal

Activity

  1. opencode-agent commented on Oct 27, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report, @bl4ckswat!

    You're on OpenCode 1.19.4, which is v1 (the opencode-ai package). v1 now only gets fixes for critical bugs such as data loss, security problems or breakage with no workaround. Since a simplified AGENTS.md works for you, this one is unlikely to be fixed in v1.

    Please try OpenCode v2 (the @opencode/cli package, opencode command), where active development happens. If the same AGENTS.md also hangs on v2, reply here with your v2 version (opencode --version), your provider and model, and if you can, a trimmed copy of the AGENTS.md that still causes the hang. Please also reply if you think this is critical.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions