🤖 fix: harden empty-output and task report recovery#2986
Conversation
|
@codex review |
2d66df9 to
5a7875a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d66df9e68
ℹ️ 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 |
5a7875a to
f36eacf
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f36eacfb0d
ℹ️ 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".
f36eacf to
511f8d6
Compare
|
@codex review Please take another look. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 511f8d6468
ℹ️ 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".
511f8d6 to
9f21b1f
Compare
|
@codex review Please take another look. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f21b1f37f
ℹ️ 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".
Improve silent empty-output handling so chats retry seamlessly when possible and surface clearer fallback reports when recovery keeps failing. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$58.55`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=58.55 -->
9f21b1f to
e84c7c1
Compare
|
@codex review Please take another look. |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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 Please take another look. |
|
@codex review Please take another look at the latest commit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61f8d47068
ℹ️ 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 Please take another look. |
|
@codex review Please take another look. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ede6db8f1
ℹ️ 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 Please take another look. |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
## Summary This follow-up to #2986 keeps the existing `awaiting_report` recovery behavior but trims one special case: waiter-triggered recovery now reuses the standard completion reminder instead of carrying a separate waiter-only prompt variant. ## Background PR #2986 introduced a few paths that can re-prompt an `awaiting_report` task. The waiter-specific reminder text and enum branch were the odd ones out, because they duplicated the same completion-tool guidance with different copy. Reusing the normal reminder keeps the recovery path while simplifying the state machine. ## Implementation - waiter-triggered recovery still nudges `awaiting_report` tasks, but now reuses the default completion reminder path - dropped the now-unused `"waiter"` completion-recovery reason and prompt string - added a regression test that proves `waitForAgentReport()` no longer emits distinct waiter-only reminder copy ## Validation - `bun test src/node/services/taskService.test.ts` - `make static-check` ## Risks Low. This keeps the waiter-side recovery hook intact; it only removes the separate waiter-only reminder variant. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$146.35`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=146.35 -->
Summary
propose_plan, but let ordinary subagents finalize from a clean final assistant response when the provider reports a naturalstopfinish reason.awaiting_report/ report-only recovery for incomplete child turns, and interrupt that recovery cleanly on non-retryable errors.Background
agent_report.agent_reportprompts were adding avoidable ceremony for ordinary successful subagents whose final assistant turn already contained the full report text.Implementation
StreamManagerstream-endand classify no-output failures as a dedicatedempty_outputstream error.HistoryService[CONTINUE]loops.TaskServicepropose_planexplicit for plan-like subagents.finishReason === "stop", then route it through the same report artifact / parent-delivery / cleanup pipeline used by explicitagent_report.promptTaskForRequiredCompletionTool()helper for startup recovery, waiter nudges, stream-end recovery, and retryable stream-error retries.empty_outputas a clearer “No assistant output” stream error.awaiting_reporttasks asawaiting reportto reflect that they are still live and unfinished.Validation
make typecheckmake static-checkbun test src/node/services/partialService.test.tsbun test src/node/services/streamManager.test.tsbun test src/node/services/taskService.test.tsbun test src/node/services/tools/task.test.ts src/node/services/tools/task_await.test.tsRisks
awaiting_reportrecovery still intentionally prefers “keep trying to finish the child honestly” over fabricating a synthetic report, so persistent provider issues may keep tasks active longer and consume more tokens.Generated with
mux• Model:openai:gpt-5.4• Thinking:xhigh• Cost:$122.19