Skip to content

[Bug] Squad creates temp files in repo root — should use dedicated temp directory #790

Closed

Description

@tamirdresher

Temp Files in Repo Root

Problem

Squad (and agents) create temporary files directly in the repo root during operations:

  • Commit message temp files
  • Prompt files for CLI invocation
  • Intermediate processing artifacts
  • MCP config fragments

This makes users anxious because:

  1. Files appear in git status as untracked
  2. Risk of accidentally committing temp files
  3. Clutters the working directory
  4. Some CI systems fail on unexpected files

Proposed fix

  1. All temp files should go to a dedicated location:

    • Option A: .squad/.tmp/ (inside .squad, gitignored)
    • Option B: \/squad-{session-id}/ (OS temp dir)
    • Option C: .squad/scratch/ (explicit, gitignored)
  2. The coordinator and all agents should be trained to:

    • Never create files in repo root for temp purposes
    • Use path.join(teamRoot, '.squad', '.tmp', filename) for temp files
    • Use os.tmpdir() for truly ephemeral files
  3. Add to squad.agent.md spawn template:
    TEMP_DIR: {team_root}/.squad/.tmp/

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions