Files
codex/codex-rs/app-server/tests/common
jif 946bb6c583 Finish idle thread unloads after slow shutdown (#51420)
## Why

Idle thread unloading stopped waiting after ten seconds, leaving the thread loaded when resource cleanup took longer.

## What changed

Keep awaiting the same shutdown future after the ten-second deadline, emitting `codex.app_server.thread_shutdown_slow` as a warning. Once shutdown completes, remove the thread and send `thread/closed` without requiring another unload request.

## Testing

Add a regression test that blocks writer-lock cleanup past the warning deadline, verifies the thread remains loaded while cleanup is blocked, then releases the lock and checks for `thread/closed` and an empty loaded-thread list.

GitOrigin-RevId: 18c411f86fd69e710e472a4e3572d75f18682147
2026-10-06 17:10:19 +00:00
..