Repository navigation
fix(coding-agent): Herdr error replies and herdr:busy - #214
Merged
Merged
Conversation
The socket transport took any data as success. It now reads the complete answer line with the request's id: a result is success, an error (such as resume_not_accepted) is not, so the second try runs. Each try gets its own seq. When the newest report does not get through, the reporter forgets it as reported, so the next publish sends that state again. Nothing retries on a timer.
pi-subagents (nicobailon) emits herdr:busy { active: true, label } while its background runs go and { active: false } after. The parent pane now reports working while it is active, under herdr:blocked as before.
herdr:busy is a flag beside the subagents:* run ids, so the same runs reported both ways keep the pane working once and it goes idle when both say done. pi-subagents relabels by sending false then true at once; the report waits for the end of the tick so the pane does not show idle in between.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aab21d3dd9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A report whose first try failed after session_shutdown made its second try with a fresh seq above pane.release_agent's, so the stale report took the pane back. A try is now made only while the session is reporting.
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 #200, closes #201.
#200: Herdr errors counted as delivered reports
socketTransportread any data as success. It now buffers the reply until it has the complete line with the request's id:resultis success,error(e.g.resume_not_accepted) or a malformed reply is failure, and lines for other ids are skipped. The issue's repro now returnsfalse.lastis cleared, so the nextpublish()sends that state again even if it has not changed. There is no timer or loop, so a failure costs nothing until the next event.#201:
herdr:busyfrom pi-subagentsherdr:busy { active }is a level flag next to thesubagents:*run ids. The pane shows working while either is set, so the same runs reported both ways count once, and it goes idle only when both say done. Blocked still takes precedence.{ active: false }and then{ active: true }synchronously. The publish is deferred to a microtask so the pane does not report idle in between.Tests (
packages/coding-agent/test/herdr-extension.test.ts, local Unix sockets only)false. Only the complete reply with the matching id counts, including replies split across chunks, an unrelated line first, a truncated reply, and a reply with no trailing newline. Also unit tests forherdrAnswer.herdr:busy: shows working and survives a relabel with no idle report in between. Blocked takes precedence. Combined withsubagents:*, the pane goes idle only after both report done.npm run checkis clean.