Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pi Coding Agent SidebarNew to Visual Studio Code? Get it now.
Pi Coding Agent Sidebar

Pi Coding Agent Sidebar

Preview

Dailystate

|
17 installs
| (0) | Free
| Sponsor
Chat with the Pi coding agent in a VS Code sidebar: multiple session tabs, fork from any message, steer a running agent, review diffs before edits land, track every running agent, and see tokens and cost. Unofficial.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pi Coding Agent Sidebar

Buy Me a Coffee

Chat with the Pi coding agent without leaving VS Code. Run several sessions side by side, branch a conversation from any message, steer the agent while it works, and approve every file change in a real diff before it touches your code.

Unofficial community extension. Not affiliated with the Pi project. You need Pi installed (the extension can install it for you).

Why use it

  • Tabs for parallel work. Every tab is its own Pi session, so a long task in one doesn't block another. Close a tab to keep its session saved, and reopen it from History.
  • Fork from any message. Hover a message and click Fork from here to branch into a new tab. The original conversation stays untouched. A Tree view shows every branch.
  • See every agent at a glance. The Agents view (pulse icon, or click the status bar) lists each Pi agent: what it's doing right now, a timeline of its tool calls, the files it changed, how long it's been running and whether it needs you. It covers your tabs and Pi sessions running in a terminal or another window. The status bar counts agents working, and you get a notification when one finishes or needs approval (quiet when you're already looking at it).
  • Steer a running agent. Enter redirects it after the current step, Alt+Enter queues a follow-up for when it finishes, Esc stops it and puts your message back in the box.
  • Review before it lands. File edits and shell commands can pause for Approve / Deny, with a native side-by-side diff of the proposed change. Choose how strict to be: ask for everything, edits only, or never.
  • Context without copy-paste. Your open file or selected lines attach automatically (one click removes them). Type @ to attach any file, or press Ctrl+Alt+L to attach a selection.
  • Slash commands that stay organised. / opens a sectioned menu (Context, Model, Session, Customize, Settings, Commands) with your Pi skills, prompt templates and extension commands.
  • Know what it costs. Live context-window use, prompt and completion tokens, session cost, and this week's (default) or this month's spend across all your Pi sessions, switchable with a toggle in the footer, with optional budgets.
  • Your models, your keys. Switch models mid-session, with a Scoped list from your Pi settings or All. Pick a thinking level for models that support it. Keys and logins stay in Pi's own config; this extension never stores them.
  • Warnings stay out of the way. Errors and warnings collect behind a bell instead of cluttering the chat.
  • Your side, your choice. Opens on the right; Pi: Switch Side moves it to the left.

Getting started

  1. Install the extension and click the Pi icon in the side bar.
  2. If Pi isn't installed, click Install Pi Agent.
  3. Run /login once (the Log in button opens Pi in a terminal) to connect a provider.
  4. Ask something.

Requires VS Code 1.107 or newer. Pi needs Node 22.19+ when installed through npm.

Settings

Setting Purpose
piAgent.notifications background (default: skip if you're looking at it), always, or off
piAgent.trackTerminalSessions Show Pi agents running outside the sidebar by reading Pi's local session files (on by default)
piAgent.approvalMode ask (edits and commands), edits, or off
piAgent.autoAttachContext Attach the open file or selection automatically
piAgent.side right (default) or left
piAgent.sessionBudgetUsd Optional per-session budget shown in the footer
piAgent.spendPeriod Footer total: week (default) or month. Also a toggle in the footer
piAgent.weeklyBudgetUsd Optional weekly budget across all Pi sessions
piAgent.overallBudgetUsd Optional monthly budget across all Pi sessions
piAgent.path / piAgent.agentDir Use a specific pi launcher or config directory
piAgent.inheritShellEnv Start Pi with your login shell's environment so keys from ~/.zshrc / ~/.zprofile work (on by default)
piAgent.envScript A script sourced before Pi starts, to set keys from a .env, direnv or a keychain (user settings only)
piAgent.extraEnv Extra non-secret environment variables for Pi
piAgent.extraArgs Extra arguments for every Pi process, e.g. ["--models", "anthropic/*"]
piAgent.maxTabs, piAgent.restoreTabs, piAgent.resumeLastSession Tab behaviour

Pi can't find your models or API key?

  1. Easiest: click Log in and run /login in Pi. That is stored by Pi itself and always works.
  2. Key exported in your shell profile (~/.zshrc, ~/.zprofile): works automatically, even when VS Code is opened from the Dock.
  3. Key lives somewhere else (a project .env, direnv, a keychain): set piAgent.envScript in your user settings to a script that exports it, for example ${workspaceFolder}/.pi/env.sh. The script is sourced before Pi starts. Restart the tab to apply it.

Privacy and safety

  • To run Pi the way your terminal does, the extension starts your login shell once to read its environment (so API keys exported in ~/.zshrc are found). Those values are handed only to Pi and are never logged or stored. Turn it off with piAgent.inheritShellEnv.
  • To show agents running outside the sidebar, the extension reads Pi's session files in ~/.pi/agent/sessions (read-only, only recently modified ones). Nothing is sent anywhere. Turn it off with piAgent.trackTerminalSessions.
  • No telemetry, and no network requests of its own. Prompts go to whichever provider you configured in Pi.
  • Pi can run commands and edit files with your permissions, so the extension only runs in trusted workspaces. Keep approvalMode on ask until you're comfortable.

Support

Questions, bugs and ideas: use the Q&A tab on this extension's Marketplace page. If it saves you time, you can buy me a coffee. It's entirely optional.

The Pi logo belongs to its owners and is used here to identify the tool this extension works with.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft