You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Retention for thread content: purge finished child threads and old tool output (statev2 at 16.8 GiB in 22 days)
#40873
Request: a supported retention setting for thread content: physically purge finished subagent/delegated child threads after N days, and optionally cut old tool output in top-level threads, then reclaim the space.
Why: on a headless t3 serve (0.1.9, Linux, ~45 concurrent agent threads), statev2.sqlite reached 16.8 GiB in 22 days, about 1.9 GB/day, with 0 reclaimable pages (t3 doctor --dry-run). The event-log prune from #29806 works: older sequence ranges keep about 1% of events. What grows now is projection content:
3,456 threads, of which 3,386 are child threads (1,578 delegated tasks, 1,808 native subagent threads); only ~70 are top-level.
orchestration_v2_projection_turn_items has 1.11M rows averaging 4.2 KB; 58% of them belong to delegated-task threads. By payload, command_execution output and dynamic_tool output are the bulk.
On a copy, removing the delegated threads' rows and then running VACUUM gave 3.70 GB, against 8.94 GB for a plain VACUUM.
Symptom: as the file grows, writes queue. Over 35 min: sql.transaction p95 12.5 s, max 69 s; Orchestrator.dispatchMessage 17 s. The desktop app then shows " did not confirm the message within 60 seconds" and puts the prompt back in the composer.
Archive and delete only stamp a column, and #28903 / #30587 were closed as feature requests, so this is that feature request. We now run our own nightly purge across the ~30 thread-keyed tables, gated on a schema check. A built-in setting would be much safer than SQL against internal tables. For example: threadRetention: { childThreadsAfterDays: 7, toolOutputAfterDays: 30 }, plus an offline compaction in t3 doctor.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Request: a supported retention setting for thread content: physically purge finished subagent/delegated child threads after N days, and optionally cut old tool output in top-level threads, then reclaim the space.
Why: on a headless
t3 serve(0.1.9, Linux, ~45 concurrent agent threads),statev2.sqlitereached 16.8 GiB in 22 days, about 1.9 GB/day, with 0 reclaimable pages (t3 doctor --dry-run). The event-log prune from #29806 works: older sequence ranges keep about 1% of events. What grows now is projection content:orchestration_v2_projection_turn_itemshas 1.11M rows averaging 4.2 KB; 58% of them belong to delegated-task threads. By payload,command_executionoutput anddynamic_tooloutput are the bulk.Symptom: as the file grows, writes queue. Over 35 min:
sql.transactionp95 12.5 s, max 69 s;Orchestrator.dispatchMessage17 s. The desktop app then shows " did not confirm the message within 60 seconds" and puts the prompt back in the composer.Archive and delete only stamp a column, and #28903 / #30587 were closed as feature requests, so this is that feature request. We now run our own nightly purge across the ~30 thread-keyed tables, gated on a schema check. A built-in setting would be much safer than SQL against internal tables. For example:
threadRetention: { childThreadsAfterDays: 7, toolOutputAfterDays: 30 }, plus an offline compaction int3 doctor.All reactions