[GH-ISSUE #8714] [Bug] Target-free inspectors reject symlinked paths without a resolved-path recovery hint (Homebrew commands) #7521

Open
opened 2026-11-03 03:17:09 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @YUI-TIEN on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8714

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Evidence, artifacts, or reconstruction

Observed behavior

inspect_go_binary (MCP) rejects a Homebrew command path because it is a symlink:

{"code":"invalid_request","category":"invalid_input",
 "details":{"operation":"inspect_go_binary","issues":[{"path":["path"],"reason":"invalid_format",
 "message":"Expected a regular file without a symlink: /opt/homebrew/bin/cloudflared"}]}}

The same call succeeds with the resolved path /opt/homebrew/Cellar/cloudflared/2026.3.0/bin/cloudflared (go1.26.1, 62 dependencies).

Reproduction

  1. brew install cloudflared (any Homebrew formula works; /opt/homebrew/bin/* entries are symlinks into Cellar/).
  2. MCP inspect_go_binary with {"path":"/opt/homebrew/bin/cloudflared","detail":"summary"} → rejected as above.
  3. Same call with the realpath → succeeds.

Reproduced 1/1.

Expected behavior

Either resolve the symlink once and record both the caller-supplied spelling and the admitted canonical path in Evidence (as docs/desktop-applications.md already describes for a selected root that "may be a symlink"), or return a typed rejection whose remediation names the resolved target path so an agent can retry without guessing.

Impact and scope

Every Homebrew-installed command on macOS is reached through a symlink, so the first natural call on such targets fails. No evidence-integrity impact observed; the workaround is realpath. I have only tested inspect_go_binary; other target-free inspectors that use the same stable-artifact reader are likely affected but untested.

REA version

rea-agents 6.8.0 (npm, MCP stdio)

Runtime and platform

macOS 26.5, Apple Silicon (arm64), Node.js 24.22.2

Target and artifact context

Homebrew cloudflared 2026.3.0 (Go Mach-O, arm64). /opt/homebrew/bin/cloudflared -> ../Cellar/cloudflared/2026.3.0/bin/cloudflared

Interface

MCP

Earliest failure stage

Input validation

Typed outcome or recovery expected

If symlinks stay unsupported by design: a remediation field containing the resolved path.

Analysis or suspected cause

Source-only: the message comes from the stable artifact reader (dist/artifacts/readStableArtifact.js in the npm package), which appears to require lstat to be a regular file. This is likely intentional for identity stability; the request is for an admitted-resolution path or a better recovery hint, not for following symlinks silently.

Originally created by @YUI-TIEN on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8714 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Evidence, artifacts, or reconstruction ### Observed behavior `inspect_go_binary` (MCP) rejects a Homebrew command path because it is a symlink: ```json {"code":"invalid_request","category":"invalid_input", "details":{"operation":"inspect_go_binary","issues":[{"path":["path"],"reason":"invalid_format", "message":"Expected a regular file without a symlink: /opt/homebrew/bin/cloudflared"}]}} ``` The same call succeeds with the resolved path `/opt/homebrew/Cellar/cloudflared/2026.3.0/bin/cloudflared` (go1.26.1, 62 dependencies). ### Reproduction 1. `brew install cloudflared` (any Homebrew formula works; `/opt/homebrew/bin/*` entries are symlinks into `Cellar/`). 2. MCP `inspect_go_binary` with `{"path":"/opt/homebrew/bin/cloudflared","detail":"summary"}` → rejected as above. 3. Same call with the `realpath` → succeeds. Reproduced 1/1. ### Expected behavior Either resolve the symlink once and record both the caller-supplied spelling and the admitted canonical path in Evidence (as `docs/desktop-applications.md` already describes for a selected root that "may be a symlink"), or return a typed rejection whose remediation names the resolved target path so an agent can retry without guessing. ### Impact and scope Every Homebrew-installed command on macOS is reached through a symlink, so the first natural call on such targets fails. No evidence-integrity impact observed; the workaround is `realpath`. I have only tested `inspect_go_binary`; other target-free inspectors that use the same stable-artifact reader are likely affected but untested. ### REA version rea-agents 6.8.0 (npm, MCP stdio) ### Runtime and platform macOS 26.5, Apple Silicon (arm64), Node.js 24.22.2 ### Target and artifact context Homebrew `cloudflared` 2026.3.0 (Go Mach-O, arm64). `/opt/homebrew/bin/cloudflared -> ../Cellar/cloudflared/2026.3.0/bin/cloudflared` ### Interface MCP ### Earliest failure stage Input validation ### Typed outcome or recovery expected If symlinks stay unsupported by design: a remediation field containing the resolved path. ### Analysis or suspected cause Source-only: the message comes from the stable artifact reader (`dist/artifacts/readStableArtifact.js` in the npm package), which appears to require `lstat` to be a regular file. This is likely intentional for identity stability; the request is for an admitted-resolution path or a better recovery hint, not for following symlinks silently.
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#7521
No description provided.