Skip to content

Build mode stops executing before task is complete #7159

Closed

Description

@jtaavola

Description

While running playwright or playwriter mcp tools, opencode will randomly end early. I first noticed this sometime last night 1/5/2026.

Using the CLI and Opus-4.5 (Claude Code).

Plugins

No response

OpenCode version

1.1.4

Steps to reproduce

  1. Use Claude Code opus-4.5
  2. Use playwright or playwriter MCP
  3. Give it an arbitrary long running task

Screenshot and/or share link

Image

Operating System

macOS 15.5

Terminal

Ghostty

Activity

  1. github-actions commented on Jan 7, 2026

    @github-actions
    Contributor

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

    These issues all describe similar symptoms of execution prematurely stopping or halting during task completion. Your issue with playwright/playwriter MCP tools stopping before task completion appears related to this pattern.

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Jan 7, 2026

    @rekram1-node
    Collaborator

    Huh that's weird...

  3. rekram1-node commented on Jan 7, 2026

    @rekram1-node
    Collaborator

    Does this only happen when using that mcp server?

  4. jtaavola commented on Jan 7, 2026

    @jtaavola
    Author

    Does this only happen when using that mcp server?

    Yeah mainly the playwriter mcp, I swear I had issues with the official playwright mcp earlier today too. Both seem to be fine in claude code

  5. Vikt0r70 commented on Jan 7, 2026

    @Vikt0r70

    I am having the Same Issue , I think not only playwright, even chrome dev tool, and i think more MCPs can cause this cut in the executing, and none browser MCPs can lead to the same issue , I have been trying to solve it all day , nothing worked

    Are You Using any type of proxy for your LLMs? I have been trying without the proxy seems I have different results

  6. luisrudge commented on Jan 12, 2026

    @luisrudge

    having the same issue when doing screenshots with the screencapture macos cli

  7. luisrudge commented on Jan 13, 2026

    @luisrudge

    this makes the whole 'ralph loop' unusable because OC stops halfway through a step and then starts a new iteration without finalizing the first one

  8. pascalwhoop commented on Jan 14, 2026

    @pascalwhoop

    had the same a few times and came here to check what's happening. It just ends for no real reason

    Image

    generally wondering how much the claude + claude-code combo outperforms independent client / model development. If this is anything like apple vertically integrating hardware and software, I suspect this project has a difficult task to make various models play ball with the prompts they receive from opencode vs. say codex or CC

  9. pascalwhoop commented on Jan 14, 2026

    @pascalwhoop

    one more, the Codex 5.2 is really loosing it in opencode, no idea what it's on about. All I asked it was to search the repo for some files

    Image
  10. dzervas commented on Jan 14, 2026

    @dzervas

    I have the same issue with opus by antigravity for nearly any tool

    EDIT: I was able to fix this by changing the defined provider from @ai-sdk/openai-compatible to @ai-sdk/anthropic.

    here's my config:

      "provider": {
        "dzervart": {
          "models": {
            "gemini-3-pro-preview": {
              "name": "gemini-3-pro"
            },
            "gemini-claude-opus-4-5-thinking": {
              "name": "opus-4.5"
            },
            "gemini-sonnet-claude-4-5-thinking": {
              "name": "sonnet-4.5"
            },
            "glm-4.7": {
              "name": "glm-4.7"
            },
            "gpt-5.2(high)": {
              "name": "gpt-5.2"
            },
            "gpt-5.2-codex(high)": {
              "name": "gpt-5.2-codex-high"
            },
            "gpt-5.2-codex(medium)": {
              "name": "gpt-5.2-codex"
            }
          },
          "name": "DZervArt",
          "npm": "@ai-sdk/anthropic",
          "options": {
            "apiKey": "sk-dummy",
            "baseURL": "https://127.0.0.1:8354/v1"
          }
        }
      },

    note that I've only tested opus and I'm not sure how the rest of the models behave. I'll define each model family to their respective provider at some point, but not yet

    EDIT2: neither anthropic, not google liked me using OC, beware that people get banned for using OC with a claude subscription 🔥

  11. starcraft66 commented on Jan 14, 2026

    @starcraft66

    I'm seeing the same issue with playwright mcp server (the only one in my config). I keep having to tell it to keep going.

  12. rekram1-node commented on Jan 14, 2026

    @rekram1-node
    Collaborator

    looking into this today

  13. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Collaborator

    Hm trying to replicate and can't, if anyone can share full sessions that'd be super helpful

  14. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    I think ik the issue here:

    result.push({
    id: Identifier.ascending("message"),
    role: "user",
    parts: [
    {
    type: "text",
    text: `Tool ${part.tool} returned an attachment:`,
    },
    ...part.state.attachments.map((attachment) => ({
    type: "file" as const,
    url: attachment.url,
    mediaType: attachment.mime,
    filename: attachment.filename,
    })),
    ],
    })
    }

    For those using mcps or dealing w/ images in any variety, and that is what this issue will focus on because it is what OP is reporting, I think it's due to this user message injected. This was originally done so that tools could output images and it never got cleaned up

    Need to figure out how to make it not require a user message (not very intuitive ai sdk behavior, or im an idiot)

  15. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    Found fix I think, gonna add it shortly

    This should fix it:
    de2de09

    Theory is that the user message containing the image was confusing the model, instead just keep the image data as tool part, should prevent it from stopping the loop randomly

  16. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    This should be fixed in 1.1.24, going out rn

  17. starcraft66 commented on Jan 16, 2026

    @starcraft66

    Will definitely test it out thanks. Now that I think of it I think it was hanging when playwright mcp was screenshotting pages so your diagnosis makes sense.

  18. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    Accidentally introduced a regression w/ compaction with that fix reverting and then gonna try to find better solution

  19. laruss commented on Jan 17, 2026

    @laruss

    Hmm, the problem is reproducible for me too, but my MCP server is not returning any attachments, only text.
    Here's mcp server I am using (self-built): grok-imagine-mcp
    it works fine for claude code.
    Using Opus 4.5 (github copilot)

    Image
  20. luisrudge commented on Jan 18, 2026

    @luisrudge

    @laruss your tool call is absolutely generating an image, hence the name grok-imagine_generate_image 😅

  21. rekram1-node commented on Jan 18, 2026

    @rekram1-node
    Collaborator

    @laruss from the readme of linked project:

    Generating Images
    Once configured, you can ask Claude to generate images:

    Generate an image of a sunset over mountains and save it to /Users/username/Pictures
    Claude will use the generate_image tool, which will:

    Send a request to the Chrome extension via WebSocket
    The extension opens grok.com/imagine in a new tab
    Automates entering the prompt and generating the image
    Captures the generated image as base64
    Closes the tab and sends the image back
    The MCP server saves the image to the specified folder

    So it definitely generates and returns image

  22. laruss commented on Jan 18, 2026

    @laruss

    @rekram1-node it generates an image and saves it in the location requested by the agent (yeah, it's a bit tricky)

  23. cheuklcl commented on Jan 19, 2026

    @cheuklcl

    @rekram1-node I also experience the stopping issue when using the Notion MCP. It only starts by calling notion_notion-search to search for documents and then begins analyzing them, but it stops before the search is completed at around 12.1 seconds. Using the plugin supermemory querying project data also stops after about 5.4 seconds. I’m not sure whether this is related to an MCP issue.

  24. rekram1-node commented on Jan 22, 2026

    @rekram1-node
    Collaborator

    Okay should be fixed in next release fr this time: c284469

  25. MNCloudwerksTechnology commented on May 29, 2026

    @MNCloudwerksTechnology

    Still reproducible in 1.15.12 using qwen3.6-35b-a3b

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions