Skip to content

fix(core): preserve terminal subagent errors - #439

Closed
shiny-code-bot wants to merge 1 commit into
mainfrom
fix/agent-terminal-outcome-evidence
Closed

fix(core): preserve terminal subagent errors#439
shiny-code-bot wants to merge 1 commit into
mainfrom
fix/agent-terminal-outcome-evidence

Conversation

@shiny-code-bot

Copy link
Copy Markdown
Collaborator

Summary

  • retain status-affecting subagent errors through trailing TurnComplete and TurnAborted events
  • install the retained Errored status before terminal event delivery, including legacy errors without typed metadata
  • deduplicate MultiAgentV2 parent notifications across completion/abort races
  • add manager-level and mocked stream regressions for child status and parent delivery

Context

Current main already distinguishes retryable StreamError events from fatal errors. The remaining failure mode was manager-level reconciliation: a fatal ErrorEvent could be overwritten by the generic trailing TurnComplete(None), making a failed child look like an empty success.

This ports the relevant terminal-error precedence behavior from upstream while adapting it to this fork's current event-delivery and direct-parent notification paths.

Validation

  • just fmt
  • cargo test -p codex-core multi_agent_v2_terminal_error_queues_message_for_direct_parent --lib -- --nocapture
  • cargo test -p codex-core --test all multi_agent_v2_terminal_stream_error_preserves_errored_status -- --nocapture
  • cargo test -p codex-core agent::control::tests --lib -- --test-threads=1 --nocapture
  • cargo test -p codex-core --test all suite::subagent_notifications -- --test-threads=1 --nocapture
  • ./build-fast.sh
  • git diff --check

JetBrains closeout inspection reported no problems, but its verdict was inconclusive because the configured IntelliJ instance did not provide semantic Rust coverage.

Refs #434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants