Repository navigation
Keep the active database small by moving archived conversations into compressed storage #15122
Replies: 6 comments
|
Decision 1 data from a 21.5 GB V2 database, 0.0.46-nightly.20261007.2787, measured 2026-10-10. Across events, turn items and nodes, archived threads hold 10.2% of 12.69 GB of logical payload bytes, 1.29 GB across 118 threads, and deleted threads hold 2.9%. 3,560 of 4,455 threads are delegated children with 67% of those logical bytes, none archived; archiving a parent does not archive its children (#16558). Archive-keyed cold storage would reach about a tenth of those logical payload bytes; we have not measured the resulting disk savings. Drafted with Claude Opus 5.5 in Claude Code (T3 Code harness); live DB inspected read-only; compaction timed on disposable copies. 🤖 Generated with Claude Code |
|
Adding numbers here, as #21371 suggested, plus three requests for the retention policy, which this proposal leaves out of scope. Install: Linux desktop, 0.1.2-nightly.20261022.3541 (044f072), about 6,000 threads, about 3,800 of them archived.
The reclaim worked, but after a full compaction pass it returned under 3% of the file. Nearly all of the 40 GB is history the current compaction is not allowed to delete. What compaction can't reach (at 044f072):
Requests
Glad to measure any of this further on a copy if that helps. |
|
Would you consider an optional remote storage backend as part of the archive design proposed here? My use case is keeping local disk usage bounded while retaining older conversations for later reference. Local compression would help, but the archive would still grow on the same disk. I’d like to move older conversation content and attachments to user-configured object storage, such as R2 through an S3-compatible API, and retrieve them when needed. If this direction fits, I’d be interested in contributing a focused archive-and-read path:
The first scope would need an agreed definition of what is preserved, which dependencies prevent eviction, and what can be restored. Reading archived history and resuming a provider session would have separate guarantees. Searching older conversations is a longer-term requirement for me. I’d like to account for it when defining archive identifiers and metadata, while agreeing on indexing separately. Would an optional remote backend fit the intended architecture? If so, should it build on the local compressed archive implementation first? I’d be happy to align with the existing work and agree on a small initial scope before implementing it. |
|
A request for the retention side of this, which the proposal leaves out of scope. Ask: a setting that deletes thread history after N days of inactivity, the way Claude Code's Why it matters next to this proposal: compressed archive storage slows the growth, but the history still accumulates forever unless someone deletes threads by hand. For threads driven by Claude Code, the provider-side transcript is already gone after 30 days, so T3 keeps history for threads that can no longer be resumed with their context. Suggested shape
Today's gap: Settings has retention for worktrees, browser artifacts and logs, but none for threads. The thread tools available to agents and the Install: macOS desktop app 0.1.9, Orchestrator V2. 264 threads since 2026-10-03 (236 settled, 0 archived, 4 deleted), |
|
Note I prepared this comment with an AI coding agent (Claude Opus 5.5 in Claude Code) and reviewed it myself. More data on what archive-keyed cold storage reaches, and support for the age-based policy requested above. On my install, keying the move on archiving would move 5.7 MB. Keying it on settled threads idle for 7 days would move 6.15 GB. Install: T3 Code (Beta) 0.1.12, macOS desktop, single user, in use since 2026-09-23.
I rarely archive. My threads settle, and I leave them in the settled list: 7,431 of the 10,147 threads are settled, and 9 are archived. The A suggestion for the scope: move only the I built this shape in a personal fork. Once a day, it finds threads that are settled or archived and idle for 7 days. It gzips those parts into |
|
Note I prepared this comment with an AI coding agent (Claude Opus 5.5 in Claude Code) and reviewed it myself. A follow-up to my earlier comment: I ported the version from my personal fork onto current main. You can now read the diff instead of my description. It is a pull request inside my fork, not one against this repository: cardene777#1
I can change its shape to whatever direction you settle on here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Archiving hides a conversation but leaves its full history and attachments in the active database, so disk usage only grows. #6897 shows where this ends up (a 3.7 GiB database contributing to out-of-memory crashes during loading). Today the only way to reclaim space is permanent deletion (#6927).
Proposal
Make archiving also a storage operation:
archivev2.sqlite. Only a lightweight placeholder stays in the active database (title, pin state, linked PRs and lifecycle events), so Archive lists it as before.Earlier implementation (closed pending this discussion, since rebuilt on the V2 orchestrator): #12702
Decisions I'd like maintainer sign-off on
V1ImportBoundary.test.ts's allowlist). Is that acceptable to you?Out of scope
Automatic retention or expiry policies and checkpoint ref pruning (#13263). Client changes are limited to what cold storage needs: web and mobile stop caching archived conversations, and Archive shows a row as busy while its restore runs.
Contribution
If this direction and scope work for you, I'll open a fresh PR scoped to whatever we agree on.
All reactions