[GH-ISSUE #2143] [Bug] An invalid REA_JEB_MCP_URL crashes every CLI command and every MCP connection #702

Closed
opened 2026-10-15 18:27:31 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @kaoru0822-kitauji on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2143

Observed behavior

An unusable REA_JEB_MCP_URL takes down REA as a whole, not just the JEB tools. Two examples: a malformed value, or the natural http://localhost:8425/mcp, which parseJebMcpEndpoint rejects because the host is not a literal loopback address.

  • CLI: every command crashes while the CLI is being built, including rea doctor and analyses unrelated to JEB. The output is an uncaught AnalysisInputError stack trace:
    $ REA_JEB_MCP_URL=http://localhost:8425/mcp rea inspect-go-binary /path/to/go-binary
    …/dist/cli-runtime/cli.js:12113
        if (url.hostname !== "127.0.0.1" && url.hostname !== "[::1]") return err(new AnalysisInputError("jeb_mcp_endpoint", …
    AnalysisInputError: Invalid analysis input for jeb_mcp_endpoint
        at parseJebMcpEndpoint … at new JebProvider … at createJebAnalysisProvider … at registerJebCommands … at createCli
    
  • MCP: rea mcp starts, but every client connection fails with Internal server error, and stderr gives no explanation, so no REA tool is usable.

Reproduction

Current main fe4b94a66 (macOS, Node 26):

REA_JEB_MCP_URL=notaurl rea doctor --json
REA_JEB_MCP_URL=http://localhost:8425/mcp rea doctor --json

For MCP, connect any client to rea mcp with either value set and call tools/list.

Expected behavior

The invalid setting is reported where JEB is used: inspect_jeb_client and the other JEB operations, plus JEB availability in doctor/capabilities. It names REA_JEB_MCP_URL and the reason. All other CLI commands and MCP tools keep working.

Cause

JebProvider's constructor converts the parseJebMcpEndpoint error result into a throw (if (!endpoint.ok) throw endpoint.error;). createJebAnalysisProvider (src/composition/jeb.ts) runs eagerly from registerJebCommands in createCli, and from createServer for each MCP connection.

Originally created by @kaoru0822-kitauji on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2143 ### Observed behavior An unusable `REA_JEB_MCP_URL` takes down REA as a whole, not just the JEB tools. Two examples: a malformed value, or the natural `http://localhost:8425/mcp`, which `parseJebMcpEndpoint` rejects because the host is not a literal loopback address. - **CLI:** every command crashes while the CLI is being built, including `rea doctor` and analyses unrelated to JEB. The output is an uncaught `AnalysisInputError` stack trace: ```text $ REA_JEB_MCP_URL=http://localhost:8425/mcp rea inspect-go-binary /path/to/go-binary …/dist/cli-runtime/cli.js:12113 if (url.hostname !== "127.0.0.1" && url.hostname !== "[::1]") return err(new AnalysisInputError("jeb_mcp_endpoint", … AnalysisInputError: Invalid analysis input for jeb_mcp_endpoint at parseJebMcpEndpoint … at new JebProvider … at createJebAnalysisProvider … at registerJebCommands … at createCli ``` - **MCP:** `rea mcp` starts, but every client connection fails with `Internal server error`, and stderr gives no explanation, so no REA tool is usable. ### Reproduction Current main fe4b94a66 (macOS, Node 26): ```sh REA_JEB_MCP_URL=notaurl rea doctor --json REA_JEB_MCP_URL=http://localhost:8425/mcp rea doctor --json ``` For MCP, connect any client to `rea mcp` with either value set and call `tools/list`. ### Expected behavior The invalid setting is reported where JEB is used: `inspect_jeb_client` and the other JEB operations, plus JEB availability in doctor/capabilities. It names `REA_JEB_MCP_URL` and the reason. All other CLI commands and MCP tools keep working. ### Cause `JebProvider`'s constructor converts the `parseJebMcpEndpoint` error result into a throw (`if (!endpoint.ok) throw endpoint.error;`). `createJebAnalysisProvider` (`src/composition/jeb.ts`) runs eagerly from `registerJebCommands` in `createCli`, and from `createServer` for each MCP connection.
bsakaguchi 2026-10-15 18:27:31 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#702
No description provided.