Repository navigation
fix(agent): Herdr task prompt stall — stderr envelope, readiness, turn observation (#212) - #214
Merged
Merged
Conversation
…ss + turn observation (#212) Root causes found by tracing worker output vs task verdict: 1. herdrPromptAgent parsed the {"error":{...}} envelope only from stdout, but herdr writes prompt failures to stderr — errorCode was dropped and every stall surfaced as unclassifiable 'unknown'. 2. herdr agent prompt --wait requires a working/blocked transition within a hardcoded 5s; OMP 19 reports turns too slowly, so healthy workers failed agent_prompt_stalled while the turn ran to done. 3. Task workers never got the herdr status extension unless the DISPATCHER itself ran inside Herdr — workers launched from a plain shell were unobservable. Fixes: - promptAgent parses the error envelope from stdout OR stderr. - herdrAdapter.startWorker waits for interactive_ready (30s bound, legacy no-wait when the field is absent). - promptWorker keeps observing agent state after agent_prompt_stalled; only an observed working->done/idle transition settles success, silence past the caller budget stays stalled — never upgraded. - Task-dispatched Herdr workers always load the herdr extension (herdrStatus option); interactive launches keep env detection. - HERDR_CLI env override + fake-binary regression test for the stderr envelope. Verified live: agent task run omp.kilo (default herdr) completed dispatch->observe->collect on OMP 19.0.0. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
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.
Summary
agent task run(default Herdr runtime) failed every real-model dispatch withunrecognized failurewhile the worker visibly completed. Root causes, verified against live worker output and the attempt journal:herdrPromptAgentparsed the error envelope only from stdout — herdr writesagent promptfailures to stderr, soerrorCodewas dropped and every stall classified as unrecognizableunknown.agent prompt --waithardcodes a 5s working/blocked observation window — OMP 19 reports turns through the herdr extension too slowly; healthy workers failedagent_prompt_stalledwhile the turn ran todone.Fixes (contract preserved — no weakened completion criteria):
promptAgentparses{error:{code,message}}from stdout OR stderr.herdrAdapter.startWorkerwaits forinteractive_ready(30s bound; herdr without the field keeps legacy behaviour; reported-but-never-ready is a startup failure, distinct from prompt failure).promptWorkercontinues observing agent state afteragent_prompt_stalled: only an observed working→done/idle transition settles success; silence past the caller budget stays stalled — never upgraded to completion.herdr-omp-agent-state.ts(herdrStatusoption throughbuildAgentStartOptions); interactive launches keepinsideHerdr()detection.HERDR_CLIenv override + fake-binary regression test for the stderr envelope.Test plan
bun run typecheck, agent herdr/runtime/rex test files (37 pass)agent task run omp.kilo(default herdr, OMP 19.0.0) completed dispatch→observe→collect./script/test+ workflow gates on release candidateGenerated with Devin