Skip to content

For everyone

Editor extension (VS Code, Cursor, Antigravity)

The extension shows SessionCost in your editor’s status bar, for example:

🛡 Guard on · fix the login · 84k tokens · $0.62

  • Status bar: the guard, setup status indicator, context meter (turns amber at >= 75% of the context window), unread tip badge (💡), and the name, tokens and cost of this folder’s newest chat (Claude Code, Codex, Copilot, Antigravity or Cursor). Hover over it for the full chat name and details. It also turns amber when the guard stopped a step, and switches to a new chat as soon as you start one.
  • Pop-up when the guard stops or asks about a step, with Show for the guard report.
  • Click it for the menu: open the report, open the Insights dashboard, token tips on or off, fix token waste, undo the last fix, guard on or off, the guard report, the handover, prices, set up your agents, update, and uninstall.
  • Auto-refresh on upgrade: when the extension updates, it automatically refreshes configured skills across your agents.
  1. Open the Extensions view and search for SessionCost (VS Code uses the Visual Studio Marketplace; Cursor and Antigravity use Open VSX).
  2. Click Install. The first time, it asks to install the SessionCost tool into its own folder (~/.sessioncost/editor). It needs the internet once, and no separate Python or Node.
  3. Click SessionCost in the status bar, then Set up your agents, to add /sessioncost and the guard to your agents.

When the extension updates, it updates its SessionCost to the same version; the status bar says Updating SessionCost… until it is done (about a minute). VS Code, Cursor and Antigravity share this one copy: an editor whose extension is older uses the newer copy as it is and never puts an older one back. If you already installed SessionCost another way (one-line install, npm, Python or the Claude Code plugin), that keeps working; both use the same data in ~/.sessioncost.

Fix token waste first shows the changes for the chat in the status bar. Only after you say yes does it apply them, after a backup, to that same chat. Undo the last fix puts the files back.

The status bar shows the chat of the folder your open file is in. Opening a file in another folder switches it at once.

Say “remove SessionCost” in a chat: your agent gives you one command to paste into a terminal (it cannot run it itself). It removes SessionCost and LiveGuard cleanly in one go — hooks, skills, ~/.sessioncost, plugins, the editor extension, and any CLI package. Add --backup to keep a copy first, then restart your editor. Full guide: Uninstall SessionCost.

Setting Default What it does
sessioncost.refreshSeconds 10 How often the status bar checks whether the chat or the guard changed. It asks SessionCost again only when something changed, and only while the window has focus.
sessioncost.notifyGuard on The pop-up when the guard stops or asks about a step.

Everything runs on this computer. The extension runs SessionCost, which reads your agents’ chat logs here and sends nothing anywhere. The only download is SessionCost itself, once per version.