Skip to content

claude code integration

spacecake integrates with Claude Code to give Claude context about your open files and display live session metrics.

run claude from the integrated terminal - it automatically connects to spacecake, giving Claude context about your open files.

if Claude shows “IDE disconnected”, run /ide to check the connection status. you should see spacecake listed and can select it to reconnect.

a green claude status badge in the header indicates an active Claude session is connected.

Claude Code defaults to plan mode when running inside spacecake’s integrated terminal. in plan mode, Claude creates a plan file before making changes, giving you a chance to review and edit the approach.

when Claude creates or updates a plan, you’ll see a prompt in the terminal:

press ctrl+g to open the plan in spacecake

press ctrl+g to open the plan file directly in the editor. the tab will show a green “claude” badge indicating it was opened by Claude.

when you’re done reviewing or editing the plan:

  • save & close: saves your changes and returns focus to Claude
  • close: closes without saving and returns to Claude

Claude will wait for you to close the file before continuing, so you can take your time reviewing the plan.

the status line displays live Claude Code session metrics in the terminal header badge:

  • current model name
  • context usage percentage
  • session cost

spacecake automatically configures Claude Code’s status line hook when it detects a connected session. no manual setup is required.

if your ~/.claude/settings.json already has a custom statusLine command (not managed by spacecake), you’ll be prompted to either override it with the spacecake hook or dismiss the prompt and keep your existing configuration.

if you need to configure the status line manually, edit ~/.claude/settings.json and set the statusLine command to the spacecake hook script:

{
"statusLine": {
"type": "command",
"command": "~/.spacecake/.app/hooks/statusline.sh"
}
}

restart Claude Code after making changes.

Claude Code runs the status line hook on each render. the spacecake hook script:

  1. reads session JSON from stdin (model, context usage, cost)
  2. checks if ~/.claude/spacecake.sock exists (Unix socket)
  3. POSTs the data to spacecake via the socket

if spacecake isn’t running, the hook exits silently with no impact on Claude Code.

IDE disconnected?

  • run /ide in Claude Code to check connection status
  • select spacecake from the list to reconnect

no status line data appearing?

  • make sure spacecake is running
  • verify ~/.claude/settings.json has the correct statusLine configuration
  • restart Claude Code after making changes