Skip to content

OpenCode repeatedly executes a command non stop #5356

Closed as not planned
Closed as not planned

Description

@zibler

Description

I have created a commit command (commit.md) I used to automatically create commits. Usually after I am done making changes, I call this command with /commit. Most of the time it works fantastic. However, every once in a while it goes into a loop continuously committing the same thing over and over again. See below my git history

Image

You can see the session just keeps executing the command. It is entirely possible this maybe my command definition or even the model of my choosing, so I apologize if this is not a bug. The screen shot below shows how the command had pushed the code to my git repo, and immediately after that, began the process again.

Image

OpenCode version

1.0.143

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Linux Debian 12

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 11, 2025
  2. github-actions commented on Dec 11, 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.

  3. rekram1-node commented on Dec 11, 2025

    @rekram1-node
    Collaborator

    I see this with certain models, id be super surprised if u got this with sonnet 4.5 even if it wss on copilot

  4. rekram1-node commented on Dec 11, 2025

    @rekram1-node
    Collaborator

    any chance u can share session

  5. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 11, 2025
  6. zibler commented on Dec 12, 2025

    @zibler
    Author

    You are correct. I use different models depending on the task I am doing
    for this commits I use opencode/grok-code.
    Note that I usually run some agent using some model, and then call commit.
    Often times after calling commit, I immediately create a new session to start working on something else, while the older session finishes its work. I don't know if this has something to do or not.

    Here is the session. I did an export. Hopefully, this is what you mean.

    session-ses_4f48.md

  7. changed the title [-]OpenCode repeatedly execute a command non stop[/-] [+]OpenCode repeatedly executes a command non stop[/+] on Dec 12, 2025
  8. reopened this on Mar 25, 2026
  9. removed
    bugSomething isn't working
    on May 3, 2026
  10. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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