Skip to main content
Claude Code is the Engineer-role agent in Jarvis. It handles software engineering tasks end-to-end: writing new code, reviewing pull requests, diagnosing bugs, and analyzing technical artifacts. Claude Code runs within the brain mesh and can access your codebase, tools, and memory to give you context-aware results.

What Claude Code handles

  • Code generation — writing functions, modules, scripts, and boilerplate from natural-language descriptions
  • Code review — reading existing code and providing structured feedback on correctness, style, and performance
  • Debugging — analyzing error messages, stack traces, and logs to identify root causes
  • Refactoring — restructuring code for readability, performance, or compliance with your patterns
  • Technical analysis — evaluating architecture, dependencies, and security posture
For multi-step tasks that combine code work with other operations, delegate to Paperclip and it will route the engineering steps to Claude Code automatically.

Invoke Claude Code

Via API

curl -X POST https://your-jarvis-host/agents/invoke \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "claude-code",
    "task": "Write a Python function that reads disk usage from all nodes and returns a JSON report."
  }'

With file context

{
  "agent": "claude-code",
  "task": "Review this file for security issues and suggest fixes.",
  "context": {
    "file": "/home/jarvis/scripts/deploy.sh"
  }
}
See the agents API reference for the full request schema.

Example task delegation

Generating a new script

{
  "agent": "claude-code",
  "task": "Write a Bash script that checks whether each Ollama model on jarvis-brain is responding, and logs the results to /var/log/jarvis/model-health.log."
}

Debugging a failing workflow

{
  "agent": "claude-code",
  "task": "Here is a Python traceback from the monitoring pipeline. Identify the root cause and provide a corrected version of the affected function.",
  "context": {
    "traceback": "Traceback (most recent call last): ..."
  }
}

Integration with the brain mesh

Claude Code runs on the brain mesh and can read from and write to any node you grant it access to. It can:
  • Pull files from mesh nodes via the filesystem MCP tool
  • Access persistent memory to retrieve prior context (previous reviews, past decisions, codebase notes)
  • Push results back to nodes or trigger downstream agents via Hermes
  • Use MCP tools to interact with external systems as part of a code task
This means Claude Code can operate on your live environment — not just respond in isolation.

Best practices

Provide a clear, specific task description. “Fix the bug” is harder to act on than “The parse_logs function in monitor.py raises a KeyError on line 42 when the status key is missing — handle the missing key gracefully.”
Include relevant file paths or snippets in your task context. Claude Code performs better when it can see the actual code rather than working from a description of it.
For large codebases, use memory to store architectural notes and conventions. Claude Code retrieves this context automatically, so you don’t have to re-explain your patterns on every task.
Break large code tasks into focused sub-tasks. Ask Claude Code to generate one module at a time rather than an entire application in a single request — results are easier to review and correct.
After generation, ask Claude Code to review its own output. A second-pass review catches issues the initial generation may miss, especially for security-sensitive code.