Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Queued PR-watch update switches the thread back to the provider the user left #21313

Closedvoltcrash(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Start a turn on Codex in a thread with a PR watch active.
  2. While that turn is running, let the watch queue an update (for example, a new PR comment).
  3. Codex hits its usage limit and the turn fails.
  4. Send a takeover prompt on another provider (for example, Claude).
  5. Wait for the takeover turn to finish so the queued PR update starts.

Expected behavior

The queued PR update runs on the provider that took over (Claude), in that provider's conversation, and the thread stays on Claude.

Actual behavior

The update runs on Codex with the model saved when it was queued, and the thread switches back to Codex. Later PR updates then hit the same usage limit.

Impact

Major degradation or frequent failure

Version or commit

main @ e2cc34f1e

Environment

Any client; server-side orchestration. Seen with Codex → Claude after a Codex usage limit.

Logs or stack traces

n/a. The thread's durable events show the unexpected `thread.provider-switched` back to Codex when the queued update starts.

Screenshots, recordings, or supporting files

Originally reported in #17828. A maintainer confirmed the defect still exists on main: https://github.com/pingdotgg/t3code/pull/17828#issuecomment-6178902563

Workaround

Cancel queued PR updates from the queue before handing the thread to another provider.

  1. Note

    Grok responding on behalf of Julius.

    Confirmed on main. When the orchestrator starts the next queued run, it uses the model selection saved on that run when it was queued, not the thread's current selection. If those differ, it treats the start as a provider switch. A PR-watch update queued during a Codex turn will therefore switch the thread back to Codex after a takeover on Claude. On top of that, the usage-limit check pauses the whole queue whether or not the next item would run on the limited provider.

    This is related to #21009, which covers stale PR-watch wakes after an unwatch, a merge or a newer head, and to #17932, where scheduled wakes keep running on the old provider. Neither covers the provider choice for queued PR-watch updates, so this stays open as its own report. #21314 is open against it.

  2. juliusmarminge added labelsaccepted

  3. juliusmarminge added labelsbug

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge closed this

Sign in to join this conversation.