Skip to content

fix(server): preserve agent roster across chat pagination - #13

Draft
macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-remote-agents-count-c94f
Draft

macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-remote-agents-count-c94f

Conversation

@macodev00

@macodev00 macodev00 commented Sep 20, 2026

Copy link
Copy Markdown
Owner

What Changed

Fresh thread snapshots now pin agent lifecycle rows (task.started / task.progress / task.updated / task.completed plus tool.progress heartbeats for those task IDs) through the existing pinned_activity_ids CTE. Chat history stays paginated (10 user-turn window, 500-activity cap). Background tasks and malformed JSON stay excluded.

Why

#12131: the Agents panel folds whatever thread.activities the client currently holds. A live host can accumulate the full roster; a fresh remote client only gets the truncated snapshot, so idle count and token totals disagree.

UI Changes

None. Same Agents panel; the snapshot now includes the missing agent rows so host and remote fold the same roster.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

This is a fork-only PR on macodev00/t3code. It is not opened against pingdotgg/t3code.

Open in Web Open in Cursor 

Fresh clients fold the Agents panel from a truncated chat window, so a
remote session can show fewer idle agents and a lower token total than
the live host. Pin agent lifecycle rows through the existing snapshot
query so both clients see the same roster.

Fixes pingdotgg#12131.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant