Skip to content

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

Closed

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

Activity

  1. github-actions commented on Aug 16, 2025

    @github-actions
    Contributor

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

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

  2. rekram1-node commented on Aug 16, 2025

    @rekram1-node
    Collaborator

    yeah large file support needs some work

  3. hujianxin commented on Aug 17, 2025

    @hujianxin
    Author

    yeah large file support needs some work

    @rekram1-node Thanks. Let me add to my description. When Claude Code tries to read a large file, it finds that the file is too big. Then, when you send this to the LLM, it will inform the large model of the fact that the file is too large. After that, it keeps the conversation going through precise searching. This seems very smooth and AGI-like.

  4. rekram1-node commented on Aug 17, 2025

    @rekram1-node
    Collaborator

    thank you @hujianxin

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