Fix REA Ghidra timeouts
Unofficial guide. This site is an independent community guide and is not affiliated with the REA project. For authoritative docs see the official REA website and the morluto/rea GitHub repository. Commands here are taken from the official README/docs (checked 2026-10-27); REA changes quickly, so verify against the official docs.
Why it times out
The first Ghidra-backed query triggers import and auto-analysis. The provider startup deadline defaults to 330,000 ms (5.5 min). Big binaries need longer.
Fix 1: raise the startup deadline
export REA_GHIDRA_STARTUP_TIMEOUT_MS=1800000 # any integer 1–2147483647 msSet it in the environment of the REA MCP server (the env of the rea entry in your agent config), not just a random terminal. Empty or invalid values fail config validation. Hopper has REA_HOPPER_STARTUP_TIMEOUT_MS.
Fix 2: the agent's own tool-call timeout (the ~60 s cutoff)
Short answer: if a query fails at almost exactly 60 seconds with MCP error -32001: Request timed out (newer MCP SDKs call it REQUEST_TIMEOUT), REA did not time out — your MCP client did. The MCP client SDK's default per-request deadline is 60,000 ms, and the first Ghidra-backed query (not open_binary) is the one that pays for Ghidra's cold import and auto-analysis. Raising REA_GHIDRA_STARTUP_TIMEOUT_MS alone cannot extend the client's deadline (#1720).
When the client gives up it sends a cancel, REA aborts the shared startup, and parallel queries report "code":"cancelled" / "Analysis was cancelled". Under a hard 60 s cap every retry starts from zero, so a big import never finishes through MCP. Raise the client deadline instead:
| Client | What to set |
|---|---|
| Codex / Kimi | Re-run npx -y rea-agents@latest setup --client codex --yes. On 6.7.0 and 6.8.0 setup writes tool_timeout_sec = 450 by default (330 s Ghidra allowance + 120 s headroom). With REA_GHIDRA_STARTUP_TIMEOUT_MS=2700000 in the environment it writes tool_timeout_sec = 2820 and copies the variable into the server's env. An existing positive value you set yourself is kept. |
| Claude Code | Local stdio servers (the default REA setup) have no 60 s per-request timer; the overall cap is MCP_TOOL_TIMEOUT (default about 28 hours). For HTTP/SSE servers, set MCP_TOOL_TIMEOUT or a per-server "timeout" (ms) in .mcp.json above 60000. |
| Your own SDK client / proxy | Pass a timeout in the second argument of callTool, plus onprogress and resetTimeoutOnProgress: true. REA sends a "Waiting for Ghidra startup" progress notification every 10 s while startup is pending, but it only extends the wait if the client opts in. |
Tested on this site's Linux box with rea-agents 6.7.0 (Codex config written to a temp CODEX_HOME):
[mcp_servers.rea]
args = [ "mcp" ]
startup_timeout_sec = 30
tool_timeout_sec = 2820
[mcp_servers.rea.env]
REA_GHIDRA_STARTUP_TIMEOUT_MS = "2700000"
A thin stdio proxy in front of rea mcp needs the same treatment: forward progress tokens and raise its own request timeout. As a fallback, run the first query once from the CLI (no MCP request deadline) to warm up, then reconnect.
Fix 3: auto-analysis stalls in one analyzer
For Swift/Objective-C arm64 Mach-O targets, analysis can stall in the Objective-C message analyzer (#1783). Skip it:
export REA_GHIDRA_DISABLED_ANALYZERS="Objective-C Message Analyzer"Names must match exact Ghidra analyzer names (comma-separated). Disabling an analyzer skips the facts it would produce.
Fix 4: memory
Give the JVM more heap with GHIDRA_HEADLESS_MAXMEM (default 2G).
Related guides
Sources: installation.md · issue #1720 · mcp-contracts.md (first-query deadlines) · Claude Code env vars · issue #1783
FAQ
What is REA's default Ghidra startup timeout?
330,000 ms. Raise it with REA_GHIDRA_STARTUP_TIMEOUT_MS in the server environment.
Why does my agent still time out after ~60 seconds?
That is the MCP client's default 60,000 ms request deadline, not REA. Raise the client's tool timeout (Codex: tool_timeout_sec, which REA 6.7.0+ setup sets to 450 or more); REA_GHIDRA_STARTUP_TIMEOUT_MS cannot extend it. See issue #1720.
What does MCP error -32001 Request timed out mean with REA?
The client stopped waiting and cancelled the request; REA then aborts the Ghidra startup it was waiting on. Raise the client deadline or let progress notifications reset it with resetTimeoutOnProgress.