Repository navigation
fix(tui): make agent lineage recovery bounded and resumable - #736
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. |
There was a problem hiding this comment.
Code Review
This pull request introduces a safety limit of 3,200 on the number of tracked subagent threads to prevent unbounded memory and CPU usage in both the SQLite state database and the TUI. It bounds recursive descendant queries in the database, implements incremental lineage validation in the TUI via a new accumulator and page budget, and introduces rotating picker slices to display bounded subsets of threads. A critical review comment identifies a compilation error in threads.rs where a usize is passed directly to QueryBuilder::push, as well as a performance bottleneck caused by an ORDER BY clause inside the recursive CTE.
663b0c6 to
5003e3f
Compare
5003e3f to
4c603e9
Compare
Summary
Supersedes the stale PR #675 implementation on the exact current
maintip. This current-main successor preserves the existing loaded-thread pagination validation while making persisted subagent lineage recovery bounded, resumable, and safe for large or malformed spawn graphs.What changed
thread_spawn_edgesmigration, idempotently and without synthesizing missing parents;Validation
d3dcf9fb32211ed7319f2fd7148b5e2f2377737361a9b7af340535ea5726735859d838331e0d7db7git diff --checkpassedcargo fmt --all -- --checkpassed fromcodex-rsScope and safety
This is a current-main successor, not a wholesale replay of stale PR #675 or PR #663. No workflow, runner, credential, protection, destructive, dependency, continuity, or unrelated chatwidget changes are included. All review conversations must be resolved before landing.