Repository navigation
Read OpenCode's composer for GOA, and stop stall lines piling up - #54
Merged
Merged
Conversation
OpenCode has no hook to wake GOA, so a line for it is typed in only once its composer reads empty. OpenCode's composer is a box of bar rows with no prompt mark, which no pattern matched, so worker reports waited in goa-tell.json for good (#51). Its box now reads as empty when its rows are bare or its placeholder and its last row is its agent and model or its commands' hint, with no dialog open over it; a row with anything else is a draft. Screens are from OpenCode 1.18.35 on Linux, and the Windows rows the issue shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: enowdev <enowdev@gmail.com>
The stall watchdog told GOA of a task every three limits for as long as it stayed still, and didn't look at whether its session had reported. With OpenCode as GOA, whose lines never went in, a task that had reported done filled goa-tell.json with its stall lines, pushing real reports out (#51). A task whose session reported since it last moved, or whose report or turn's end waits for GOA, is no longer stalled, and no further stall line comes while the one before still waits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: enowdev <enowdev@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes points 1 and 2 of #51.
1. OpenCode as GOD of Agents never got worker reports typed in. OpenCode has no hook to wake GOA, so a line for it goes in only once its composer reads empty (
goaCanType→agent.PromptEmpty). OpenCode's composer is a box of┃rows with no prompt mark, which no pattern matched, so reports waited ingoa-tell.json.core/agent/prompts_opencode.gonow reads that box as empty only when:Ask anything… "…");┃ Build · …) or itsctrl+p commandshint;esc interrupt), no permission prompt shows, and no dialog is open over it (an update's dialog was caught in the capture).A row with anything else is a draft. A box of bars that isn't OpenCode's doesn't count for any agent. Tests use screens captured from OpenCode 1.18.35 on Linux through enowX's own terminal (empty, draft, dialog open) and the Windows rows quoted in the issue.
2. The stall watchdog flooded
goa-tell.json.daemon/goa_stall.go:A report from before the screen last moved doesn't count, so a later turn that stalls is still reported.
TestStallLinesDontPileUpfails without the change.Point 3 (OpenCode's database size, and which tools workers get) is a separate decision. Point 4 (cloud presence) was already covered: the call has a 20 s timeout, and the long time was the machine sleeping.
Tested:
go test ./core/agent/... ./daemon/...andgo vetpass (alsoGOOS=windows go vet). Not run by hand: OpenCode on Windows. Its case is built from the issue's quoted rows, one of which was shortened with "...". OpenCode inside a conversation wasn't captured either: there was no AI provider on the test host.🤖 Generated with Claude Code