Skip to content

OpenCode doesn't perform as well as Claude Code when processing large files #2003

@hujianxin

Description

@hujianxin

First, I used the same model, qwen3-coder.

I used the same prompts and ran the code multiple times to minimize randomness.

I have a C++ file with nearly 20,000 lines. Let's not discuss whether this is a good design, but it exists.

  1. Claude Code tends to use the Search command to locate a precise location before partially reading the code. While OpenCode also partially reads the code, it doesn't actively use Search (strangely, given that it uses the same model), instead reading the file incrementally from the beginning.
  2. When Claude Code reads a file large enough to break the context window (large enough to break the context window), it directly reports an error instead of sending it to the large model. OpenCode also encountered a situation where the context window was exceeded during execution.

I'm a fan of both OpenCode and @thdxr , and I hope they continue to iterate towards perfection.

Image Image

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