Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Usage-limit auto-resume posts "Continue where you left off." as the user's own message #29746

Closedonlydole(GitHub profile, opens in a new tab) opened this issue 0 comments

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. Turn on "Resume at reset" (autoResumeLimitedThreads).
  2. Run a thread until the provider stops it with a usage limit that has a reset time.
  3. Wait for the reset. UsageLimitRecoveryWorker sends "Continue where you left off." into the thread.
  4. 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.ts index only rows whose createdBy is user.
  • Anything that reads createdBy to tell what a person typed counts it. That includes usage analytics, where requestKind reports it as a user request.

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, mayStartSubagentFollowup in Orchestrator.ts would stop treating the auto-resume as a follow-up that the parent tracks.
  • When a run completes, the unattended check in Orchestrator.ts releases held queued runs whose message is not user-created. A held auto-resume run would become eligible for that release.
  • ProjectionStore.ts uses 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.ts isThreadHistoryUserTurn would 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.

Sign in to join this conversation.