Skip to content

Write tool SSE timeout with claude-opus-4.6 via GitHub Copilot when generating long markdown files #17578

@M1L0J05

Description

@M1L0J05

Description

Description

When using claude-opus-4.6 via GitHub Copilot provider, the Write tool consistently
times out with "Error: SSE read timed out" when attempting to create markdown files
of moderate length (~150-200 lines).

The pattern is highly reproducible: the agent generates the file content, shows
"Preparing write...", and after ~2 minutes the operation aborts with the SSE timeout.

This appears to be the same root cause as #17574, #17318, and #17307 but specifically
affecting the GitHub Copilot provider (not local models).

Aggravating factor: Pyright LSP diagnostics

The project contains Python files with unresolved imports (virtual environment not
activated in the opencode context). Each Write operation triggers Pyright to re-analyze
the entire project, generating hundreds of lines of LSP diagnostics that are appended
to the tool response. This significantly increases the response payload size and
contributes to exceeding the SSE timeout.

Even writing a .md file (which Pyright should not analyze) triggers a full project
re-scan, suggesting the LSP diagnostics are not scoped to the file being written.

Plugins

  • context7 MCP server (unrelated to the issue)

OpenCode version

1.2.26

Steps to reproduce

  1. Open a project with Python files that have unresolved imports (e.g., packages
    installed in a venv that opencode doesn't activate)
  2. Use claude-opus-4.6 via GitHub Copilot provider
  3. Build up a moderate conversation context (~10-15 tool calls of reading files)
  4. Ask the agent to write a markdown file of ~150+ lines using the Write tool
  5. Observe "Preparing write..." followed by "Tool execution aborted - Error: SSE
    read timed out" after ~2 minutes

The issue is 100% reproducible after step 4. Retrying the same Write call fails
identically every time.

Workaround attempted

Expected behavior

The Write tool should complete successfully for files of any reasonable size.
Ideally, LSP diagnostics should not be included in the tool response payload
(or should be streamed separately) to avoid inflating the SSE response.

Screenshot

~ Preparing write...
Tool execution aborted

|
| Error: SSE read timed out
|

Operating System

Linux (Arch-based), kernel 6.x, 32GB RAM, 16 cores, no resource constraints.

Terminal

OpenCode TUI (CLI)

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

No one assigned

    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