pingdotgg / pingdotgg/t3code

[Bug]: iOS Live Activity stays on Connecting because the relay throttles the running update

Open Beginner friendly
#12,668 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

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 (root cause is in infra/relay)

Steps to reproduce
  1. Link an environment through T3 Connect with agent activity publishing enabled.
  2. On iOS, enable Live Activity Updates.
  3. Start a new task from the iOS app and lock the phone.
  4. Watch the Live Activity while the agent works.
Expected behavior

The card moves from Connecting to Working once the provider session is running.

Actual behavior

The card stays on Connecting for the whole turn. It only changes at the next phase transition (approval, input, done, failed) or when the app is foregrounded and re-registers its activity token.

Cause

The server publishes starting when the session boots and running a few seconds later, then stays silent while the phase holds (apps/server/src/relay/AgentAwarenessRelay.ts dedupes by state identity).

The relay throttles Live Activity updates to one per 15 seconds when activeCount is unchanged and no row needs attention (shouldUpdateLiveActivity in infra/relay/src/agentActivity/ApnsDeliveries.ts). The running update lands inside that window and is dropped. Nothing retries it, so the card keeps the starting content.

Not the same as #4950, where no update arrives because publishing is disabled.

Proposed fix

Exempt phase changes from the throttle in shouldUpdateLiveActivity, alongside the existing activeCount, attention, and terminal-row exemptions. Timestamp and ordering churn stays throttled. A relay test that delivers a starting aggregate and then a running aggregate four seconds later fails on main and passes with that change.

Impact

Major degradation or frequent failure

Version or commit

main @ d6f291303d, iOS 1.2.1

Notes

Investigation was LLM assisted (Claude Fable 5.1 in T3 Code).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with shouldUpdateLiveActivity in infra/relay/src/agentActivity/ApnsDeliveries.ts and the existing relay tests. Reproduce the starting aggregate followed by a running aggregate four seconds later, then verify the test passes while timestamp and ordering-only changes remain throttled.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, typescript
Domain
infrastructure, mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.