docs / editor-extension

Editor extension

See each prompt's cost live in Cursor or VS Code, and where the money went, round-trip by round-trip.

The PromptConduit extension reads the event log the CLI writes on your machine, ~/.promptconduit/events.jsonl. It works with Claude Code and Cursor sessions, needs no account, and doesn't send your code or prompts anywhere. It's open source: github.com/promptconduit/editor-extension.

Before you begin

  • Install the CLI and set up hooks. The extension has nothing to show until the CLI records events. See the Quickstart.
  • Cursor, or VS Code 1.85 or later.

Install the extension

  1. Open the Extensions view: ⇧⌘X on macOS, Ctrl+Shift+X on Windows and Linux.
  2. Search for PromptConduit and select Install. Cursor installs it from Open VSX.

The VS Code Marketplace listing isn't live yet. Until it is, install the VSIX from Open VSX by hand:

  1. Open the PromptConduit page on Open VSX and select Download.
  2. Install the file you downloaded:
bash
code --install-extension ~/Downloads/promptconduit.promptconduit-*.vsix

Or, in the Extensions view, open the … menu and choose Install from VSIX….

Then reload the window (Developer: Reload Window in the command palette) and send a prompt. The cost appears in the status bar.

Note

promptconduit install cursor also installs a copy of the extension that ships inside the CLI. That copy can be older than the one on Open VSX. If you don't see The Loop after running it, update the extension from the Extensions view. To install hooks without it, add --no-extension.

Read the status bar

The item at the bottom right reads ⚡ <last request> · 🕘 <session>: what the last request to the model cost, and the session's total so far. It updates as your assistant works. Its tooltip adds this branch's and this pull request's cost.

The extension follows the session in your focused terminal, or the selected agent tab in Cursor. To keep it on one session, run PromptConduit: Pin Cost Session.

Open The Loop

Select the cost in the status bar, or run PromptConduit: Show The Loop. The Loop explains one prompt:

  • The headline: what the prompt cost, and how much of that was the model re-reading the conversation.
  • The loop: one column per round-trip to the model, as tall as the context it read, with the tools it ran in between and each column's cost underneath. It grows live while a prompt runs.
  • What would have made this cheaper: the same steps re-priced with fewer round-trips, a fresh session or subagent, or another model. Each links to a short guide.
  • Notes: things that already happened, such as a wait long enough for the prompt cache to expire.
  • How you've done this before: this prompt against your past prompts of the same kind, with your cheapest run.
  • How this session got here: context size across the whole session, so you can see when to start fresh.

Pick an earlier prompt from the menu at the top. If The Loop looks stale after an update, select the ↻ button in its toolbar (PromptConduit: Refresh Panel).

Let your agent answer

The Loop shows whether the PromptConduit MCP server is registered with this editor's agent: Cursor in Cursor, Claude Code in VS Code. If it isn't, select Register, which runs promptconduit mcp install. Then you can ask your agent "what did my last prompt cost?" directly. See AI agents (MCP).

Restore interrupted sessions

When the editor restarts, it closes its terminals and any Claude Code sessions in them. With promptconduit.restore.mode set to auto, the default, the extension reopens those sessions in the exact directory they ran in, worktrees included. Sessions still running are never touched. Run PromptConduit: Restore AI Sessions to do it by hand.

Tip

Developer: Reload Window keeps your terminals. Use it instead of quitting the editor when you only need to reload extensions.

Settings

SettingDefaultWhat it does
promptconduit.cost.enabledtrueShow the cost item in the status bar.
promptconduit.cost.binaryPathemptyPath to the promptconduit CLI. Leave empty to find it on your PATH and in common install locations.
promptconduit.restore.modeautoauto reopens interrupted Claude Code sessions after a restart, prompt asks first, off does nothing.
promptconduit.restore.sinceHours12How far back, in hours, to look for interrupted sessions.
promptconduit.cursorTabs.enabledtrueCursor only: follow the selected agent tab, so the status bar and The Loop switch to that conversation.

Commands

Open the command palette and type PromptConduit:

CommandWhat it does
PromptConduit: Show The LoopOpen The Loop for the current session.
PromptConduit: Pin Cost SessionKeep the status bar and The Loop on one session.
PromptConduit: Follow Active Cost SessionUndo a pin: follow the focused terminal or agent tab again.
PromptConduit: Sign InRun promptconduit login in a terminal, to sync and see team cost.
PromptConduit: Register MCP Server for Your AgentRegister the MCP server with this editor's agent.
PromptConduit: Invite a TeammateAsk for an email address and run promptconduit team invite with it.
PromptConduit: Install the CLIInstall the promptconduit CLI, when it's missing.
PromptConduit: Run Setup (promptconduit init)Run the setup wizard in a terminal.
PromptConduit: Restore AI SessionsReopen interrupted Claude Code sessions now.
PromptConduit: Refresh PanelReload The Loop's view in place.
PromptConduit: Send FeedbackSend feedback to the PromptConduit team.

Next steps