Skip to content

fix(server): unreadable sessions no longer block older history - #42613

Merged
juliusmarminge merged 8 commits into
pingdotgg:mainfrom
StiensWout:wf/find-e0c0a4c2a453b34a3f330c2c
Nov 25, 2026
Merged

juliusmarminge merged 8 commits into
pingdotgg:mainfrom
StiensWout:wf/find-e0c0a4c2a453b34a3f330c2c

Conversation

@StiensWout

Copy link
Copy Markdown
Contributor

Unreadable Pi conversations could exhaust the import slots on every attempt and hide older readable history. The scanner now charges a slot only after a transcript passes validation. Compressed Codex rollouts use a separate decoded-byte budget, so exhausting it still leaves room to import older plain transcripts.

Related: #23214, #25923

Reproduction on main

Commit 4e6b1fa771 (main). Every attempt skips the same newer conversations and leaves the older readable conversation out. Expected: The older readable conversation appears in T3 Code when the import is retried.

The cause is at apps/server/src/project/AgentSessionScanner.ts:2293. Ran cd apps/server && pnpm exec vp test run src/project/AgentSessionScanner.test.ts with the repro test added: it failed in 2 of 2 runs on a clean checkout, with expected [] to include 'session-100' in the output.

Evidence

Environment: Linux x64, the repository's own tests.

Proven: the repro fails at the test commit 0a5bec147f and passes on the head 18021dff12, both on main 6632511cd8.

Before After
Commit 0a5bec147f 18021dff12
Result failed with "expected [] to include 'session-100'" passed

Outside view: not shown in the running app. The bug fails the rule that every state the repro builds by hand is one a person's steps put the real app in. The older conversation stays out only when one hundred newer Pi session files are already on disk with tool-result details nested past the reader's depth limit, which opening Welcome and importing never creates.

Tests

  • 0a5bec147f adds the failing test, alone, before the fix.
  • pnpm exec vp run check:changed 6632511cd8f523c2b9439272d776fb44c2bce110 passed on head.

Not in this change

  • The original regression test remains byte-for-byte intact. Separate checks verified that both scans skip all 100 unreadable Pi files, that the retry recognizes the older import, and that an oversized compressed rollout leaves older plain history reachable.
  • When the shared decompression budget runs out, later compressed rollouts are still deferred.

Who did the work

  • Repro written by GPT 6.2 Sol, in Codex
  • Outside view by Grok 4.7, in Grok
  • Duplicate check judged by Claude Opus 5.5, in Claude Code
  • Written by GPT 6.2 Sol, in Codex
  • Trimmed by Claude Opus 5.5, in Claude Code
  • Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex, and by Gemini 4 Neon, in Antigravity
  • Reproduction, checks and proof run by a program on base and head, not by an agent

Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon

StiensWout and others added 6 commits November 25, 2026 05:24
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The scanner now applies a shared decompression-byte budget to compressed transcripts during recent-thread scans. It charges transcript slots only after parsing a usable thread. A regression test checks that an older session remains importable after newer transcripts are unreadable.

Changes: Recent Thread Scanning

Layer / File(s) Summary
Bound compressed transcript reads
apps/server/src/project/AgentSessionScanner.ts
Compressed reads use the remaining decompression budget. The scanner accounts for decompressed bytes and rejects a read that reaches its limit before the transcript ends.
Apply budgets during scanning and verify import behavior
apps/server/src/project/AgentSessionScanner.ts, apps/server/src/project/AgentSessionScanner.test.ts
Recent-thread scanning passes the shared budget to transcript reads and checks compressed Codex history offsets against it. It charges a transcript slot only after parsing a usable thread. The regression test checks that an older valid session is returned after 100 newer transcripts are unreadable.

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

Change: Bug fix

Possibly related PRs

Suggested labels: bugfix

Suggested reviewers: juliusmarminge, tiliakoos, dominikzabcik

Merge Risk: Minimal · up to 5b743

This change keeps older readable sessions importable when newer transcripts are unreadable, and it bounds decompression for compressed rollouts. No actionable merge-blocking risk was identified, and the added regression test covers the starvation case.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): unreadable sessions no longer block older history" matches the main change: the scanner now charges an import slot only after a transcript validates, so unreadable Pi sessions …
Description check Passed The description follows the template's main sections in substance. It states the problem (unreadable Pi conversations exhausting import slots and hiding older history), gives the change (slot charged …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(server): unreadable sessions no longer block older history" matches the main change: the scanner now charges an import slot only after a transcript validates, so unreadable Pi sessions no longer hide older readable history. It also follows the conventional commit format the template suggests. The title does not mention the separate decompression-byte budget for compressed Codex rollouts, but that is a secondary aspect and the title does not need to cover every detail.

Full details: Description check

Explanation

The description follows the template's main sections in substance. It states the problem (unreadable Pi conversations exhausting import slots and hiding older history), gives the change (slot charged only after validation, separate decoded-byte budget for compressed Codex rollouts), and describes scope with related issues #23214 and #25923. It includes a reproduction on main and verification details: the failing test at 0a5bec1, the passing run at 18021df, and the check:changed command. It also names the model and harness that did the work, as the template asks. Gaps: the Scope section does not clearly say why no issue is needed or whether a maintainer requested the PR, though it links related issues. The Verification section relies on a single Linux environment and does not cover manual checks beyond the repo's tests. The description also includes a long list of tool and model attributions and a hash comment, which adds noise but does not block review.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 18021df and 5b7430f.

Files selected for processing: 1

  • apps/server/src/project/AgentSessionScanner.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 25, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium, 1440×1000, light theme; fresh database per commit. Seed 101 synthetic Pi sessions in workspace: 100 newer unreadable transcripts followed by one older readable conversation (about 220 KB total). Enable Pi on Welcome, Review all, and import. Then reopen Settings → About → Welcome page → Open → Review all → Select all and import again.

The scenario runner exited 0: the older-conversation expectation failed on base and passed on head. Base imported no threads on either attempt (101 failures). Head imported the older conversation, then retained it after retry (100 unreadable files skipped each time).

Evidence Before — 283de2e4d4 After — 5b7430fae4
First import Before: no threads, 101 import failures After: one imported thread, 100 failures
Separate retry through Settings and Welcome (three unaltered captures, with labels outside the app) Before: Settings, Review all, retry still fails for all 101 After: same workspace and retry, only the 100 unreadable files fail
Older conversation after retry No imported conversation exists. After: older user message and assistant reply in workspace
Full interaction recording, including both imports Before recording After recording

Scenario and fixture generator. Base's first/retry result stills are identical because the same warning and empty workspace recur; the retry sequence and recording show the intervening Settings/About/Welcome interaction.

Not shown:

  • Compressed Codex shared decoded-byte allowance and inherited-prefix byte charging were not exercised; this scenario isolates the Pi unreadable-transcript slot starvation defect.
  • The fixture is synthetic; whether real Pi or an extension writes tool-result details nested beyond 128 levels was not established.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 25, 2026
@juliusmarminge
juliusmarminge merged commit 79be5ad into pingdotgg:main Nov 25, 2026
60 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 25, 2026
@StiensWout
StiensWout deleted the wf/find-e0c0a4c2a453b34a3f330c2c branch November 25, 2026 07:31
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.12-nightly.20261125.5230** · 41 changes from 11 contributors

- **Richer workflow questions.** Workflow questions can include described choices, required reasons, links, and records of who answered and when.
- **Thread actions in command palette.** Pin, snooze, settle, archive, and manage the current thread from the command palette.
- **Withdraw workflow questions.** Workflows can withdraw waiting questions without cancelling the run.
- **Antigravity swarm workers.** See Antigravity swarm workers as subagents, including who is working and what they found.
- **Faster thread switching.** Thread timelines now appear in the first frame instead of after a noticeable delay.
- **Browser select menus.** Native dropdown menus now open in streamed browser tabs so you can choose an option.
- **Permanent thread deletion.** Deleting a thread now removes its conversation history instead of only hiding it.

### Plus 32 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(cli): exclude spans before the trace summary window by @jadelike-wine in pingdotgg/t3code#42571
* fix(grok): expose context usage by @gujunxiang in pingdotgg/t3code#42568
* fix(web): timeline minimap previews no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42575
* fix(web): Option and Cmd arrows reach full-screen terminal apps by @Mnigos in pingdotgg/t3code#42574
* fix(web): element context preview no longer ends in a split surrogate by @only21mil in pingdotgg/t3code#42585
* fix(server): Antigravity sends undecodable text attachments as a path instead of failing the turn by @juliusmarminge in pingdotgg/t3code#42594
* fix(resource-monitor): Windows stops reading memory and command lines of untracked processes by @juliusmarminge in pingdotgg/t3code#42577
* fix(server): ODT attachments no longer start with text from number styles by @only21mil in pingdotgg/t3code#42592
* feat(server): workflow questions take described choices, required reasons, links, and keep who answered by @juliusmarminge in pingdotgg/t3code#42515
* fix(web): citation comment box stays open when its cited row scrolls out by @juliusmarminge in pingdotgg/t3code#42603
* fix(web,mobile): author avatars keep emoji initials whole by @only21mil in pingdotgg/t3code#42598
* fix(gitlab): incident links are read as issue links by @Michel-Liao in pingdotgg/t3code#42605
* fix(server): workflow schedules given as bigint nanoseconds no longer crash by @only21mil in pingdotgg/t3code#42607
* fix(pi): reject generated text from failed responses by @StiensWout in pingdotgg/t3code#42602
* fix(preview): streamed browser tabs show native select menus by @juliusmarminge in pingdotgg/t3code#31561
* fix(web): long Workflows links no longer end in a broken character by @only21mil in pingdotgg/t3code#42617
* fix(server): filter open device sessions by the selected host by @AppsAtMe in pingdotgg/t3code#42600
* fix(antigravity): link directly to Google account verification on failed turns by @t3dotgg in pingdotgg/t3code#41210
* fix(server): Needs you lists paused runs older than the newest 500 by @KyrosHendrix in pingdotgg/t3code#42618
* feat(server): CI runners don't need telemetry by @t3dotgg in pingdotgg/t3code#42630
* fix: screenshots after a caption render full size instead of as chips by @juliusmarminge in pingdotgg/t3code#42627
* fix(pi): rewind turns after an extension switches sessions by @StiensWout in pingdotgg/t3code#42616
* fix(mobile): Compose without a project opens the picker in one push by @juliusmarminge in pingdotgg/t3code#42593
* fix(web): project name field restores the saved name when cleared by @only21mil in pingdotgg/t3code#42622
* fix(mobile): a share sent while a new-task draft is open joins that draft by @juliusmarminge in pingdotgg/t3code#42597
* fix(telemetry): honor DO_NOT_TRACK by @t3dotgg in pingdotgg/t3code#42629
* fix(server): device host errors no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42628
* fix(pi): let background subagents finish after coordinator errors by @StiensWout in pingdotgg/t3code#42624
* fix(server): deleting a thread actually removes its history by @t3dotgg in pingdotgg/t3code#42119
* fix(server): unreadable sessions no longer block older history by @StiensWout in pingdotgg/t3code#42613
* fix(server): skip incomplete Pi records during project discovery by @StiensWout in pingdotgg/t3code#42636
* fix(server): restore the default provider name when clearing a label by @StiensWout in pingdotgg/t3code#42632
* test(provider-testing): replay workspaces start no background git maintenance by @juliusmarminge in pingdotgg/t3code#42651
* fix(antigravity): /swarm workers show as subagents by @t3dotgg in pingdotgg/t3code#42649
* feat(web): settle, pin, snooze and more for the current thread from cmd+k by @t3dotgg in pingdotgg/t3code#40742
* feat(server): withdraw a waiting workflow question without cancelling its run by @juliusmarminge in pingdotgg/t3code#42506
* fix(web): fade project picker tooltips in place on scroll by @Yash-Singh1 in pingdotgg/t3code#42657
* fix(server): shells with a backslash in their name no longer get zsh flags on Linux and macOS by @only21mil in pingdotgg/t3code#42648
* perf(web): thread switches paint the timeline in their first frame by @juliusmarminge in pingdotgg/t3code#42582
* fix(server): t3_background_wait error says Workflow runs already keep the thread working by @juliusmarminge in pingdotgg/t3code#42661
* fix(server): preserve spaces and tabs in checkpoint LFS storage by @jadelike-wine in pingdotgg/t3code#42634

## New Contributors
* @gujunxiang made their first contribution in pingdotgg/t3code#42568
* @AppsAtMe made their first contribution in pingdotgg/t3code#42600

**Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261125.5222...v0.1.12-nightly.20261125.5230

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261125.5230
AIdoesmyjob pushed a commit to AIdoesmyjob/t3code that referenced this pull request Nov 25, 2026
…otgg#42613)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 79be5ad)
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). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants