Skip to content

[Bug]: Infinite loop of tool calls #1033

@LeoNardo-LB

Description

@LeoNardo-LB

Prerequisites

  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation

Bug Description

This situation occurred during tool invocation
Image

After manual intervention, it was prompted to ignore the last callback message, but this situation still occurred later.Image

Steps to Reproduce

  1. chose the zhipuai-coding-plan/glm-4.7 model
  2. Make a plan to solve the problem and use Prometheus
  3. /start-work to execute the plan
  4. This situation occurred after a long period of operation.
  5. After actively intervening and interrupting, when using /ulw-loop to continue execution, this situation still occurs.

Expected Behavior

normal tool call

Actual Behavior

Infinite loop tool call, see the picture

Doctor Output

Installation
────────────────────────────────────────
  ✓ OpenCode Installation → 1.1.34
  ✓ Plugin Registration → Registered (pinned: 3.0.0-beta.16)

Configuration
────────────────────────────────────────
  ✓ Configuration Validity → Valid JSON config

Authentication
────────────────────────────────────────
  ✓ Anthropic (Claude) Auth → Auth plugin available
  ○ OpenAI (ChatGPT) Auth → Auth plugin not installed
  ○ Google (Gemini) Auth → Auth plugin not installed

Dependencies
────────────────────────────────────────
  ✓ AST-Grep CLI → installed
  ⚠ AST-Grep NAPI → Not installed (optional)
  ⚠ Comment Checker → Not installed (optional)

Tools & Servers
────────────────────────────────────────
  ⚠ GitHub CLI → Not installed (optional)
  ✓ LSP Servers → 2/4 servers available
  ✓ Built-in MCP Servers → 2 built-in servers enabled
  ○ User MCP Configuration → No user MCP configuration found

Updates
────────────────────────────────────────
  ✓ Version Status → Pinned to version 3.0.0-beta.16

Summary
────────────────────────────────────────

  8 passed, 0 failed, 3 warnings, 3 skipped
  Total: 14 checks in 972ms

⚠ All systems operational with warnings.

Error Logs

Configuration

// oh-my-opencode.json
{
    "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
    "agents": {
        "sisyphus": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "librarian": {
            "model": "zhipuai-coding-plan/glm-4.5-air"
        },
        "explore": {
            "model": "zhipuai-coding-plan/glm-4.5-air"
        },
        "oracle": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "frontend-ui-ux-engineer": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "document-writer": {
            "model": "zhipuai-coding-plan/glm-4.5-air"
        },
        "multimodal-looker": {
            "model": "zhipuai-coding-plan/glm-4.6V"
        },
        "atlas": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "OpenCode-Builder": {
            "model": "zhipuai-coding-plan/glm-4.7",
            "disable": true
        },
        "build": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "metis": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "momus": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "plan": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "prometheus": {
            "model": "zhipuai-coding-plan/glm-4.7"
        },
        "sisyphus-junior": {
            "model": "zhipuai-coding-plan/glm-4.7"
        }
    }
}

Additional Context

windows11 - wsl2:ubuntu 24.04.1

Operating System

Other

OpenCode Version

oh-my-opencode@3.0.0-beta.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions