Skip to content

Commit 365b8bf

Browse files
committed
feat(sessions): raise default session-store disk budget to 10 GiB
1 parent 6903ab3 commit 365b8bf

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎docs/reference/session-management-compaction.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Per agent, on the Gateway host (resolved via `src/config/sessions.ts`):
5050
| `pruneAfter` | `"30d"` | stale-entry age cutoff |
5151
| `maxEntries` | `500` | cap on session entries |
5252
| `resetArchiveRetention` | keep (no age cutoff) | age cutoff for `*.reset.*`/`*.deleted.*` transcript archives; a duration opts into deletion |
53-
| `maxDiskBytes` | `2gb` | per-agent sessions disk budget; `false` disables |
53+
| `maxDiskBytes` | `10gb` | per-agent sessions disk budget; `false` disables |
5454
| `highWaterBytes` | 80% of `maxDiskBytes` | target after budget cleanup |
5555

5656
Archived transcripts are kept by default and compressed with zstd (`*.jsonl.<reason>.<timestamp>.zst`) when the runtime supports it, so deleting or resetting a session never silently discards conversation history. The disk budget evicts the oldest archives first, before touching live sessions.

‎src/config/schema.help.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ export const FIELD_HELP: Record<string, string> = {
17931793
"session.maintenance.resetArchiveRetention":
17941794
"Age-based retention for archived transcripts (`*.reset.<timestamp>` and `*.deleted.<timestamp>`). Defaults to keeping archives until the disk budget evicts them oldest-first; set a duration (for example `30d`) to opt into wall-clock deletion, or `false` to disable it explicitly.",
17951795
"session.maintenance.maxDiskBytes":
1796-
"Per-agent sessions-directory disk budget (for example `500mb`). Defaults to `2gb`; when exceeded, warn mode reports pressure and enforce mode performs oldest-first cleanup (archived transcripts before live sessions). Set `false` to disable.",
1796+
"Per-agent sessions-directory disk budget (for example `500mb`). Defaults to `10gb`; when exceeded, warn mode reports pressure and enforce mode performs oldest-first cleanup (archived transcripts before live sessions). Set `false` to disable.",
17971797
"session.maintenance.highWaterBytes":
17981798
"Target size after disk-budget cleanup (high-water mark). Defaults to 80% of maxDiskBytes; set explicitly for tighter reclaim behavior on constrained disks.",
17991799
cron: "Global scheduler settings for stored cron jobs, run concurrency, delivery fallback, and run-session retention. Keep defaults unless you are scaling job volume or integrating external webhook receivers.",

‎src/config/sessions/store-maintenance.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const DEFAULT_SESSION_DISK_BUDGET_HIGH_WATER_RATIO = 0.8;
2626
// Archived transcripts are the user's conversation history: retention keeps
2727
// them until the disk budget evicts oldest-first, never on a wall-clock timer.
2828
// The budget default below is what makes "keep archives" still bounded.
29-
const DEFAULT_SESSION_MAX_DISK_BYTES = 2 * 1024 * 1024 * 1024;
29+
const DEFAULT_SESSION_MAX_DISK_BYTES = 10 * 1024 * 1024 * 1024;
3030
const STRICT_ENTRY_MAINTENANCE_MAX_ENTRIES = 49;
3131
const MIN_BATCHED_ENTRY_MAINTENANCE_SLACK = 25;
3232
const BATCHED_ENTRY_MAINTENANCE_SLACK_RATIO = 0.1;

‎src/config/sessions/store.pruning.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ describe("resolveMaintenanceConfigFromInput", () => {
825825
const maintenance = resolveMaintenanceConfigFromInput();
826826

827827
expect(maintenance.resetArchiveRetentionMs).toBeNull();
828-
expect(maintenance.maxDiskBytes).toBe(2 * 1024 * 1024 * 1024);
829-
expect(maintenance.highWaterBytes).toBe(Math.floor(2 * 1024 * 1024 * 1024 * 0.8));
828+
expect(maintenance.maxDiskBytes).toBe(10 * 1024 * 1024 * 1024);
829+
expect(maintenance.highWaterBytes).toBe(Math.floor(10 * 1024 * 1024 * 1024 * 0.8));
830830
});
831831

832832
it("honors explicit archive retention and disk budget opt-outs", () => {

‎src/config/types.base.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export type SessionMaintenanceConfig = {
272272
*/
273273
resetArchiveRetention?: string | number | false;
274274
/**
275-
* Per-agent sessions-directory disk budget (e.g. "500mb"). Default: "2gb".
275+
* Per-agent sessions-directory disk budget (e.g. "500mb"). Default: "10gb".
276276
* When exceeded, warn (mode=warn) or enforce oldest-first cleanup
277277
* (mode=enforce). Set `false` to disable the budget entirely.
278278
*/

0 commit comments

Comments
 (0)