Skip to content

opencode stucks while trying to write a file #2144

Closed

Description

@vldF

When I try to generate a code, the opencode can read files and even run bash commands. However, when it tries to write a file with tool (I guess), it hangs for some time and then TimeoutError: The operation timed out. appears:

Image

I have tried multiple models, now, I try deepseek r1. Also, I use custom proxy with openai/openrouter interface, but it works fine with continue. How can I troubleshoot it? Logs contains nothing

2025-08-21T131406.log

Activity

  1. vldF commented on Aug 21, 2025

    @vldF
    Author

    Hmm, it can create AGENT.md file when I do /init. Probably it's something with LSP? I have no one locally

  2. vldF commented on Aug 21, 2025

    @vldF
    Author

    I disabled golsp (is isn't on my computer, whatever)

    "lsp": {
        "gopls": {
            "disabled": true
        }
    

    Nothing changed: it can't write .go files and gets stuck on preparing write... step

    Image
  3. rekram1-node commented on Aug 21, 2025

    @rekram1-node
    Contributor

    very strange:

    ERROR 2025-08-21T13:19:06 +84ms service=session session=ses_733e88c4effePUe2uI4BP5zG9I error={}
    INFO  2025-08-21T13:19:06 +0ms service=bus type=session.error publishing
    DEBUG 2025-08-21T13:19:06 +2ms service=tui timeTakenMs=2 messages.renderView
    ERROR 2025-08-21T13:19:06 +1ms service=tui message=TimeoutError: The operation timed out. name=UnknownError Server error
    INFO  2025-08-21T13:19:06 +1ms service=bus type=storage.write publishing
    INFO  2025-08-21T13:19:06 +0ms service=bus type=message.part.updated publishing
    INFO  2025-08-21T13:19:06 +0ms service=bus type=storage.write publishing
    INFO  2025-08-21T13:19:06 +0ms service=bus type=message.updated publishing
    INFO  2025-08-21T13:19:06 +1ms service=session session=ses_733e88c4effePUe2uI4BP5zG9I sessionID=ses_733e88c4effePUe2uI4BP5zG9I unlocking
    INFO  2025-08-21T13:19:06 +0ms service=bus type=session.idle publishing
    INFO  2025-08-21T13:19:06 +1ms service=server duration=293672 response
    DEBUG 2025-08-21T13:19:06 +2ms service=tui message=msg_8ccc3feb8001glAwR7dkfMZk88 part=prt_8ccc424c6001hEtSrSv3r1VUjw message part updated
    DEBUG 2025-08-21T13:19:06 +3ms service=tui pending render, skipping
    
    disabled_providers=["openai","gemini","openrouter"] small_model=ollama/gemma3:1b provider={"ollama":{"name":"Ollama (local)","npm":"@ai-sdk/openai-compatible","models":{"gemma3:1b":{"name":"gemma3:1b"},"gpt-oss:20b":{"name":"gpt-oss:20b"}},"options":{"baseURL":"http://localhost:11434/v1"}},"llm-proxy":{"name":"<my-provider-name>","npm":"@ai-sdk/openai-compatible","models":{"z-ai/glm-4.5":{"name":"z-ai/glm-4.5"},"qwen3-coder-plus":{"name":"qwen3-coder-plus"},"moonshotai/kimi-k2":{"name":"kimi-k2"},"deepseek-reasoner":{"name":"deepseek-reasoner r1"},"deepseek-chat":{"name":"deepseek-chat v3"}},"options":{"baseURL":"<my-base-url>/"}}} permission={"edit":"allow","bash":"allow","webfetch":"allow"} agent={} mode={} plugin=[] username=v.feofilaktov loaded
    

    what provider are you using for deepseek-reasoner?

  4. vldF commented on Aug 21, 2025

    @vldF
    Author

    @rekram1-node, I use my custom company's provider with "npm": "@ai-sdk/openai-compatible" set

  5. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

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