Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: MacOs T3 fills up disk #10953

Closedrobert2411(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Enable create new worktree per chat, create a lot of chats -> full disk.

Image Image

Expected behavior

The work trees are cleaned up at some point.

Actual behavior

They are not :)

Impact

Minor bug or occasional failure

Version or commit

No response

Environment

MacOs

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

  1. robert2411(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Triage

    This matches current shipped behavior, not a regression and not a wash of #9085.

    New worktree (defaultThreadEnvMode = "worktree") creates a full git checkout under the environment’s worktrees/ directory for each chat ({T3 home}/worktrees/<repo>/<branch>). A project setup script can also run there, so each thread can carry its own node_modules / build artifacts. macOS is incidental — the same lifecycle exists on every platform.

    On main those directories are not reaped by settle, archive, inactivity, or PR merge. The only removal path is the desktop “Delete the worktree too?” prompt after thread delete (useThreadActions + worktreeCleanup). That prompt is gated on localApi, so web and mobile never clean up. Server thread.delete does not touch disk. git worktree prune only drops stale Git admin entries after a directory is already gone.

    Why this is not #9085

    #9085 / PR #9116 are a delete-path bug: deleting an archived thread skips that prompt and orphans the worktree. Landing #9116 still leaves this report open — creating many New-worktree chats without deleting them (or settling/archiving them) will keep filling the disk. The autoclean comment on #9085 is the same product ask as this issue.

    • #5208 / #5269 / #6659 asked for manual remove-without-deleting-history, TTL/inactive cleanup, and retention limits. They were converted to Discussions (2026-08-15), not implemented.
    • PR #4742 implemented inventory + reaper + settings and was closed unmerged.
    • PR #5589 is the successor on orchestrator v2 (stacked on still-open #2829): server-owned inventory, safe prune, configurable autoPruneAfterDays (default 14), optional immediate orphan cleanup, and revival. That is the intended fix for this report.
    • #3525 is a different disk-fill (tmp_pack_* from timed-out git fetch).

    Workaround

    Delete the thread on desktop and confirm worktree removal, or remove the trees yourself (git worktree remove / delete under ~/.t3/worktrees). To avoid growth, use Current checkout or New thread in this worktree instead of New worktree per chat.

    Keeping this open as the live disk-growth report for the missing worktree lifecycle. No new product call — #5589 is the plan.

  3. juliusmarminge removed labelsbug

  4. juliusmarminge removed labelsneeds-triage

  5. juliusmarminge added labelsenhancement

  6. juliusmarminge added labelsaccepted

  7. juliusmarminge added labelsplanned

  8. juliusmarminge added labelsvia-triage

  9. wouteth(GitHub profile, opens in a new tab)commented

    Correction to my previous cross-reference:

    The earlier 997 ms t3code-3c0f8faf failure was not a valid clean reproduction. Our external janitor had already moved and deregistered that worktree about 2 hours 39 minutes earlier, so T3 was acting on stale thread/worktree state.

    A subsequent untouched T3 Code 0.0.40 removal of t3code-f1f40334 did fail independently: Git exited 255 after 11.13 seconds, the .git pointer and Git registration were removed, but most of the checkout remained on disk, including 2,793 pnpm package directories. That is a genuine partially removed orphan and was not caused by the five-minute timeout.

    The trace records only stderr length 96, so the initiating filesystem/Git cause remains unknown. The supported conclusion is that non-timeout partial removals can still strand directories and need retry/reconciliation. I posted the complete corrected evidence on #5614.

Sign in to join this conversation.