GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): preserve agent roster across chat pagination by Gigioxx · Pull Request #12135 · pingdotgg/t3code

Conversation

@Gigioxx

@Gigioxx Gigioxx commented Sep 16, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fresh clients can show fewer agents and lower token totals than clients that loaded the same thread earlier. The Agents panel folds chat activities, but a fresh snapshot only includes the recent turn window and up to 500 activities.

Preserve lifecycle rows for known agents through the existing pinned-activity query, including status rows without an agent marker and agent tool heartbeats. Ignore malformed historical payloads in this scan. Ordinary chat history stays paginated. This uses the shared HTTP/WebSocket snapshot path without changing client code or contracts.

Fixes #12131.

Verified with a regression that fails before the fix, 80 focused snapshot/subagent tests, server typecheck, and scoped lint/format. Two isolated Chromium sessions reproduce 9 idle / 9.0M tokens before and 17 idle / 17.0M on a fresh client after. Loading earlier turns and reloading preserve the totals. Synthetic fixture on Linux; native macOS and an actual relay connection were not tested.

Before: fresh client After: fresh client
Before: nine idle agents After: seventeen idle agents

Reproduction details and loaded-history comparison.

Implemented with GPT-6 Astra in Codex. Reviewed with Claude Sonnet 5 in Claude Code (approved, no blockers).

Summary by CodeRabbit

  • Bug Fixes

    • Preserved agent task lifecycle activity across paginated snapshots and activity limits.
    • Kept related task and tool progress events available together, even when many other activities are present.
    • Improved snapshot consistency when large volumes of unrelated activity are added.
    • Safely handled activities with malformed payload data during snapshot retrieval.
  • Tests

    • Added coverage for lifecycle events spanning multiple turns, page boundaries, activity caps, and malformed payloads.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Gigioxx
fix(server): preserve agent roster across chat pagination
642952e
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 16, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Sep 16, 2026
View reviewed changes
Comment thread apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a focused server-side pagination bug fix with targeted tests, preserving agent lifecycle rows without changing schemas, APIs, or deployment behavior. An automated High-severity finding notes that malformed legacy JSON may still fail the new historical scan, which should be handled by the correctness workflow.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 613febaa-3ece-4bfe-9339-a794de3f10c1

📥 Commits

Reviewing files that changed from the base of the PR and between 642952e and 9aaed7b.

📒 Files selected for processing (2)
  • apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts
  • apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The projection query now pins agent task and tool lifecycle activities by task ID. A new test verifies retention across turn pagination and a 500-row activity cap while excluding unrelated background activity.

Changes

Agent lifecycle activity retention

Layer / File(s) Summary
Lifecycle activity pinning
apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
The pinned_activity_ids CTE retains task and tool lifecycle rows linked to agent lifecycle activities. The query validates JSON before extracting payload fields.
Lifecycle retention validation
apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts
The test adds synchronous payload encoding, seeds agent activity batches, and checks retention across turn windows, older cursors, and 501 noise rows. It also verifies that old-background is excluded.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: t3dotgg

Merge Risk: ⚪ Minimal · up to 9aaed

The change preserves the required agent lifecycle activities across pagination and caps, with regression coverage and no evidenced merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy the coding requirements in #12131. pinnedThreadActivityIdsCte preserves agent lifecycle rows and related tool heartbeat rows across paginated and fresh snapshot queries. Valid JS…
Out of Scope Changes check ✅ Passed The production change updates the existing pinned-activity query that supplies thread snapshots. The test change validates lifecycle retention, pagination, activity caps, and malformed payload handlin…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Title check ✅ Passed The title clearly describes the main change: preserving the agent roster during chat pagination. It is concise and specific.
Description check ✅ Passed The description clearly explains the problem, implementation, scope, validation, and UI impact. It includes before-and-after screenshots and reproduction details. It does not use the template headings…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Gigioxx
fix(server): skip malformed historical agent payloads
9aaed7b
@juliusmarminge

juliusmarminge commented Sep 19, 2026

Copy link
Copy Markdown
Member

Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Sep 19, 2026
@juliusmarminge juliusmarminge mentioned this pull request Sep 21, 2026
feat(orchestrator): introduce new orchestrator #2829
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Remote Agents panel shows 9 subagents while host shows 17 for the same thread

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Gigioxx @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.