Repository navigation
Description
Problem
A scheduled task (including webhook deliveries) bound to an existing thread effectively picks a provider/model for its runs, and that pick can go stale:
- A webhook/cron delivery arrives while the thread is busy, so its run is queued.
- The user changes the thread's provider/model (for example, to escape a provider usage limit) and resumes the thread successfully on the new model.
- When the queued scheduled-task run later starts, it still runs on the model that was current when it was queued — and the thread's own selection ends up reverted to that old model, so subsequent runs keep using it too.
Observed on T3 Code Nightly 0.1.8-nightly.20261106 with a real incident on 2026-11-06: a PR-monitor thread was moved off a rate-limited GLM route onto Muse, completed a run there, then a queued attention-webhook run dispatched on the old GLM selection, failed with the same 429, and left the thread back on GLM. This recurred each time another pre-change queued run dispatched. The scheduled task itself exposes no model setting to clear: the stamping happens when its runs are created/queued.
Requested feature
Let a thread-bound scheduled task "not pick a model":
- Its deliveries carry no provider/model selection of their own.
- A queued delivery resolves the thread's current provider/model when it starts, not when it was queued.
- Starting such a run never changes the thread's durable provider/model selection.
Tasks that explicitly pin a model (and tasks that launch fresh threads, which need a selection to seed the new thread) keep today's behavior.
Why
Scheduled/webhook senders are programmatic: they should follow the user's explicit, durable thread selection, never silently override it. Today a user who switches models to escape a dead or rate-limited provider gets reverted by their own automations, with no setting to prevent it and no sign of why it happened.
Related: #19376 (closed as duplicate of #18762) describes the same dispatch-time resolution chain; its suggested direction includes resolving queued runs at start time. Bound scheduled-task sends already pass no selection on current main; the queued-run start path still freezes scheduled-task runs to their queue-time selection.
Context
This is the root cause behind the provider flip-back observed on 2026-11-06 (thread reverted to a rate-limited GLM route after a successful run on another model), and covers the open slice of #19376 / #18762.
A fix is submitted as a PR; follow-ups deliberately left out of that PR: restart-continuation writeback, swallowed goal-validation error text, queued-start hold comparing the stored rather than resolved instance, and stale instance labels on run.updated until start.
Activity