Skip to content

Wake sleeping threads for queued agent mail - #34852

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e361ac1b104436d4d63aebfe5e2422691a1cc139
Jul 23, 2026
Merged

Wake sleeping threads for queued agent mail#34852
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e361ac1b104436d4d63aebfe5e2422691a1cc139

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 23, 2026

Copy link
Copy Markdown

Wake sleeping threads for queued agent mail

Why

An idle thread with an outstanding durable sleep must resume when agent work
arrives, even when that message would normally remain queued without triggering a
turn.

What changed

  • Treat any pending mailbox message as wake-up work while a durable sleep is
    attached to the thread.
  • Keep requiring trigger_turn for idle threads that are not durably asleep.
  • Cover waking a sleeping root thread from queue-only agent mail and persisting
    the message in thread history.

## Why

An idle thread with an outstanding durable sleep must resume when agent work
arrives, even when that message would normally remain queued without triggering a
turn.

## What changed

- Treat any pending mailbox message as wake-up work while a durable sleep is
  attached to the thread.
- Keep requiring `trigger_turn` for idle threads that are not durably asleep.
- Cover waking a sleeping root thread from queue-only agent mail and persisting
  the message in thread history.

GitOrigin-RevId: e361ac1b104436d4d63aebfe5e2422691a1cc139
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e361ac1b104436d4d63aebfe5e2422691a1cc139 branch from 10af208 to 44d76c6 Compare July 23, 2026 01:05
@copyberry
copyberry Bot merged commit 44d76c6 into main Jul 23, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e361ac1b104436d4d63aebfe5e2422691a1cc139 branch July 23, 2026 01:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
@jun76
jun76 temporarily deployed to issue-triage July 23, 2026 02:01 — with GitHub Actions Inactive
@uKER
uKER temporarily deployed to issue-triage July 23, 2026 02:33 — with GitHub Actions Inactive
@ljwzz
ljwzz temporarily deployed to issue-triage July 23, 2026 03:07 — with GitHub Actions Inactive
@ljwzz
ljwzz temporarily deployed to issue-triage July 23, 2026 03:07 — with GitHub Actions Inactive
@ljwzz
ljwzz temporarily deployed to issue-triage July 23, 2026 03:07 — with GitHub Actions Inactive
@ljwzz
ljwzz temporarily deployed to issue-triage July 23, 2026 03:08 — with GitHub Actions Inactive
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.