Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Pi PairNew to Visual Studio Code? Get it now.
Pi Pair

Pi Pair

Cmdv

| (0) | Free
Source-and-diff bridge for Pi Pair's terminal workflow
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pi Pair for VS Code — preview

Keep Pi's terminal UI beside the source editor. The companion launches Pi and provides a source-and-diff bridge; it is not a second Pair frontend. Plans, Work, cards and their conversations, learning controls, questions and permissions live in Pi. There is no locations webview, native comment-thread interface or editor reply composer.

Requirements

  • Local desktop VS Code 1.140+. Native Linux/Windows and minimum-version compatibility remain live acceptance work, not verified support. SSH, WSL, dev containers, browser and virtual workspaces are unsupported.
  • A trusted workspace with a local folder.
  • An external Pi installation and the Pair backend installed/enabled separately. This checkout targets Pi 1.7.0; the companion bundles no agent, credentials, permission package or installer.
  • On macOS, terminal.integrated.macOptionIsMeta enables Pi's Alt shortcuts. Pi Pair: Start offers to enable it; nothing changes without your consent. The launcher also offers native diff display settings separately, without delaying launch or changing them silently.

Install from the Marketplace

You do not need a local Pair checkout or build tools to use a published release. See GitHub Releases for versions and compatibility notes. Maintainers publish through the tag release workflow.

Install the backend directly from GitHub:

pi install git:github.com/Cmdv/pi-pair

Then install Pi Pair by cmdv from VS Code's Extensions view, or use:

code --install-extension cmdv.pi-pair-vscode

Pi manages the backend checkout and runtime dependencies. The VS Code extension is a separate installation and does not install the backend for you. Restart Pi after backend installation or updates, and reload VS Code if prompted.

Keep the backend and companion on matching release versions. The unversioned GitHub source follows the repository's default branch. For a published release, use pi install git:github.com/Cmdv/pi-pair@vX.Y.Z, replacing vX.Y.Z with that release's tag. Updating a pinned source does not select a newer tag: install the new tag explicitly. For an unpinned backend, use pi update git:github.com/Cmdv/pi-pair. Update the companion through VS Code's Extensions view, then deliberately start a fresh Pair terminal.

Start, focus and stop

Open/trust the project and choose Pi Pair: Start. Multi-root windows ask which folder to use. Pi opens in a native editor terminal to the right of the source, not in the bottom terminal panel. Its title shows the resolved Pi version, not a compatibility guarantee. The launcher passes --pair; it never types a command or prompt into a terminal draft, parses terminal output or starts a second agent.

Pair opens in navigation. i enters the prompt; Esc / Shift+Esc returns to navigation without losing the draft. In navigation, Escape goes back without aborting the model; Ctrl+C stops active work and returns to the prompt without clearing its draft or exiting Pair. Modal/text-selection controls keep their own handling. The modified Escape binding applies only to this companion's terminals; stopped/hidden Pair and other terminals retain native keys.

From Pair Home, Switch project… lists saved projects and lets you filter by path. Confirming closes the current Pi session and opens a fresh Pair session in the destination; it does not resume the old conversation. The session must be idle, with no pending requests or prompt draft. The editor launches only after the old terminal exits. A destination outside the current workspace opens in a new VS Code window; its workspace must be trusted before Pair can start there. If launch fails, the editor shows the destination and offers a retry. This action requires matching, updated Pair backend and companion versions.

Passive source opening, highlights and diff previews preserve terminal focus. Explicit navigation with Enter from Pi's Cards uses open_location to focus and keep the file at the requested range. Automatic code-card previews are temporary: leaving the card restores the previous editor, or an empty read-only source pane if there was none. The split stays open; pinned tabs and unsaved buffers are never closed. The source remains a native editor, not copied code in a webview.

Use /pair:stop to stop Pair and its bridge; /pair:start starts it again. Closing a terminal or unloading the companion disposes that launch's connection and owned presentations, not other sessions. Reload never closes terminals or discards their drafts. After a reload, disconnect or update, deliberately launch a fresh session with Pi Pair: Start; automatic reconnection and authority replay are unsupported.

Pi is missing or cannot run

The launcher finds Pi on VS Code's PATH and probes --version before opening a terminal. On failure, choose Select executable…, Retry or Installation guide. An executable selection affects that launch, not a global setting. No downloader or installer runs.

Probe and launch use the same explicit environment. Shell startup files and terminal.integrated.env.* overrides are not used. The launcher sets TERM_PROGRAM=vscode and COLORTERM=truecolor so Pi detects the integrated terminal's colour support and renders smooth gradients. Explicit Pi capability overrides remain available. Put Pi and its interpreter on VS Code's PATH; reload VS Code after environment changes if needed.

A separate warning appears after 15 seconds without a Pair handshake. Check that the backend is installed and enabled. Retry opens a fresh terminal after setup is repaired; it never types into or closes the existing session. A missing backend cannot cause literal /pair:start text to be sent to a model.

Source, diffs and safety

The current negotiated methods are open, open_location, buffer_state, diff, diff_close, show and clear. This list reflects the current shared contract; Emacs's pair_focus navigation-leader state is not a VS Code focus command. VS Code source focus uses open_location.

  • Each launch has its own authenticated connection, project root and terminal. Tokens are passed only to that terminal, never global terminal settings or discovery files. Do not copy tokens between terminals or include them in logs.
  • Source presentation is project-confined, including resolved aliases and symlinks/junctions. Existing external buffers can be checked, not opened through the companion. Dirty and hidden buffers are preserved, never saved or reverted.
  • Buffer checks never open documents. Dirty or uncheckable buffers block guarded writes; a failed configured editor does not silently become editor-free. Normal source reads still use saved files, not unsaved editor text.
  • Native read-only diffs display the exact supplied snapshots under opaque, launch-owned URIs. They never apply changes, save source or grant permission. Closing or disconnecting one owner's review does not close another's. Pair's file navigator replaces one selected review preview instead of opening every file. Moving through files preserves terminal focus; Enter in Pair explicitly focuses the diff. Comparisons use separate native tabs so they do not replace an existing source preview. Closing review closes only its owned comparisons, leaving the original source tab and split intact. Pinning a comparison beyond the review's lifetime is not supported.
  • show atomically replaces that owner's temporary highlights after validating the complete batch. Invalid later ranges retain the previous batch. Source insertions move anchors; edited or unavailable code loses verified highlighting. Reopening rechecks the project boundary, range and captured context.
  • clear requires { "all": true } and clears only its owner's highlights and unkept automatic source previews. Use Pi Pair: Dismiss Temporary Highlights, the editor context menu or source Escape when no selection, completion, find, hover, snippet or rename UI owns Escape. If several sessions have highlights there, choose the owner. Clearing or disconnecting releases only that session's clean automatic previews. Kept, pre-existing and dirty source tabs are left alone; no source is saved or edited.
  • Cancelled, superseded and disconnected requests cannot install late highlights or restore disposed presentations. Trust, ownership and source guards remain independent of UI removal. Opening or closing a view is never approval.

Pi Pair: Focus Pair (Cmd+Alt+P / Ctrl+Alt+P outside a terminal) moves focus back to the newest Pair terminal after you save, so Enter there runs Check my changes. It sends Pair nothing; the bridge stays one-way.

Cards, checks, Done/Dismiss, discussion drafts and personal path progression belong to Pi's Work-owned Cards/Learning panels and Pair-owned history. Learning works under either driver; browsing a Plan/task never starts implementation. No editor-side history store or comment/reply interface is needed. Source presentation failures fall back to textual locations in Pi; they do not manufacture fresh-read proof or permission.

Contributor checks and acceptance

From the repository root:

npm run check
npm test
npm --prefix editors/vscode run check
npm --prefix editors/vscode run build
npm --prefix editors/vscode run package

Inspect the fresh VSIX as well as the source manifest: stale generated navigator, reply and media files must be absent. Deterministic tests exercise actual activation with a mocked host and the retained methods through a real bridge client; they do not establish native editor acceptance.

For an isolated native source/diff smoke test, set VSCODE_EXECUTABLE to the application executable (not the CLI wrapper) and run check:editor or check:vsix under editors/vscode. The latter installs the freshly packaged VSIX in a temporary profile. These use a credential-free Pi stub, not a real-model workflow.

The locations/comment/reply frontend, its assets and native UI runners, and the unused shared reply protocol have been removed. The old permission acceptance runner also depended on a removed backend and external permission-package assumptions, so it is not retained as a misleading acceptance command.

Source/diff smoke and package inspection do not establish a full live Pi/editor/model or permission walkthrough. Release verification must also cover launch, source navigation, diffs and unsaved buffers in the supported editor. See the release checks.

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