VS Code extension#

The Lockpin extension shows each task’s spend against its budget in your editor, asks Lockpin’s questions there, and rates prompt files as you write them. This page covers installing it, what it shows, its settings and its commands. It is for developers who run agents from VS Code or a VS Code based editor.

The extension reads Lockpin’s meter on this machine. The cap is still enforced by Lockpin, not by the editor, and the extension never talks to a model provider.

Before you begin#

  • VS Code, Cursor, Antigravity, Windsurf or VSCodium.

  • Lockpin installed and running on the same machine. The extension can install it for you (step 2).

Install#

  1. Install the extension.

    • VS Code: from the Visual Studio Marketplace. Search for Lockpin in the Extensions view.

    • Cursor, Antigravity, Windsurf and VSCodium: search for Lockpin in the Extensions view. It comes from Open VSX.

  2. Install Lockpin, if you have not. Run Lockpin: Install Lockpin from the Command Palette, which types the installer into a terminal for you to read and run, or run it yourself:

    irm https://lockpin.dev/install.ps1 | iex
    
    curl --proto '=https' --tlsv1.2 -fsSL https://lockpin.dev/install.sh | sh
    
  3. Run Lockpin: Get started for a six-step walkthrough.

The extension never runs the installer for you.

Verify#

The status bar shows Lockpin once the extension reads the meter, and what is left of a task’s budget after the first call (for example $0.04 left · deploy-check). Can't reach Lockpin means the meter could not be read: hover it to see why, or click it to Start Lockpin in a terminal.

The status bar#

One item on the left shows the tightest budget: of the tasks with a budget and a call in the last hour, the one that has used the most of its budget.

Status bar

Means

$0.04 left · deploy-check

What is left of the tightest task’s budget (after spent and in flight).

$1.23 spent · scan

No task with a budget was active in the last hour; the latest task, with no task budget.

$0.04 left · deploy-check, with a warning icon

That task reached 95% of its budget (lockpin.coach.warnAtPercent).

Call needs approval · deploy-check, with a bell

A call of that task waits for your answer.

1 refused · deploy-check, with an error icon

The cap refused a call of that task in the last five minutes.

◎ 82% on goal

Added when Lockpin tracks this folder with drift tracking.

Lockpin

Lockpin is running, but no call has gone through it yet.

Can't reach Lockpin

The meter could not be read.

Warning background

A task active in the last hour reached 95% of its budget, or a call waits for your answer.

Error background

The cap refused a call in the last five minutes.

Hover for a card: the tightest task, what is left of its budget, its spend and calls left, today’s spend, calls refused by the cap, calls waiting, the task’s last call in Lockpin’s words, and the time it was read (“As of 18:52”), with Open meter (at that task’s row) and Set budget…. Click the item for a menu.

The Lockpin panel#

The panel in the activity bar has up to three views.

Waiting for you shows only while Lockpin holds a call for an answer: one card per call, with Allow this call (Allow next call once the hold has ended), Raise budget and Stop. A button that spends asks once more before it answers. See Approvals at the cap.

Overview, as of the time at its top:

  • One card for the task that matters now: its state (Active, Near cap, Refused or Idle, and at cap or over budget when that applies), what is left of its budget ($0.69 left, of $1.00 budget), a bar of spent, held for the call in flight and free, calls and minutes to the budget at its recent rate, and the cost of its last calls. Set budget… opens an input box; nothing changes until you confirm a higher budget. Open meter opens the meter at that task. Details shows cache, refusals, model advice, what Lockpin saved and the last calls.

  • Needs you (Also needs you when the card’s own task needs you too): tasks refused, at cap or over budget (red), then those at 75% or more (amber).

  • N more on track, folded.

  • Me, in a team, after Lockpin: Set my Lockpin key: your key’s day, week and month limits against what it has spent, as of the last read, and its expiry.

  • Bots, for a team lead or admin: your own team’s service keys, read-only.

  • Goal, when Lockpin tracks this folder: the goal, how much recent work stayed on it, and the findings.

  • The totals: today’s spend against the machine’s day limit, and saved and refused over all tasks.

Problems, when there is one: refusals grouped per task, each naming the budget that refused, downtime as one row, and spend spikes one row each.

Prompt rating#

In prompt files (CLAUDE.md, AGENTS.md, *.prompt.md and others, see lockpin.live.files), the extension rates the prompt a moment after you stop typing.

  • A line above the prompt gives a grade out of 100, the estimated tokens, and the cost first and cached on the first model in lockpin.models. Click it for the full report.

  • The exact words that cost money are colored and underlined: for example a {{current_time}} above fixed instructions, which stops the rest being read from the cache, or a paragraph pasted twice.

  • Fixes you review first. The lightbulb on a hint, or Fix N (review first), opens the change in the Refactor Preview. Nothing changes until you press Apply. Fixes only move or remove your own lines.

For any other text, select it and run Lockpin: Analyze prompt. The token count is Lockpin’s own estimate: deliberately high, the number its cap reserves. Prices need a running Lockpin; without one you still get the grade and the hints. No AI model is used for any of this.

Is the work still on your goal?#

When Lockpin tracks this folder (lockpin -drift .), the status bar adds how much of the agent’s recent spend went to steps on the project’s goal (◎ 82% on goal), or how much of its added code is still there when there is no goal (◎ 64% kept), and a count of warnings (· 2 ⚠). It pops up only for what needs you, such as 3 of the agent’s last 6 steps looking outside your goal. See Loop checks and drift.

Settings#

Setting

Default

What it does

lockpin.meterUrl

http://127.0.0.1:8787

Lockpin’s -listen address, or -admin-listen when set. User settings only.

lockpin.pollSeconds

5

How often to read the meter while the window has focus.

lockpin.alertNotifications

false

Also pop up a notification for each new alert.

lockpin.live.enabled

true

Rate prompt files as you type.

lockpin.live.files

prompt files

Glob patterns of the files rated live.

lockpin.live.delayMs

1500

How long after you stop typing to rate again.

lockpin.highlight

true

Color the exact words a hint is about.

lockpin.models

Opus 5.5, Sonnet 5.5, GPT-6.1 Sol

Models to price on. Empty: rules only.

lockpin.maxOutput

4096

Output tokens assumed for the worst case.

lockpin.drift.enabled

true

Show the goal in the status bar when Lockpin tracks this folder.

lockpin.drift.notifications

true

The drift popups.

lockpin.drift.pivotChanges

3

Pop up when the agent changes direction this many times within lockpin.drift.pivotMinutes (20). 0 turns it off.

lockpin.coach.enabled

true

The status bar’s warning and error backgrounds.

lockpin.coach.warnAtPercent

95

The share of a task’s budget at which the warning background starts.

lockpin.coach.refusalNotifications

true

Pop up when the cap refuses a call, at most once every ten minutes.

In a remote window (SSH, WSL, Codespaces), the extension runs on the remote machine and reads the meter there. Run Lockpin on that machine too, or set lockpin.meterUrl.

Commands#

Command

What it does

Lockpin: Open panel

Shows the Lockpin panel.

Lockpin: Open meter

Opens the meter page, at a task’s row when opened from that task.

Lockpin: Set my Lockpin key

In a team, keeps your own lp_ key in VS Code’s secret storage after the meter confirms it.

Lockpin: Forget my Lockpin key

Removes it.

Lockpin: Refresh status

Reads the meter now.

Lockpin: Set budget…

Raises a task’s budget, after you type and confirm an amount above it.

Lockpin: Analyze prompt

Rates the selection or the file and opens the report.

Lockpin: Show prompt report

Opens the report for the current file.

Lockpin: Fix all hints in this prompt (review first)

Proposes every fix at once.

Lockpin: Stop analyzing this file

Clears its rating and underlines.

Lockpin: Show drift report

Where the agent’s work went, against the goal.

Lockpin: Write GOAL.md

Opens the goal file, or a draft of one.

Lockpin: Get started

The walkthrough.

Lockpin: Start Lockpin

Runs lockpin in a terminal.

Lockpin: Install Lockpin

Types the one-line installer into a terminal, for you to run.

Lockpin: Open setup page

How to point each tool at Lockpin.

Lockpin: Open settings

This extension’s settings.

Privacy#

  • The status bar and panel only read your local meter. Two kinds of button write, when you click them: an answer to a held call, and a new budget.

  • Your own Lockpin key is kept in VS Code’s secret storage (your operating system’s keychain), never in settings or a log. It is sent only to the meter address it was checked at, and only when that address is this machine or https://.

  • Prompt rating reads only files that match lockpin.live.files and text you choose to analyze. For prices, the text goes only to Lockpin on this machine, which keeps nothing.

  • No telemetry. Set lockpin.live.enabled to false, or lockpin.models to [], to turn off live reading or pricing.

The same rules outside the editor#

The prompt rules also run as a command, for CI, and as a Claude Code hook that checks each message before it is sent:

lockpin lint FILE...
lockpin hooks install -agent claude-code -lint

See Saving money.

Next steps#