fix(gateway): let Desktop omit duplicate transcripts on session resume (salvage #69926) - #77340
Merged
kshitijk4poor merged 3 commits intoAug 3, 2026
Conversation
Salvage of NousResearch#69926: omit_messages support ported from the PR's tui_gateway/server.py base onto the post-split methods_session.py layout. When a Desktop client passes omit_messages=true on session.resume / session.activate, the RPC returns messages: [] with messages_omitted: true and an accurate message_count, skipping the potentially multi-megabyte compression-lineage serialization over the WebSocket; Desktop hydrates the transcript via the authenticated REST route in parallel. The PR's bundled cron-outputs endpoint and codex quiet-timeout bump were dropped from this salvage as unrelated (invited back separately).
Two queue-drain tests added on main pin session.resume's exact params; the drain path now passes omit_messages: true. Assertion-only update.
kshitijk4poor
enabled auto-merge (rebase)
August 3, 2026 04:35
kshitijk4poor
disabled auto-merge
August 3, 2026 07:59
Two more call-shape-pinning tests (cold tile resume, default-profile resume) assert session.resume's exact params; the delegate passes omit_messages: true like every other Desktop resume call site. Swept all 5 desktop test files that reference session.resume/activate: 380 of 381 files green (the one failure is a pre-existing locale- dependent number-grouping test that fails identically on clean main).
kshitijk4poor
enabled auto-merge (rebase)
August 3, 2026 08:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Salvages the core of #69926 by @danielblankhh (Daniel Blank) — omit_messages logic ported to current main's layout with authorship preserved, plus one test-adaptation commit.
Context — what this fixes, for whom
Desktop users resuming large sessions:
session.resume/session.activateserialized the FULL transcript — potentially megabytes of compression lineage — over the WebSocket, stalling resume for seconds. Withomit_messages: true(Desktop passes it everywhere now), the RPC returnsmessages: [],messages_omitted: true, and an accuratemessage_count; Desktop hydrates the transcript through the authenticated REST route in parallel. Backward compatible — the flag defaults to false, so TUI/messaging clients are untouched.Salvage notes (what changed vs the original PR)
session.resume/session.activateout oftui_gateway/server.pyintomethods_session.pysince the PR's base, so the omit_messages logic was ported hunk-by-hunk into the new layout (_live_session_payload's omit param stays in server.py where that helper still lives). All of the PR's Python + Desktop TS tests came along./api/cron/jobs/{job_id}/outputsendpoint and the codex quiet-timeout bump (90s→300s). @danielblankhh — both looked well-built (the path-traversal guards on the cron endpoint were thorough); please resubmit them as their own PRs.session.resume's exact call shape; assertions gain theomit_messages: truekey.Verification
tests/test_tui_gateway_server.pyfull file — 515 passed (incl. the PR's parametrized omit tests)use-prompt-actions/index.test.tsx+use-session-actions.test.tsx— 141 passed; tsc --noEmit cleanCloses #69926 (core superseded by this salvage — original author credited via port authorship).