Skip to content

[Bug]: Changing the model on a finished thread sends a new "Done" alert to the phone #11938

Open

Description

@ishaanko

Before submitting

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

Area

apps/mobile

Steps to reproduce

  1. Link an environment to T3 Connect with agent activity publishing on, and enable Device Notifications on an iPhone.
  2. Run a turn in a thread and let it finish. The phone gets one "Done: " alert.
  3. Wait more than 15 minutes, or more than 2 minutes if Live Activities are off.
  4. Open the finished thread's settings on any client and pick a different model. Do not send a message.

Expected behavior

No alert. Nothing finished. The Live Activity may repaint the model name, but the phone stays quiet.

Actual behavior

The phone gets a fresh "Done: " alert. Every later model change on that idle thread rings again. It also happens while the phone is open on another thread, so it reads as random "Done" spam during monitoring.

Impact

Major degradation or frequent failure

Version or commit

main @ 3efdcc5

Environment

iOS 26, T3 Code Nightly 0.0.41, T3 Connect linked, Live Activities on.

Logs or stack traces

Root cause, from reading the code rather than logs:

packages/shared/src/agentAwareness.ts stamps every awareness state with thread.updatedAt.
A model change lands as thread.meta-updated, which bumps thread.updatedAt and changes
modelTitle, so AgentAwarenessRelay republishes the thread as "completed" with a timestamp
of "now".

infra/relay/src/agentActivity/agentActivityAlerts.ts treats a completed row as alertable
when it is fresh (2 minutes) and the device has no non-terminal baseline for it. With no
armed card, notificationForAggregate only checks freshness. With an armed card whose Done
row already aged out of the aggregate, newlyTerminalRows(includeUnobserved) treats the row
as new. Both paths ring.

Screenshots, recordings, or supporting files

No response

Workaround

Do not change the model on a finished thread until you send the next message, or turn off "Notify on completion".

Related: #11886 covers the same freshness hole on server restart, and #9057 on auto-settlement. Open PR #9081 pins the terminal updatedAt to the turn or session end instead of thread.updatedAt, which stops this trigger too. This issue records the model-change repro so it can be verified when that lands.

Activity

  1. juliusmarminge commented on Sep 15, 2026

    @juliusmarminge
    Member

    Tracked by open PR #9081 — same terminal updatedAt freshness fix (also covers #9057 / related to #11886). Linked with Closes #11938 so this closes when that lands.

  2. added
    needs more infoInitial triage showed no bug. Awaiting more info
    and removed
    needs more infoInitial triage showed no bug. Awaiting more info
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions