Skip to content

Implementation hallucinated in plan mode #2077

Closed

Description

@nikhilmaddirala

When using plan mode with Claude Sonnet 4 (on a fairly simple task), the agent made a plan and hallucinated an implementation without realizing that it's in plan mode. Later when I switched it to build mode, it claimed that the implementation was already complete even though it didn't edit any files.

Ref: https://opencode.ai/s/mmQMJPzp

Activity

  1. github-actions commented on Aug 19, 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 19, 2025

    @rekram1-node
    Contributor

    Thx for issue nikhil, Do you think this is basically same issue as #1965?

    I have seen this happen a few times too

  3. nikhilmaddirala commented on Aug 21, 2025

    @nikhilmaddirala
    Author

    Thx for issue nikhil, Do you think this is basically same issue as #1965?

    I have seen this happen a few times too

    Upon closer inspection, yes it's the same issue. It edited the file using cat >> file << 'EOF'.

    But this was Claude Sonnet 4, and this never happens with claude code, so I think the issue is with opencode prompts.

    Feel free to merge the issues.

  4. rekram1-node commented on Aug 21, 2025

    @rekram1-node
    Contributor

    Will do thx!

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