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
Nothing reclaims per-repo .gstack state — browse-audit.jsonl is append-only by design and bin/ has no cleanup verb #2627
S3Severity 3: everything elseenhancementNew feature or requestparkedNot fixed yet, not rejected: stays open; a comment says where it is tracked and what fixes it
Ran a full disk audit on a box with gstack installed across seven repos and noticed there's no way to reclaim the per-repo .gstack/ state short of deleting the directory by hand.
browse/src/audit.ts:6 states the intent plainly:
restarts and is never truncated by the server
That's a reasonable default for an audit log, but nothing else rotates it either, so it's monotonic for the life of the repo:
browse-network.log and browse-console.log sit beside it with the same shape. And .gstack/tmp/ collects codex scratch — codex-err-*.txt, codex-review-iter*.{err,out} — which is pure byproduct:
8.3M /root/ArceHubBot/.gstack (8.0M of it in tmp/)
I'm not going to pretend this is urgent. Busiest repo here is 8 MB after six weeks. The reason I'm filing is the structural bit: bin/ has 76 commands and the only two that remove anything are gstack-uninstall and gstack-brain-uninstall, both all-or-nothing. There's no gstack-clean, and /browse gives you no way to say "keep the audit trail, drop the console spam."
What would cover it:
A gstack-clean verb, dry-run by default, scoped to .gstack/ in the current repo. Delete tmp/codex-* past some age, truncate browse-{network,console}.log over a size threshold, and rotate browse-audit.jsonl keeping a retention window rather than truncating it — the audit log is the one file in there with a reason to survive.
Liveness gates worth having before it removes anything: no codex process, no browse daemon listening, file mtime older than an hour. Cheap to check and it makes the command safe to run from a cron.
Environment: gstack 1.60.1.0, Ubuntu 22.04, Claude Code 2.1.220.
Keeping open as an accepted design direction. Verified the claims (browse-audit.jsonl append-only by design at browse/src/audit.ts:4-6; no rotation anywhere; the .gstack/tmp fallback at bin/gstack-paths:62; zero cleanup verbs in bin/). A new public command wants its own design pass per the PR checklist — the dry-run-by-default + liveness-gate shape sketched here looks right, and gsRotateBackups (bin/gstack-settings-hook:179) is prior art for the rotate-keep-N pattern.
Thanks again for this. The design direction in the earlier comment still stands, but we're closing parked feature requests instead of keeping them open, and a cleanup command isn't scheduled. When it's planned, it will start from the shape sketched here. Closing.
Closing this as fixed. gstack-clean (added in #3858, shipped in v1.93.0.0) is the cleanup command this issue asked for. It removes old codex scratch from the repo's .gstack/tmp, trims oversized browse logs in place, and with --audit-days N drops old browse-audit.jsonl entries. It only reports what it would do unless you pass --apply. If some other per-repo state still grows without bound, reopen this with the path and we'll take another look. Thanks for the original sketch, which shaped the command.
S3Severity 3: everything elseenhancementNew feature or requestparkedNot fixed yet, not rejected: stays open; a comment says where it is tracked and what fixes it
Activity
garrytan commentedon Aug 22, 2026
Keeping open as an accepted design direction. Verified the claims (browse-audit.jsonl append-only by design at browse/src/audit.ts:4-6; no rotation anywhere; the .gstack/tmp fallback at bin/gstack-paths:62; zero cleanup verbs in bin/). A new public command wants its own design pass per the PR checklist — the dry-run-by-default + liveness-gate shape sketched here looks right, and gsRotateBackups (bin/gstack-settings-hook:179) is prior art for the rotate-keep-N pattern.
capy-ai commentedon Oct 11, 2026
Thanks @furkankoykiran for the idea. In the Oct 11 triage we grouped the open feature requests by theme so related asks get built together instead of one at a time. This one is part of the State root and project identity theme in TODOS.md (https://github.com/garrytan/gstack/blob/50d020ad9/TODOS.md#L54-L69). Closing it here so the open list stays actionable; it isn't rejected, and the theme credits every linked reporter when it's picked up.
capy-ai commentedon Oct 25, 2026
Reopened under the
parkedlabel: this is tracked in the State root and project identity theme in TODOS.md (https://github.com/garrytan/gstack/blob/main/TODOS.md#p3-feature-themes-from-the-wave-9-triage-filed-2026-10-11), and what fixes it is the state-root and project-identity work (docs/state-root.md), which takes the theme as a whole. Closed-but-tracked read as closed, so parked issues now stay open until they ship, are duplicates, or are declined (https://github.com/garrytan/gstack/blob/main/docs/triage.md).v1.93.0.0 wave(browse): #3700 #3773 #3779 #3817 #3842 (#3858)
capy-ai commentedon Nov 16, 2026
Thanks again for this. The design direction in the earlier comment still stands, but we're closing parked feature requests instead of keeping them open, and a cleanup command isn't scheduled. When it's planned, it will start from the shape sketched here. Closing.
capy-ai commentedon Nov 16, 2026
Reopening: the maintainer earlier marked this as an accepted design direction, so it stays open.
capy-ai commentedon Nov 22, 2026
Closing this as fixed.
gstack-clean(added in #3858, shipped in v1.93.0.0) is the cleanup command this issue asked for. It removes old codex scratch from the repo's.gstack/tmp, trims oversized browse logs in place, and with--audit-days Ndrops oldbrowse-audit.jsonlentries. It only reports what it would do unless you pass--apply. If some other per-repo state still grows without bound, reopen this with the path and we'll take another look. Thanks for the original sketch, which shaped the command.