Skip to content

Restore retained activity across reconnects - #46

Merged
VolkerChristian merged 3 commits into
masterfrom
codex/retain-partial-activity-history
Aug 23, 2026
Merged

Restore retained activity across reconnects#46
VolkerChristian merged 3 commits into
masterfrom
codex/retain-partial-activity-history

Conversation

@VolkerChristian

@VolkerChristian VolkerChristian commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • reconstruct every retained timeline turn and item instead of permanently hiding history beyond the newest 256 items
  • preserve existing timeline widgets while authoritative prefix history is restored
  • aggregate Agents and collaboration activity across every retained turn instead of only the latest turn
  • prevent incomplete structural State publications from deleting retained command or agent rows
  • keep linked-agent dependencies and the status-bar activity count stable across partial projections

Root cause

Two independent presentation rules produced the disappearing entries:

  1. A structural item upsert could treat omissions from an incomplete State publication as deletion authority.
  2. CodexUI always reconstructed only the newest 256 timeline items and only latest-turn Agents. Once history crossed that boundary, reconnecting or restarting deterministically rebuilt the same truncated tail.

The invariant is now consistent: incomplete projections cannot delete retained identities, while complete thread reconstruction materializes all retained history. Agents are thread-history projections rather than latest-turn projections.

Live reproduction

The running CodexUI XVIII thread was captured through UI restart, backend disconnect, and reconnect. Persisted command events remained present, while the old CodexUI binary rebuilt only its truncated activity tail and an empty latest-turn Agents pane. This confirmed presentation loss rather than AISuite persistence loss.

Tests

  • complete 40-turn reconstruction in canonical order
  • complete 300-item turn reconstruction from earliest through newest item
  • append past the former item-257 boundary without head eviction
  • retained prefix expansion with keyed QWidget preservation
  • bounded incomplete-history proof followed by authoritative recovery
  • earlier-turn Agents available on first render after restart
  • temporary incomplete agent omission followed by authoritative removal
  • structural shell-command omission regression
  • full build succeeds
  • ctest --test-dir build --output-on-failure -j2: 7/7 passed

@VolkerChristian VolkerChristian changed the title Retain activity rows across partial projections Restore retained activity across reconnects Aug 22, 2026
@VolkerChristian
VolkerChristian merged commit de7cf7d into master Aug 23, 2026
1 check passed
@VolkerChristian
VolkerChristian deleted the codex/retain-partial-activity-history branch September 2, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant