Using Claude Code in SpaceSpider: Setup and Tips

Use Anthropic Claude Code inside a SpaceSpider pane. Install, authenticate, configure models, and pair it with other AI CLIs for parallel agentic coding.

April 18, 2026 · 5 min read

Using Claude Code in SpaceSpider

Claude Code is Anthropic's agentic coding CLI. It reads and edits files, runs shell commands, plans multi-step refactors, and follows up with targeted tests. SpaceSpider is a natural home for it: every pane is a real PTY with your project folder as its working directory, which is exactly what Claude Code expects.

This page covers install, authentication, recommended pane assignments, and the workflows that play well in a multi-pane grid.

Install Claude Code

Claude Code ships as an npm package. Install it globally so it is on your PATH and SpaceSpider can auto-detect it:

npm install -g @anthropic-ai/claude-code

Verify it resolves:

claude --version

On Windows, open a fresh PowerShell after installing Node so the PATH change is picked up. On macOS, make sure your global npm prefix is on PATH (~/.npm-global/bin or /opt/homebrew/bin depending on setup).

Authenticate once

Run claude login in a normal terminal before you use it in SpaceSpider. The login flow opens a browser, completes OAuth, and writes a credential file to your home directory. Once that file exists, every Claude Code pane in SpaceSpider picks it up automatically.

If you prefer API-key auth:

export ANTHROPIC_API_KEY=sk-ant-...

On Windows:

setx ANTHROPIC_API_KEY "sk-ant-..."

Restart SpaceSpider after setting environment variables so the new values flow into spawned PTYs.

Assign Claude Code to a pane

In the new-space wizard (or via the CLI picker Ctrl+Shift+T inside an existing space):

  1. Click a slot.
  2. Pick Claude Code from the tile list. A green dot confirms the CLI is installed.
  3. Click Create (or the picker's confirm button).

SpaceSpider spawns claude in the space directory. You see the banner, an initial readout of the project, and a prompt.

In a 2-pane space:

  • Left: Claude Code as the driver.
  • Right: shell for tests, git, and log inspection.

In a 4-pane 2-by-2 space:

  • Top-left: Claude Code (lead).
  • Top-right: Codex (for tight iterations and diff reviews).
  • Bottom-left: shell for npm test or cargo test.
  • Bottom-right: shell for git status, git diff, and commits.

See Grid layouts for sizing guidance.

Pick the right model

Claude Code picks a default model (currently Claude Opus 4.7 or a compatible release). You can pin a specific model for a pane via the --model flag at spawn time. The easiest way is to edit the pane's command override in settings:

  1. Focus the pane.
  2. Open settings for the pane (right-click the pane border or use the action in the command palette).
  3. Set custom args: --model claude-sonnet-4-7 for example.
  4. Save and let SpaceSpider restart the pane.

This is useful when you want Sonnet in one pane for speed and Opus in another for harder tasks, all on the same directory.

Workflows that shine in a grid

Plan in one pane, execute in another

Run Claude Code twice against the same directory. In the left pane, ask it to plan the refactor without editing. Copy the plan, paste it into the right pane, and ask that Claude Code to execute it. You get a clean audit trail and the plan does not drift mid-implementation.

Implement and review

Put Claude Code on the left and Codex on the right. Let Claude Code edit; after each edit, prompt Codex with "review the last git diff and flag risks". Because both panes share the working directory, Codex sees the latest changes.

Long-running agent plus a shell

Let Claude Code work through a large task autonomously in the top-left pane. In the top-right, tail your test suite:

npm test -- --watch

Glance at the shell pane to see test status without interrupting the agent.

Common commands inside Claude Code

A few useful Claude Code slash commands that apply well in SpaceSpider panes:

  • /help: lists commands and shortcuts.
  • /clear: clears the in-session context while staying logged in.
  • /cost: prints current token spend.
  • /compact: compresses the conversation to free up context window.
  • /model: switches the active model mid-session.

Environment variables Claude Code respects

Set these before launching SpaceSpider. They flow through the PTY environment to Claude Code:

  • ANTHROPIC_API_KEY: direct API-key auth.
  • ANTHROPIC_BASE_URL: if you route through a proxy.
  • CLAUDE_CODE_MODEL: default model override.
  • CLAUDE_CODE_EDITOR: the editor Claude Code launches for interactive edits. Defaults to $EDITOR.

Cost and rate-limit considerations

Running Claude Code in multiple panes multiplies token usage. Each pane is an independent session with its own context. A few guardrails:

  • Use /compact liberally in long sessions.
  • Pin cheaper models (Haiku or Sonnet) in panes doing scaffolding and tests; reserve Opus for the pane doing architecture.
  • Watch /cost as you go.

Troubleshooting Claude Code in SpaceSpider

  • Pane exits with "Please run claude login": no credential on disk. Run claude login in a regular terminal once.
  • "Command not found": the CLI is not on PATH in the environment SpaceSpider inherited. Close and reopen SpaceSpider from a fresh terminal.
  • Slow first response in every pane: each pane establishes its own session. Consider fewer panes of Claude Code running concurrently.
  • ANSI colors look muted: enable "true color" in settings. xterm.js defaults to 256 colors.
  • Claude Code editor popups do not open: set CLAUDE_CODE_EDITOR=code -w or similar to a blocking editor command.

More help on Troubleshooting.

Frequently asked questions

Can two Claude Code panes share context?

No. Each pane is an independent session. They share the filesystem, so edits from one are visible to the other, but conversation history is per-pane.

Does SpaceSpider add latency to Claude Code?

No. The PTY streams bytes directly from the CLI to xterm.js. Any latency you feel is the network round-trip to Anthropic.

Can I use a corporate proxy?

Yes, set ANTHROPIC_BASE_URL and any HTTPS_PROXY needed before launch.

What happens if I close the grid mid-task?

The PTY exits, which ends the Claude Code session. Use Esc Esc to return to the home view without killing panes if you want to come back.

Can I pipe files into Claude Code?

Yes. A pane behaves like a normal terminal. cat file | claude works as expected.

Keep reading