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
Claude proxy-events.jsonl grows to 2+ GB per session and cannot be pruned while live #1273
packages/claude-code-headless/src/proxy/mitmAddon.py _write appends every request with its body (body_b64, capped at 2 MiB per request) and has no per-file size cap. Each Claude request re-sends the whole conversation, so growth is roughly quadratic in turns. debugRetention.ts prunes whole run dirs and skips anything touched in the last 10 minutes (ACTIVE_GRACE_MS), so a live session's file is never pruned.
Measured on the owner's machine today: 2.37 GB, 2.10 GB, 1.95 GB and 0.84 GB files, all written 2026-09-25; proxy/ totals 7.6 GB. Requests are ~96% of the bytes. Memory records the earlier proxy-events OOM from reading this file whole.
Fix direction: a per-file byte budget in the addon (rotate or stop writing bodies past N MiB; keep the request_shape the sidecar detection needs, per project_sidecar_request_shape), plus a retention rule for oversized live files. Codex's equivalent is #372. Severity P1 (fills disk in a day).
Found by the Stage 3 C6 hunt; lines are origin/main 9c6e48f. Findings file: temp/quality-loop/hunt-c6.md.
Status after #1284 (merged via batch #1318) and claude-code-headless #62.
Shipped: Claude request bodies are capped per events file, not just per request. Past the budget, the newest prompt is kept in a sidecar (up to 16 MiB), and debug bundles append it.
Still open: response-side growth, and the fact that debugRetention never prunes a live session's file (10-minute active grace). The same bloat on the Codex side is #372 (#1317 shipped its 3.65× chunk fix).
Reopened by B6 (q112). This was closed automatically by the manual Development link on #1376 when batch H merged. #1376 only bounds the proxy-events file; sslkeylog.log is still unbounded (#1380), so #1273 is not finished.
Activity
Juliusolsson05 commentedon Sep 25, 2026
Residual after #1284 / claude-code-headless#62 (steering q24). #1284 is now
Refs, notFixes.Shipped there: past 256 MiB, request bodies are omitted (
body_omitted: "file-budget"). That removes ~93 % of the growth rate.Still open here:
debugRetention.tsskips runs written in the last 10 minutes.A fix needs a live-file policy: rotation, or truncation with the adapter's tail/offset reader (
proxyEventsReader, 5 MiB tail) tested against it.Juliusolsson05 commentedon Sep 25, 2026
Status after #1284 (merged via batch #1318) and claude-code-headless #62.
Shipped: Claude request bodies are capped per events file, not just per request. Past the budget, the newest prompt is kept in a sidecar (up to 16 MiB), and debug bundles append it.
Still open: response-side growth, and the fact that
debugRetentionnever prunes a live session's file (10-minute active grace). The same bloat on the Codex side is #372 (#1317 shipped its 3.65× chunk fix).fix(proxy): recreate the live events file immediately after rotating
revert(debug): drop the #1273 bundle reader change; W1 owns proxyEven…
fix(debug): one rotation-safe proxy-events reader for Codex and Claude
fix(proxy): hold the tailed generation open; report lost generations …
docs(plan): #1273 plan follows the q53 tail redesign and q54 reader o…
fix(proxy): stamp each events generation with its number; read short …
fix(proxy): an unreadable previous generation is reported, never thro…
fix(claude): bump claude-code-headless to the rotating proxy-events l…
fix(claude): surface proxy transport gaps; count rotated-only runs in…
Juliusolsson05 commentedon Sep 27, 2026
Reopened by B6 (q112). This was closed automatically by the manual Development link on #1376 when batch H merged. #1376 only bounds the proxy-events file;
sslkeylog.logis still unbounded (#1380), so #1273 is not finished.