Skip to content

Preserve streamed answers when subagents finish - #46867

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f0577b9ac47cf652c7c75b3aace38c10dccada18
Sep 20, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f0577b9ac47cf652c7c75b3aace38c10dccada18

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Preserve streamed answers when subagents finish

Why

Subagent activity can arrive while the parent answer is still streaming. Rendering it immediately flushes the answer stream before the authoritative message completes.

What changed

  • Defer subagent activity until the answer stream finishes, preserving one complete answer before the activity row.
  • Drain queued lifecycle activity when a turn ends without opening queued prompts.
  • Show late subagent activity after the turn stops even when unresolved prompts remain queued.

Testing

Add regression coverage for completion before or between answer deltas, a missing final delta, interrupted and failed turns, and late activity with queued questions. Extend dynamic activity coverage to verify that turn finalization leaves queued prompts unopened.

## Why

Subagent activity can arrive while the parent answer is still streaming. Rendering it immediately flushes the answer stream before the authoritative message completes.

## What changed

- Defer subagent activity until the answer stream finishes, preserving one complete answer before the activity row.
- Drain queued lifecycle activity when a turn ends without opening queued prompts.
- Show late subagent activity after the turn stops even when unresolved prompts remain queued.

## Testing

Add regression coverage for completion before or between answer deltas, a missing final delta, interrupted and failed turns, and late activity with queued questions. Extend dynamic activity coverage to verify that turn finalization leaves queued prompts unopened.

GitOrigin-RevId: f0577b9ac47cf652c7c75b3aace38c10dccada18
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f0577b9ac47cf652c7c75b3aace38c10dccada18 branch from c27f29f to e29eceb Compare September 20, 2026 18:27
@copyberry
copyberry Bot merged commit e29eceb into main Sep 20, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f0577b9ac47cf652c7c75b3aace38c10dccada18 branch September 20, 2026 18:27
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 20, 2026
@Nimra105
Nimra105 deployed to issue-triage September 20, 2026 18:32 — with GitHub Actions Active
@Nimra105
Nimra105 deployed to issue-triage September 20, 2026 18:32 — with GitHub Actions Active
@Nimra105
Nimra105 deployed to issue-triage September 20, 2026 18:32 — with GitHub Actions Active
@Nimra105
Nimra105 deployed to issue-triage September 20, 2026 18:34 — with GitHub Actions Active
@fricpa
fricpa deployed to issue-triage September 20, 2026 18:38 — with GitHub Actions Active
@fricpa
fricpa deployed to issue-triage September 20, 2026 18:38 — with GitHub Actions Active
@fricpa
fricpa deployed to issue-triage September 20, 2026 18:38 — with GitHub Actions Active
@fricpa
fricpa deployed to issue-triage September 20, 2026 18:39 — with GitHub Actions Active
@roysht
roysht deployed to issue-triage September 20, 2026 19:03 — with GitHub Actions Active
@roysht
roysht deployed to issue-triage September 20, 2026 19:03 — with GitHub Actions Active
@roysht
roysht deployed to issue-triage September 20, 2026 19:03 — with GitHub Actions Active
@roysht
roysht deployed to issue-triage September 20, 2026 19:04 — with GitHub Actions Active
@texmic
texmic deployed to issue-triage September 20, 2026 19:18 — with GitHub Actions Active
@texmic
texmic deployed to issue-triage September 20, 2026 19:18 — with GitHub Actions Active
@texmic
texmic deployed to issue-triage September 20, 2026 19:18 — with GitHub Actions Active
@tcktan
tcktan deployed to issue-triage September 20, 2026 19:28 — with GitHub Actions Active
@tcktan
tcktan deployed to issue-triage September 20, 2026 19:28 — with GitHub Actions Active
@tcktan
tcktan deployed to issue-triage September 20, 2026 19:28 — with GitHub Actions Active
@tcktan
tcktan deployed to issue-triage September 20, 2026 19:29 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — e29eceb7 Deployed Sep 20, 2026 by dannycrone via Translate non-English issue #14249
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants