openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: Agent stuck in infinite session summary loop**

Open abyshajan opened this issue 8 months ago • 22 comments

Summary

the agent automatically generates a "Goal / Instructions / Discoveries / Accomplished" summary block after every single message — including simple greetings like "hi". The summary then gets passed as context to the next response, which triggers another summary, creating an infinite loop.

To Reproduce

  1. Open OpenWork (Starter workspace)
  2. Start a new session
  3. Type "hi"
  4. Agent responds with a full structured summary instead of a normal reply
  5. Every subsequent message triggers another summary — the agent never responds normally

Expected behavior

Agent should respond naturally to messages. Session summaries should only appear when explicitly requested or when context compression is genuinely needed.

Actual behavior

Every response includes a structured block like:

  • Goal
  • Instructions
  • Discoveries
  • Accomplished
  • Relevant files / directories
  • Next steps for the next agent

Screenshots (optional)

No response

OW version & Desktop info (optional)

No response

Additional context (optional)

The tool is completely unusable in this state. Every session immediately enters the loop regardless of input. This appears to be a built-in session handoff / context compression feature that is misfiring on every message instead of only triggering when context is long or explicitly requested.

abyshajan avatar Mar 22 '26 11:03 abyshajan

Same here.

robinszeto avatar Mar 22 '26 13:03 robinszeto

Linking this with #1074 and #777 (and the broader agent-loop discussion in #932) since these reports look like the same recurring loop family.

benjaminshafii avatar Mar 22 '26 18:03 benjaminshafii

@benjaminshafii this issues still exist in latest version 1.84 - its a breaking issue, unable to use openwork

surapuramakhil avatar Mar 23 '26 18:03 surapuramakhil

This problem is so fatal that openwork cannot be used at all.

sacrtap avatar Mar 24 '26 04:03 sacrtap

We have a fix for this Will be in next release

OmarMcAdam avatar Mar 24 '26 04:03 OmarMcAdam

Can you try in .185 + and report if ths issue is still happening? We shipped a fix to detect if the convo is in a doom_loop and require input from the user This mimics the underlying opencode implementation

will keep issue open for now till we get confirmation of a fix

OmarMcAdam avatar Mar 24 '26 14:03 OmarMcAdam

Can you try in .185 + and report if ths issue is still happening? We shipped a fix to detect if the convo is in a doom_loop and require input from the user This mimics the underlying opencode implementation

will keep issue open for now till we get confirmation of a fix

Still not resolved @OmarMcAdam

Version 0.11.186 (0.11.186)

Image Image

sacrtap avatar Mar 24 '26 14:03 sacrtap

What provider are you using that OpenAi gpt-5.2 isnt matching our patterns

Image

OmarMcAdam avatar Mar 24 '26 15:03 OmarMcAdam

its not resolved

surapuramakhil avatar Mar 24 '26 15:03 surapuramakhil

Which provider/model? Is it using built in providers or custom?

OmarMcAdam avatar Mar 24 '26 15:03 OmarMcAdam

@OmarMcAdam I am using customer provider - Alicloud qwen3.5 plus

surapuramakhil avatar Mar 24 '26 15:03 surapuramakhil

Did you manually set it up in the opencode.json Or use the ui to configure?

It seems like the context window is set too low

OmarMcAdam avatar Mar 24 '26 15:03 OmarMcAdam

Did you manually set it up in the opencode.json Or use the ui to configure?

Manually set in opencode.json

It seems like the context window is set too low

its standard context size - which was working fine previously - 128k tokens

surapuramakhil avatar Mar 24 '26 15:03 surapuramakhil

please send me copy of config so i can try to replicate @mcpizza on discord

I'm 99% certain this is to do with custom providers now and is a separate issue from the endless loop

OmarMcAdam avatar Mar 24 '26 17:03 OmarMcAdam

@OmarMcAdam shared you config via DM in discord

surapuramakhil avatar Mar 24 '26 17:03 surapuramakhil

@OmarMcAdam I have changed the model, still not resolved

input :"who are you"

Image

sacrtap avatar Mar 25 '26 02:03 sacrtap

Ok we're still debugging this and conflicting with an upstream issue for now please switch off auto compaction Settings > Workspace > Model > Auto context compaction > OFF

OmarMcAdam avatar Mar 25 '26 22:03 OmarMcAdam

@OmarMcAdam I am facing same even auto compaction is off .

surapuramakhil avatar Mar 26 '26 21:03 surapuramakhil

Please update to v0.11.194 and check behaviour if it still does it in an old convo, try creating a new convo

src-opn avatar Mar 26 '26 21:03 src-opn

@src-opn - its still same

Image

surapuramakhil avatar Mar 26 '26 21:03 surapuramakhil