[Bug]: Usage-limit auto-resume posts "Continue where you left off." as the user's own message #29746
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#
- Turn on "Resume at reset" (
autoResumeLimitedThreads). - Run a thread until the provider stops it with a usage limit that has a reset time.
- Wait for the reset.
UsageLimitRecoveryWorkersends "Continue where you left off." into the thread. - Inspect the stored message, or look at it in the web or mobile timeline.
Expected behavior#
T3 Code sent the message, so it should be attributed to T3 Code the same way restart continuation is. RestartContinuation.ts dispatches its "Continue where you left off. ..." message with createdBy: "agent" and creationSource: "server", and clients label that row "Sent by T3 Code".
Actual behavior#
limitRecoveryCommand in apps/server/src/orchestration-v2/UsageLimitRecoveryWorker.ts builds the dispatch with createdBy: "user" and creationSource: "server". As a result:
- Web and mobile render the auto-resume prompt as the user's own message, with no "Sent by T3 Code" label.
- The message enters the user message search index. The triggers in
messageSearchIndex.tsindex only rows whosecreatedByisuser. - Anything that reads
createdByto tell what a person typed counts it. That includes usage analytics, whererequestKindreports it as auserrequest.
On one install, a single reset sent "Continue where you left off." to three paused threads within 150 ms. All three messages have createdBy: "user". Restart continuations with the same opening text on another install are stored as T3 Code messages. The two automatic continuation paths disagree.
Impact#
Minor bug or occasional failure
Version or commit#
main @ 5b9731cedc
Environment#
Any provider that reports a usage-limit reset time. Seen with Claude.
Notes for whoever picks this up#
Changing the value to "agent" is a one-line edit, but several server readers branch on createdBy and would change behavior for auto-resumed runs:
- In a subagent child thread,
mayStartSubagentFollowupinOrchestrator.tswould stop treating the auto-resume as a follow-up that the parent tracks. - When a run completes, the
unattendedcheck inOrchestrator.tsreleases held queued runs whose message is not user-created. A held auto-resume run would become eligible for that release. ProjectionStore.tsuses the latest user-created message to decide when a link card stops waiting on the user. Today an auto-resume clears a pending link card. After the change it would not.threadHistoryPaging.tsisThreadHistoryUserTurnwould no longer treat the auto-resume as a user turn.- The ACP adapter treats agent plus server messages as app-owned wake turns (
acpIsAppOwnedWakeTurn), which keeps pending wake frames instead of discarding them.
Most of these look more correct with T3 Code attribution, but each changes behavior, so I'm filing this as an issue rather than a PR.
Related: #17723 made restart continuations show as a T3 Code notice. This issue covers only the usage-limit auto-resume message, not interrupts or steers.
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.