Skip to content

[Bug]: Infinite compaction / continuation loop prevents coding from starting #2736

Description

@chelebyy

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer

Bug Description

When using oh-my-openagent, the agent sometimes gets stuck in a compaction / continuation loop and never starts actual coding.

I tested this with multiple models and also with a single agent setup (Hephaestus only). The issue still happens, so it does not seem to be specific to a particular model or multi-agent orchestration.

Observed behavior:

  • The agent keeps generating continuation / compaction style content repeatedly
  • It does not move on to implementation
  • It appears to re-enter the same summarization / continuation pattern over and over
  • Reinstalling the tool did not fix it

Important notes:

  • I also tested different agents previously (including Sisyphus and Hermes), but I can reproduce the same issue even with only Hephaestus enabled
  • I tested with multiple models and saw the same behavior
  • I removed and reinstalled multiple times, but the problem remains
  • I run wsl and windows

This looks like a recursive continuation / compaction loop rather than a model-specific issue.

I searched existing issues before posting this...

loop.txt

Steps to Reproduce

  1. Install and run oh-my-openagent on the latest version
  2. Use a normal coding task that includes enough context/history for compaction or continuation behavior to become relevant
  3. Run the task with a single agent setup (for example, Hephaestus only)
  4. Wait until the agent starts generating compaction / continuation style outputs
  5. Observe that it keeps repeating that pattern instead of starting code changes

I was able to reproduce this across multiple models and also after reinstalling.

Expected Behavior

The agent should compact context if needed, then continue the original coding task and begin implementation instead of repeatedly generating continuation / summary-style outputs.

Actual Behavior

The agent repeatedly produces continuation / compaction style output and never proceeds to actual coding or file modification.

Doctor Output

oMoMoMoMo Doctor

 ✓ System OK (opencode 1.2.5 · oh-my-opencode 3.6.0)

Error Logs

Agent output showing repeated compaction / continuation loop:

[search-mode]
MAXIMIZE SEARCH EFFORT...

[analyze-mode]
ANALYSIS MODE...

SYSTEM DIRECTIVE: OH-MY-OPENCODE - COMPACTION CONTEXT
...
Provide a detailed prompt for continuing our conversation above.

(This pattern repeats continuously and never proceeds to coding)

Configuration

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
  "agents": {
    "sisyphus": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "hephaestus": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "oracle": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "librarian": {
      "model": "google/gemini-3-flash-preview"
    },
    "explore": {
      "model": "opencode/gpt-5-nano"
    },
    "multimodal-looker": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "prometheus": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "metis": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "momus": {
      "model": "openai/gpt-5.4",
      "variant": "xhigh"
    },
    "atlas": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "sisyphus-junior": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    }
  },
  "categories": {
    "visual-engineering": {
      "model": "google/gemini-3.1-pro-preview",
      "variant": "high"
    },
    "ultrabrain": {
      "model": "openai/gpt-5.4",
      "variant": "xhigh"
    },
    "deep": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "artistry": {
      "model": "google/gemini-3.1-pro-preview",
      "variant": "high"
    },
    "quick": {
      "model": "openai/gpt-5.4-mini"
    },
    "unspecified-low": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "unspecified-high": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "writing": {
      "model": "google/gemini-3-flash-preview"
    }
  }
}

Additional Context

This issue blocks actual development because the agent never reaches the coding phase.

It keeps looping in compaction/continuation instead of executing tasks.

I also tried disabling multi-agent setups and testing with only Hephaestus, but the issue still occurs.

Operating System

Windows

OpenCode Version

1.2.27

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