Who it is forA developer working on several branches of one repo at once who wants the agent to follow the right worktree.
The problemJuggling Git worktrees in a terminal makes it easy to run the agent against the wrong working copy.
The outcomeThe user selects a worktree from the sidebar, browses its files, and previews diffs before accepting the agent's changes.
What you need first
- A supported machine: Apple Silicon Mac on macOS 11 or later, Windows 10/11 x64, or Linux x64 with WebKitGTK 4.1 and GTK 3
- Pi sessions or Pi model keys on this machine (optional, only needed to see existing history)
- For the proxy use case: Node.js 22 and npm, plus a running HTTP proxy address
Steps
- Open Pi Agent and select your project in the sidebar.
- Choose the Git worktree you want from the sidebar.
- Browse project files in the app to confirm which working copy you are in.
- Open the diff preview to review the changes the agent made in that worktree.
Prompt for your agent
Using the abcwyc/pi-agent-desktop README, explain how to switch to a Git worktree and preview a diff for the project at <project-path>. Expected output: the sidebar and preview steps in order. Verify that the README lists diffs among the previewable file types.
Caveat. The README does not describe how worktrees are created, so set up the worktrees with Git first and then select them in the sidebar.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for abcwyc/pi-agent-desktop and "Switch Git worktrees and review diffs in a desktop app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer