Skip to content

Agent enters infinite loop in plan mode when attempting to write plan #12306

Closed as duplicate

Description

@sin-ack

Description

When using gpt-5.2-codex xhigh, the agent appears to enter an infinite loop when attempting to create the final plan file:

Image

When interrupted and manually put into build mode to give write access, it complained about the lack of a write tool despite instructions, and used apply_patch instead:

Image

After letting the agent write the plan file and putting it into plan mode again, the agent will successfully proceed with the plan by using the exit_plan tool.

Plugins

None

OpenCode version

1.1.51-11a93a1 (beta branch)

Steps to reproduce

  1. Put OpenCode in plan mode
  2. Ask the agent to plan a feature
  3. Watch it enter infinite loop

Screenshot and/or share link

Company-internal repo, so I can't share unfortunately. Screenshots are above.

Operating System

Gentoo Linux amd64

Terminal

Ghostty 1.2.3

Activity

  1. github-actions commented on Feb 5, 2026

    @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. sin-ack commented on Feb 5, 2026

    @sin-ack
    Author

    Seems like #10883 and #11078 are the same issue, closing in favor of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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