Skip to content

compaction loop and hitting context limit 200k on single request #29450

@tony81231

Description

@tony81231

Description

This morning I added skills from a GitHub repo! I added around 1,500 skills, and I was working on a project, and it suddenly got into a loop where it is not listening to me and it is working on a loop. and not waiting for my command, and it's doing it by itself. I tried to uninstall, clear cache, config files, everything, and reinstall. Try again, and still it did not work. I tried another provider and model on opencode, for example Gemini. It's working completely fine. Again, I try to connect to open code provider. It is getting into the compaction loop. I tried open code free models,I tried open-source, free models.- Deep seek v4 flash free

  • Big pickle
  • Nemracton 3 super free
    I am getting this compaction loop only on the opencode provider.

I have provided a small screenshot and small session details.

Appreciate it if anyone could fix this.

Plugins

No response

OpenCode version

1.15.10

Steps to reproduce

No response

Screenshot and/or share link

Image

hi
Thought: The user greeted me with "hi". Let me respond in a friendly, concise manner.
Hi! How can I help you today?
▣ Build · Big Pickle · 1m 3s
Thought: Let's look at the conversation history. The user just said "hi" and then asked to create a new anchored summary from that. Wait, the first message is the user saying hi, then the assistant replies, then the user asks to make a summary. But the actual task here—wait, the user's request is to create the summary based on the conversation above. But the conversation before the summary request is just a greeting. Let's go through each section.
Goal: The user's latest request is to create a new anchored summary from the conversation history. So the task is to generate the requested anchored summary following the given template.
Constraints & Preferences: The user specified to use exactly the Markdown structure in the template, keep section order, not include the template tags, keep every section even if empty, use terse bullets, preserve exact details, not mention the summary process. So those are constraints.
Progress: Done—none yet, since we're just starting. In Progress—probably generating the summary? Wait, no, let's check. The conversation history before the summary request is just greetings. Wait, the user's current task is to create the summary. Let's fill in each section properly.
Wait let's recheck the conversation:

  1. User: hi
  2. Assistant: Hi! How can I help you today?
  3. User: Create a new anchored summary from the conversation history above. Output exactly the Markdown structure... template and rules
    So the conversation history that the summary is based on is turns 1 and 2, but the user's current request is to make the summary. Wait, but the goal is the user's task. The user's task here is to have an anchored summary created from the prior conversation (which was just greetings). But let's follow the rules.
    Let's draft each section:
    Goal
  • Create a new anchored summary from the provided conversation history following the specified template and rules.
    Constraints & Preferences
  • Use exactly the Markdown structure provided in the template, keeping section order unchanged
  • Do not include the tags in the response
  • Keep every section even when empty
  • Use terse bullets, not prose paragraphs
  • Preserve exact file paths, commands, error strings, and identifiers when known
  • Do not mention the summary process or that context was compacted
    Progress
    Done
  • (none)
    In Progress
  • Generating the requested anchored summary
    Blocked
  • (none)
    Key Decisions
  • (none)
    Next Steps
  • Finalize and output the anchored summary per the template requirements
    Critical Context
  • The conversation history prior to the summary request consists only of initial greetings with no specific coding task or details shared yet.
    Relevant Files
  • (none)
    Wait that makes sense. Let's make sure each section is there, terse bullets, etc. Let's check the constraints: the user listed several rules, so those are constraints. The goal is to create the summary as requested. The progress: in progress is generating the summary. Critical context is that the prior convo is just greetings, no task yet. Yeah that fits.
    Goal
  • Create a new anchored summary from the provided conversation history following the specified template and rules.
    Constraints & Preferences
  • Use exactly the given Markdown structure, preserving section order
  • Exclude tags from the output
  • Keep all sections even when empty
  • Use terse bullets instead of prose paragraphs
  • Preserve exact identifiers, paths, and strings when known
  • Do not reference the summary process or context compaction
    Progress
    Done
  • (none)
    In Progress
  • Generating the requested anchored summary
    Blocked
  • (none)
    Key Decisions
  • (none)
    Next Steps
  • Finalize and output the summary aligned with the template requirements
    Critical Context
  • The conversation history prior to the summary request consists only of initial greetings, with no specific coding task or technical details shared yet.
    Relevant Files
  • (none)
    ▣ Compaction · Big Pickle · 29.9s
    Thought: The user is asking me to continue if there are next steps, or stop and ask for clarification if I'm unsure how to proceed.
    Looking at the current state:
    1. I've summarized that we've done essentially nothing yet - just initial greetings
    2. The user hasn't provided any specific task, goal, or question yet
    3. My "Next Steps" section says "Finalize and output the summary aligned with the template requirements" but that's circular thinking since I just created the summary
      The reality is that the user hasn't
      ▣ Build · Big Pickle · interrupted

    In this small session, it reached all 200k limit! In this small session, I only said "hi", that's it, and said nothing else, but it's assuming I am talking to it. And working on something else

    Operating System

    windows 10

    Terminal

    windows terminal

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions