Skip to content

fix(server): re-publish running agent activity every 4 minutes so iOS Live Activity never goes stale - #41002

Closed
frickles wants to merge 1 commit into
pingdotgg:mainfrom
frickles:claude/liveactivity-puls-20261122
Closed

frickles wants to merge 1 commit into
pingdotgg:mainfrom
frickles:claude/liveactivity-puls-20261122

Conversation

@frickles

Copy link
Copy Markdown

Problem

The relay sets a 10 minute stale date on every Live Activity push, but the server only publishes when the projected agent state changes. A long running or starting thread with no phase change therefore shows "Out of date" on the iOS Live Activity / lock screen while the agent is still working.

Change

A 4 minute sweep re-publishes live starting/running threads with a fresh updatedAt, which makes the relay push again and renews the stale date. Waiting phases are excluded because Android keys alerts by phase and time, so a fresh time would re-alert. Heartbeat state is cleared on reset.

Related: #37391 addresses the same symptom; this version applies cleanly on current main and is limited to AgentAwarenessRelay.ts and its test. Happy to close this if that PR is rebased and merged instead.

Scope and approval

Small, focused reliability fix for an obvious bug (activity shown as stale while the agent runs); no new setting or UI.

Verification

  • vp test run src/relay/AgentAwarenessRelay.test.ts: 25 passed, including new tests for the heartbeat sweep.
  • effect-tsgo tsrs --noEmit in apps/server: no errors, none in the changed files.
  • Not verified on a physical iPhone with a live relay.

🤖 Generated with Claude Code
Model and harness: Claude Sonnet 5.5, Claude Code.

… Live Activity never goes stale

The relay sets a 10 minute stale date on every Live Activity push, but the
server only published on projected-state changes. A long running or starting
thread with no phase change showed "Out of date" on iOS.

A 4 minute sweep now re-publishes live running/starting threads with a fresh
updatedAt. Waiting phases are excluded because Android keys alerts by phase and
time.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 22, 2026
@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 22, 2026
@frickles

Copy link
Copy Markdown
Author

Closing this, opened by mistake. Sorry for the noise.

@frickles frickles closed this Nov 22, 2026
@frickles
frickles deleted the claude/liveactivity-puls-20261122 branch November 22, 2026 19:08
@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants