Troubleshooting & Common Pitfalls

Step-by-step solutions for context token exhaustion, schema validation errors, engine paths, and client configuration conflicts.

1. Context Thrashing in Claude Code & Copilot CLI

Symptom: Claude Code hangs with "autocompact is thrashing", or Copilot CLI returns compaction_static_context_blocked.

Root Cause: REA provides 172+ reverse engineering tools. When full schema definitions are injected on every turn, the raw tool catalog consumes ~496 KB (~120k tokens).

Solution: Enable Compact Schema Profile

Add "REA_MCP_INPUT_SCHEMA_PROFILE": "compact" to the env block of your client's REA configuration:

~/.claude.json snippet
{
  "mcpServers": {
    "rea": {
      "command": "npx",
      "args": ["-y", "rea-agents@latest", "mcp"],
      "env": {
        "REA_MCP_INPUT_SCHEMA_PROFILE": "compact"
      }
    }
  }
}

This shrinks upfront tool advertisements from ~496 KB down to ~290 KB, while full validation remains intact on the server side.

2. Ghidra Integration & Java Runtime Setup

Symptom: Native analysis fails with "Ghidra analyzeHeadless not found" or Java version errors.

3. Windows Backslash Escaping in JSON

Symptom: Client fails to launch REA on Windows with a JSON syntax parse error.

In Windows JSON configuration files, all file path backslashes must be double-escaped. For example, use "C:\\Users\\name\\AppData\\Roaming" or standard forward slashes "C:/Users/name/AppData/Roaming".

4. Analyzing Electron Apps Without Native Disassemblers

Symptom: You want to reverse-engineer a desktop app (e.g., Slack, Notion, VS Code) but don't have Hopper or Ghidra installed.

Good news: REA does not require native binary engines to inspect Electron applications! Use the direct JavaScript analyzer command:
npx -y rea-agents@latest analyze-javascript-application "/path/to/resources/app.asar" --json

REA will automatically unpack the ASAR archive in-memory, parse the AST, and map IPC communication routes.