page

Claude Code Headless Access

Claude Code Headless Access to Nexus

Key Insight

When LARS calls Claude Code via SSH headlessly, Claude Code still has full MCP gateway access.

How It Works

  1. LARS receives complex request User: "Hey LARS, help me refactor the authentication module"

  2. LARS delegates via SSH python subprocess.run([ "claude", "-p", "Refactor the auth module in /project/path", "--session-id", session_id ])

  3. Claude Code runs workflow.init

  4. Gets full Nexus context
  5. Knows who Chris is
  6. Knows all protocols and tools
  7. Has access to MCP gateway

  8. Claude Code does the work

  9. Can read/write files
  10. Can use all Nexus tools
  11. Can save to context, track, kb
  12. Full capabilities

  13. LARS reports back

  14. Claude Code output returned to LARS
  15. LARS summarizes via voice
  16. User hears the result

No Markdown File Needed

The workflow.init IS the context. It contains: - Who Chris is - What Nexus is - All protocols and patterns - Environment status - Tool schemas - Voice preferences

LARS doesn't need to pass a markdown briefing file. Claude Code already knows everything through workflow.init.

Session Persistence

# First call - starts session
claude -p "Start refactoring" --session-id abc123

# Follow-up - resumes with context
claude -r --session-id abc123 -p "Now add tests"

The -r flag resumes the previous session with full conversation history.

The Vision

You (voice) -> "Hey LARS, we need Claude to build X"
     |
     v
LARS (local) -> Understands request
     |
     v
SSH to Claude Code -> claude -p "build X" --session-id ...
     |
     v
Claude Code -> workflow.init -> Full Nexus context
     |
     v
Claude Code -> Does complex work with all tools
     |
     v
Output -> Returns to LARS
     |
     v
LARS -> Summarizes via InWorld TTS
     |
     v
You hear the result

All seamless. All voice-driven. LARS as the interface, Claude Code as the heavy lifter.

ID: b3386f64
Path: LARS Voice Assistant > Claude Code Integration > Claude Code Headless Access
Updated: 2025-12-30T20:33:05