Description
Opencode hangs on "Preparing patch..." indefinitely when editing large Python files inside large projects (reproduced with server_args.py ~255KB in the sglang repo).
pyright cold-starts and scans the entire project on every session, running at 100+ CPU. During that scan it stops draining its stdin socket. textDocument/didOpen sends the full file -- at 255KB this overflows the ~213KB kernel socket buffer. Both sides stall. No timeout, no recovery.
Confirmed with ss -xp: Recv-Q 219KB, Send-Q 224KB simultaneously. Doesn't reproduce when the file is isolated -- no pyproject.toml means no project scan, pyright drains the socket instantly.
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
Description
Opencode hangs on "Preparing patch..." indefinitely when editing large Python files inside large projects (reproduced with server_args.py ~255KB in the sglang repo).
pyright cold-starts and scans the entire project on every session, running at 100+ CPU. During that scan it stops draining its stdin socket. textDocument/didOpen sends the full file -- at 255KB this overflows the ~213KB kernel socket buffer. Both sides stall. No timeout, no recovery.
Confirmed with ss -xp: Recv-Q 219KB, Send-Q 224KB simultaneously. Doesn't reproduce when the file is isolated -- no pyproject.toml means no project scan, pyright drains the socket instantly.
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