Repository navigation
fix(sessions): stop pre-warmed session bodies from loading empty - #370
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d05e61d01a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c44e16673
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Status: initial findings were fixed in 3c44e16 (with replies on both threads). The three follow-up findings are now fixed locally: focused cold bodies trigger an isolated refetch, the protocol budget-order docs are updated, and the stale-tree guard compares modes plus object IDs. Regression tests failed before and pass after; all 519 TUI/xtask tests pass (1 skipped). Full check passed fmt/lint/clippy and is finishing broader tests. I am committing these fixes and rebasing onto main next, then will request another @codex review. |
|
To use Codex here, create an environment for this repo. |
One snapshot request shares a 6 MiB body budget across the focused session and the pre-warmed ones. Each body spent it on up to 4,096 tool calls (the client keeps 64) before the next body loaded its messages, so on a real store 9 of 12 pre-warmed sessions came back with no messages. The TUI cached those as empty and showed "Ask QQ to begin this session." without refetching. - Snapshots load every transcript first, then tool calls from what remains. - A body carries at most 64 tool calls, the window the client keeps. - The client keeps a body that has no messages but older history unloaded, so focusing it fetches its own body.
3c44e16 to
7a9e531
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a9e531b3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review Addressed all three latest findings in 5364ff9. 561 client/TUI/xtask tests pass (1 skipped); fmt/lint/clippy pass. The broader local gate did not complete successfully (its test build log ended abruptly); relying on fresh CI for full validation. The earlier compaction timeout passes its focused rerun. Please review latest head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5364ff9eee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Latest review status: both findings are fixed locally. Intentional rollbacks can be acknowledged with a committed, exact-path |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review Both latest findings fixed and pushed in e5a175b. 561 client/TUI/xtask tests pass (1 skipped); targeted regressions, fmt and changed-crate clippy pass. The full gate passed fmt/lint/clippy and its entire test phase (477.5s), but rejected the final evidence stamp because a follow-up warm-body regression fix changed the worktree while it ran. That follow-up passed the 561-test suite and clippy separately. Fresh CI will verify the exact pushed tree. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex review loop complete on e5a175b: Codex reports “Didn’t find any major issues,” summary shows no findings/unresolved findings, and the bot added 👍 to this PR at 05:07:57Z. All review findings have fix replies. Branch was rebased onto main. CI for this exact head is still running: https://github.com/retsu-AI/qq/actions/runs/39372881641 |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
What changed for users
Old sessions no longer open empty. The TUI's startup snapshot fetches the focused session plus four pre-warmed sessions, and all five share one 6 MiB body budget. Each body was allowed up to 4,096 tool-call rows before the next body's messages were loaded, so one tool-heavy session used up the budget. The bodies after it came back with 0 messages and
has_older_messages=true. The client installed them as warm-empty, so focusing one showed "Ask QQ to begin this session." and nothing was refetched.load_snapshotnow loads every body's transcript first and spends the remaining budget on tool-call tails afterwards.MAX_RECENT_TOOL_CALLS). Older calls are still flagged withhas_older_tool_calls.has_older_messages) cold rather than installing it as empty, so the session is fetched when it's focused.Replaying the real store (from a copy): before, 3 of 12 bodies had messages; after, 12 of 12, in a 3.1 MB response.
cargo xtask checkrefuses a branch that silently reverts merged base changes. If the branch restores a file to its pre-merge state after main changed it (thegit reset --soft origin/mainmistake that hit #365), the check fails and names the files.Verification
prewarmed_bodies_keep_their_messages_when_an_earlier_body_has_many_tool_results(core) anda_body_the_snapshot_budget_starved_stays_cold_instead_of_empty(client) both fail without the fix and pass with it.a_branch_that_restores_files_the_base_changed_is_refusedpasses. Run against the old bad refactor(agents): simplify agent guidance, approvals, and overload retry #365 commit, the guard flags the reverted auth/session files.one_durable_run_continues_across_the_internal_tool_budgetnow expects the 64-call snapshot window plushas_older_tool_calls.cargo xtask checkpasses.Not in this PR
revision_notices_across_reactive_checkpoint_overflow_reopen_in_order: already fixed on main by test(core): let the goal-audit fixture's held preparation observe shutdown cancellation #366.auto: dropped. It needs a protocol bump, and the store shows the reviewer auto-approved hundreds of calls. The long waits came from human approvals, so turning it off would add waits.