Connect Claude Code
Select Connect Claude Code on the Overview and confirm: TokenNibbler adds one local hook to your Claude Code settings, so long build, test and search output is shortened before Claude reads it. Connecting works on every plan, including Free.
Before you begin
Section titled “Before you begin”- Install TokenNibbler.
- Install Claude Code on Windows or macOS and use a current release. TokenNibbler uses Claude Code’s HTTP hooks.
-
On the Overview, find the Claude card and select Connect Claude Code.
-
Read the dialog. It shows the settings file TokenNibbler will change, usually
%USERPROFILE%\.claude\settings.json, or~/.claude/settings.jsonon a Mac. If you setCLAUDE_CONFIG_DIR, the file in that folder is used instead. -
Select Connect.
-
In Claude Code, run a build or a test. Sessions that are already open pick up the hook within seconds, so there’s no need to restart them.
-
Check the Claude card. Once the first result arrives, its status line reads Connected · last output with the time, and Activity lists the result.
What it changes
Section titled “What it changes”TokenNibbler adds one PostToolUse hook to your Claude Code settings. Everything else in the file stays as it is, including any hooks you already have.
{ "hooks": { "PostToolUse": [ { "matcher": "^(Bash|PowerShell|Grep|Glob|mcp__.*)$", "hooks": [ { "type": "http", "url": "http://127.0.0.1:17841/tokennibbler/v1/post-tool-use", "headers": { "Authorization": "Bearer <TokenNibbler's local token>" }, "timeout": 3 } ] } ] }}- The matcher covers Claude Code’s Bash and PowerShell tools, its Grep and Glob searches, and MCP tools.
- The address is
127.0.0.1:17841, a service that runs only on your computer. It accepts only requests that carry TokenNibbler’s own random local token. This token belongs to TokenNibbler; it is not your Claude sign-in. - The timeout is 3 seconds. If TokenNibbler is closed, Claude Code carries on with the original output.
Backups
Section titled “Backups”Before every change, TokenNibbler saves an exact copy of your settings file in the backups folder in TokenNibbler’s data folder (%USERPROFILE%\.tokennibbler on Windows, ~/Library/Application Support/TokenNibbler on a Mac), named claude-settings-<time>.json. It keeps the newest 10 (fewer if you choose 3 or 5 in Backups per file in Settings › Data). To open the folder, select Open folder in Settings › Data.
TokenNibbler also never overwrites an edit you make while it’s saving. If the file changes in the meantime, it stops and asks you to retry.
When hooks are managed by policy
Section titled “When hooks are managed by policy”TokenNibbler never changes your hook security settings. It stops, changes nothing, and tells you why when:
- your settings turn hooks off (
disableAllHooks) or allow only managed hooks (allowManagedHooksOnly). The card then reads Hooks disabled in Claude settings. - your settings have an
allowedHttpHookUrlslist that doesn’t include TokenNibbler’s address. You see “Your HTTP hook allowlist needs review. TokenNibbler will not change security policy.”
Claude Code troubleshooting explains each case and how to fix it.
What the card shows
Section titled “What the card shows”The status line at the bottom of the Claude card tells you where things stand.
| Status line | What it means |
|---|---|
| Not connected | No TokenNibbler hook in your Claude Code settings yet. |
| Connected · run a build or test in Claude Code | The hook is in place and waiting for its first result. |
| Connected · last output time | Results are arriving and being shortened. |
| Connected for Bash only | An earlier connection covers Bash only. Select Update to add PowerShell, Grep, Glob and MCP tools. |
| Paused · output passes through unchanged | You paused the optimiser. Select Resume optimiser to start again. |
| Observing only · output unchanged | Observe only is on: TokenNibbler measures what it could save without changing output. |
| Hooks are disabled in Claude settings | Your settings turn hooks off. |
| Needs attention | The settings file couldn’t be read. |
| Local service unavailable | TokenNibbler’s local service isn’t running. |
Once you’re connected, the connection details fold away. Select Connection on the card to see them again or to reconnect.
Disconnect or undo
Section titled “Disconnect or undo”- Pause instead: select Pause optimiser on the Overview. The hook keeps answering, and Claude Code gets its output unchanged.
- Disconnect: in Settings › Integrations, select Disconnect next to Claude Code integration. TokenNibbler removes only its own hook and leaves your other settings and hooks as they are. Sessions that still have the hook loaded get unchanged output at once; restart them to unload it. When Claude Code isn’t connected, the same button reads Connect… (or Reconnect…) and opens the same confirmation.
- Remove before you uninstall: in Settings › App, select Remove… under Remove from Claude Code and Codex. One confirmed step takes the hook out of every Claude Code profile, along with Codex’s hooks, and puts your own status line back. Then uninstall TokenNibbler from Windows Settings, or on a Mac drag it from Applications to the Bin.
Using more than one Claude Code profile
Section titled “Using more than one Claude Code profile”If you keep accounts in separate Claude Code config folders, add each folder in Settings › Accounts. Its account, limits and sessions then appear in TokenNibbler, and you can connect the optimiser there too.
If it didn’t work
Section titled “If it didn’t work”See Claude Code isn’t connected or no output is arriving. For Codex, see Connect Codex.