Five Workspace Anti-Patterns That Fake Agent Skill
Description and use
The article outlines five workspace anti-patterns that fake agent skill. It recommends isolated worktrees, path gating, atomic patch application, pre-run snapshots, and cleanup to ensure reliable, secure agent demos.
Problem
Coding agents often appear successful because the workspace is not isolated, leading to hidden failures and security leaks.
Outcome
Implementing isolated worktrees, path gates, atomic patch application, and pre-run snapshots eliminates hidden failures, secures secrets, and ensures reproducible agent demos.
Workflow
- Create a unique worktree or clone for the run
- Configure path gates to allow only safe prefixes and deny secrets
- Generate a unified diff patch from the agent
- Check the patch with git apply --check
- Apply the patch atomically if check passes
- Record HEAD and git status before the run
- Run gates.sh to validate changes
- If gates fail, perform git reset --hard to the recorded HEAD and git clean -fd
- Delete the temporary worktree or clone after the run
Evidence
Give every run a throwaway worktree. Apply patches only after a gate passes.
Deny by default. Allow one path prefix. Reject reads that match a deny list.
Stage one unified diff. Apply it atomically. Reject the whole patch when any gate fails.
Snapshot before tools. Revert on red. Record HEAD and git status --porcelain as first-class outputs.
One run, one directory, one wipe. Cold clone or a fresh worktree every time.
- Record date: 2026-09-16T16:45:22.916Z