Skip to content

[Gastown] Rig repository checkout results in empty working tree with all files deleted #3706

@kilo-code-bot

Description

@kilo-code-bot

What happened?

When checking out a rig's repository, the working tree appears empty with all files shown as deleted in the index. This prevents polecats from accessing the codebase to perform work.

Steps to reproduce:

  1. List rigs to get rig ID (e.g., 10df468b-cdce-4e06-aba4-416118c3e49f)
  2. Navigate to the rig's repository directory: /workspace/rigs/<rig_id>/repo
  3. Run git status to see many deleted files staged for commit
  4. Check that the working tree contains no files (only .git directory)

Expected behavior:
The working tree should contain the files from the default branch (main) ready for polecats to read and modify.

Actual behavior:
All files are missing from the working tree, though they exist in the HEAD commit.

Impact:
Polecats cannot access source code, causing tasks to fail or produce incorrect results.

Suggested fix:
Ensure that after cloning or checking out a rig's repository, the working tree is properly populated with the files from the default branch. Investigate if a premature git reset --hard or similar command is being executed.

Diagram:

flowchart TD
    A[Rig repository checkout] --> B{Working tree populated?}
    B -->|Yes| C[Polecats can access code]
    B -->|No| D[Polecats fail to find files]
    D --> E[Task failures]
Loading

Date: 2026-06-03

Area

Container / Git

Context

  • Town ID: 54ccc5c4-f790-4457-8e47-8e2d5e715535
  • Agent: Mayor (fdb30b18-210b-42c4-a59b-cbe328810a44)
  • Rig ID: 10df468b-cdce-4e06-aba4-416118c3e49f

Recent Errors

git status shows numerous deleted files; ls shows only .git directory

Filed automatically by the Mayor via gt_report_bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions