Skip to content

fix(docs): use system temp directory for --body-file to avoid rm denylist collision #256

@MScottAdams

Description

@MScottAdams

Problem

When agents use --body-file for PR/issue creation (per scm/github.md rules), they write a temp file to the worktree directory and then rm it afterward. The rm command is on Warp's default command denylist, so each cleanup triggers a user approval prompt -- blocking autonomous swarm agents.

Observed During

Swarm run 2026-04-09 -- all 3 agents blocked on rm <worktree>/pr-body.md approval, requiring manual intervention from the monitor user.

Proposed Fix

Change the --body-file convention in scm/github.md to write temp files to the system temp directory instead of the worktree. Files in the system temp directory are managed by the OS and do not require explicit rm calls.

  • PowerShell: c:\temp (e.g. C:\Users\<user>\AppData\Local\Temp)
  • Unix: /tmp or ``

Pattern:

  1. Write PR body to [System.IO.Path]::GetTempFileName() (PS) or mktemp (Unix)
  2. Pass the temp path to gh pr create --body-file <temp-path>
  3. No explicit rm needed -- OS handles cleanup

This eliminates the denylist collision entirely without requiring users to modify their Warp agent permissions.

Files to Change

  • scm/github.md -- update --body-file convention to use system temp directory
  • skills/deft-swarm/SKILL.md -- note temp file convention in prompt template or launch guidance

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