Skip to content

Make worktree list scale on huge workspaces #213

@chubes4

Description

@chubes4

Problem

studio wp datamachine-code workspace worktree list --format=json timed out after 2 minutes on the local intelligence-chubes4 workspace.

Observed workspace shape after DMC 0.27.2 deploy:

  • Workspace root: /Users/chubes/Developer
  • Top-level entries: ~830
  • Worktrees: ~789
  • Missing metadata worktrees: ~553

The cheap hygiene path can return quickly when size and cleanup scans are disabled, but the canonical worktree list path still does too much work for large agent workspaces.

Expected

workspace worktree list should have a bounded/default-fast mode that completes quickly on large workspaces.

Notes

  • Full git/status/size probing should be opt-in or batched.
  • Default listing should prefer cheap registry/top-level metadata and expose whether fields are incomplete.
  • This is separate from cleanup apply. It blocks operator review because basic inventory cannot be trusted to finish.

Acceptance criteria

  • workspace worktree list --format=json completes on a workspace with ~800 worktree-like directories within a practical CLI timeout.
  • Expensive fields are gated behind explicit flags or paginated/batched.
  • Output clearly marks status/size/metadata fields that were skipped or approximated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions