openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: OpenWork continues infinitely outputting work summaries after command execution

Open jaywulove opened this issue 8 months ago • 10 comments

Summary

Image After I issue a command, OpenWork finishes executing, but the program doesn't stop. It keeps infinitely outputting messages similar to work summaries. Am I the only one experiencing this issue? How can this be resolved?

Steps to reproduce

After I issue a command, OpenWork finishes executing, but the program doesn't stop. It keeps infinitely outputting messages similar to work summaries. Am I the only one experiencing this issue? How can this be resolved?

Expected behavior

After I issue a command, OpenWork finishes executing, but the program doesn't stop. It keeps infinitely outputting messages similar to work summaries. Am I the only one experiencing this issue? How can this be resolved?

Actual behavior

After I issue a command, OpenWork finishes executing, but the program doesn't stop. It keeps infinitely outputting messages similar to work summaries. Am I the only one experiencing this issue? How can this be resolved?

jaywulove avatar Mar 07 '26 04:03 jaywulove

Same here

marcosvb1 avatar Mar 07 '26 13:03 marcosvb1

thx for reporting @jaywulove !

benjaminshafii avatar Mar 07 '26 14:03 benjaminshafii

This issue seriously affects the user experience

yuzhouwww avatar Mar 11 '26 07:03 yuzhouwww

我解決了這個問題了。 因為我不斷的叫openwork自行debug的過程中發現,它說這個不是它能處理的,因為這個來自opencode的核心設計。所以後來我回到opencode去,同樣的,叫它自己debug,最終opencode自行解決了這些問題。有興趣的人可以看一下。 I've managed to solve this problem. Through the process of continuously asking OpenWork to debug itself, I found out that it couldn't handle this because the issue originates from OpenCode's core design. So I went back to OpenCode and did the same—asked it to debug itself. Ultimately, OpenCode resolved these issues on its own. If anyone is interested, feel free to take a look. openwork-bug-fix-manual-EN.md openwork-bug-fix-manual.md

jaywulove avatar Mar 12 '26 14:03 jaywulove

+1

Nunchakus888 avatar Mar 16 '26 10:03 Nunchakus888

Same issue in my MacOS setup. OpenWork loop itself no matter the task is completed or not. That means, even if it finished the required work, it will just reperform again and again! Horrible! It burns token and make it completely un-usable in paid API situations.

robinszeto avatar Mar 22 '26 12:03 robinszeto

我解決了這個問題了。 因為我不斷的叫openwork自行debug的過程中發現,它說這個不是它能處理的,因為這個來自opencode的核心設計。所以後來我回到opencode去,同樣的,叫它自己debug,最終opencode自行解決了這些問題。有興趣的人可以看一下。 I've managed to solve this problem. Through the process of continuously asking OpenWork to debug itself, I found out that it couldn't handle this because the issue originates from OpenCode's core design. So I went back to OpenCode and did the same—asked it to debug itself. Ultimately, OpenCode resolved these issues on its own. If anyone is interested, feel free to take a look. openwork-bug-fix-manual-EN.md openwork-bug-fix-manual.md

Yes... It works!!! I used OpenCode to fix it using the above. Then I ask OpenCode what have been fixed, as below:

Two patches were applied to /Users/xxxxxxx/openwork/apps/app/src/app/app.tsx: Patch 1: Auto-Compaction Debounce (lines ~1950-1968) Problem: When a task completed, Auto-Compaction would trigger and may start new tasks, creating an infinite loop: Complete → Compact → New Task → Complete → Compact → ... Fix: Added a 30-second cooldown before allowing another auto-compaction: let lastAutoCompactTime = 0; const AUTO_COMPACT_DEBOUNCE_MS = 30000; const triggerAutoCompaction = async (sessionID: string) => { if (!autoCompactContext()) return; if (autoCompactingSessionId() === sessionID) return; const now = Date.now(); if (now - lastAutoCompactTime < AUTO_COMPACT_DEBOUNCE_MS) return; // NEW lastAutoCompactTime = now; // NEW // ... rest unchanged }; Patch 2: Auto-Generated Summary Filtering (lines ~2059-2076) Problem: OpenCode auto-generates structured summaries (Goal/Instructions/Discoveries/Accomplished) after task completion, which cluttered the UI. Fix: Added a filter to hide these auto-generated messages: const AUTO_SUMMARY_KEYWORDS = ["Goal", "Instructions", "Discoveries", "Accomplished", "Relevant files", "Next Steps"]; const isAutoGeneratedSummary = (message: MessageWithParts): boolean => { const text = message.parts .filter(isVisibleTextPart) .map((part) => String((part as { text?: string }).text ?? "")) .join(""); if (!text) return false; const matchCount = AUTO_SUMMARY_KEYWORDS.filter((keyword) => text.includes(keyword)).length; return matchCount >= 3; // If 3+ keywords match, it's auto-generated }; // Applied in visibleMessages filter: if (isAutoGeneratedSummary(message)) return false; These changes address Cause 1 and Cause 3 from the troubleshooting manual. Cause 2 (database permissions) was applied separately via SQL.

robinszeto avatar Mar 22 '26 17:03 robinszeto

Linking this with #1103 and #1074 as part of the recurring infinite-summary / repeated-loop bug family. Keeping Omar on the consolidated follow-up.

benjaminshafii avatar Mar 22 '26 18:03 benjaminshafii

please test this in latest .185+ and report back if its still affecting things

OmarMcAdam avatar Mar 24 '26 15:03 OmarMcAdam

resolved in latest versions

src-opn avatar Apr 09 '26 23:04 src-opn