Skip to content

Clean up side conversations in the background - #35887

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7a1d1c34f16ab023d1d1e235451b55404731190c
Jul 29, 2026
Merged

Clean up side conversations in the background#35887
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7a1d1c34f16ab023d1d1e235451b55404731190c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 29, 2026

Copy link
Copy Markdown

Clean up side conversations in the background

Why

Switching away from a side conversation should not wait for its interrupt and
unsubscribe requests to finish.

What changed

  • Remove a side conversation from local TUI state immediately when switching
    threads, then interrupt and unsubscribe it in a background task.
  • Retry interruption with the active turn ID when the original turn races with
    cleanup.
  • Ignore late notifications and reject server requests for abandoned side
    conversations.

Testing

  • Added coverage that background cleanup removes local state and ignores late
    events and approval requests.

## Why

Switching away from a side conversation should not wait for its interrupt and
unsubscribe requests to finish.

## What changed

- Remove a side conversation from local TUI state immediately when switching
  threads, then interrupt and unsubscribe it in a background task.
- Retry interruption with the active turn ID when the original turn races with
  cleanup.
- Ignore late notifications and reject server requests for abandoned side
  conversations.

## Testing

- Added coverage that background cleanup removes local state and ignores late
  events and approval requests.

GitOrigin-RevId: 7a1d1c34f16ab023d1d1e235451b55404731190c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/7a1d1c34f16ab023d1d1e235451b55404731190c branch from aabd4d7 to d06c7ac Compare July 29, 2026 03:55
@copyberry
copyberry Bot merged commit d06c7ac into main Jul 29, 2026
19 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/7a1d1c34f16ab023d1d1e235451b55404731190c branch July 29, 2026 03:56
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
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.

7 participants