DiffQuota
Sets a max-files / max-lines blast-radius quota per session so an open-ended task can't quietly balloon.
Price: $12 one-time
Included free
- Live diff watcher with configurable file/line thresholds
- Status bar quota progress indicator
Unlocked with a license
- Proactive pause via Claude Code PreToolUse/PostToolUse hooks (self-configured — see below)
- Per-task-type presets (bug fix / refactor / scaffold)
- End-of-session quota-vs-actual summary
What "proactive pause via Claude Code hooks" actually ships
Run DiffQuota: Generate Claude Code Hook Script (requires a license) and DiffQuota writes a real, ready-to-run hook script to .claude/hooks/diffquota-pretooluse.sh, sized to your current diffQuota.maxFiles / diffQuota.maxLines quota. The script checks real git diff state (staged + unstaged, files and lines) and prints a {"decision": "block", ...} or {"decision": "allow"} line, which is exactly what a Claude Code PreToolUse/PostToolUse hook expects on stdout. DiffQuota does not register the hook in your Claude Code settings for you — that step is the "self-configured" part: add it as a PreToolUse (or PostToolUse) hook for the tools you want gated in your own Claude Code settings. Re-run the command after changing your quota to regenerate the script with the new limits.
Known limitation: session history persistence
Past-session history (shown in DiffQuota: Show Session Summary) is written when the extension's deactivate() runs or when the workspace folders change. VS Code does not guarantee deactivate() runs on every exit path (e.g. the OS killing the process, a crash, or some remote-session teardowns), so a session that ends abnormally may not get a history entry. This is a best-effort log, not an audit trail.
v2 stretch: DiffQuota manages the hook itself
Today DiffQuota only warns in the editor after a quota is crossed, and (with a license) generates the PreToolUse/PostToolUse hook script described above — it never edits your Claude Code settings and never runs the enforcement itself. A natural next step is DiffQuota registering that generated script into the project's own Claude Code settings automatically (and keeping it in sync when the quota changes), instead of leaving that step to you.
Getting a license
Open the DiffQuota sidebar (activity bar icon) and click Get License. After purchase you'll receive a license key — paste it into the sidebar and click Activate License. Keys are machine-locked; use Move to another machine… in the sidebar before reinstalling on a new device.