[GH-ISSUE #5767] [Bug] Preserve observed WABT configuration diagnostics for agent recovery #3504

Closed
opened 2026-10-31 00:41:14 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @gensokyo-dev on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5767

Before submitting

  • Searched related open/closed reports, including #5598 and #4201. This concerns configuration admission, not optional WASM input attribution.
  • Removed credentials and private absolute path prefixes.

Area

Provider or capability discovery; CLI and MCP.

Observed behavior

On df8b4d8a5a8c218ac9f49dd75e014bd910209d36, inspecting a valid empty module with actual upstream WABT 1.0.41 returns:

capability_unavailable
Unsupported wasm-validate version banner; expected 1.0.42.
Supply WABT 1.0.42 via absolute REA_WABT_BIN_DIRECTORY; REA does not install tools.

The producer successfully read 1.0.41\n, but the error discards that output and the exact probed executable. The same expected-version-only message also represents an unrelated executable returning an empty banner. These distinct observed conditions become indistinguishable in returned diagnostics.

Actual ENOENT, ENOTDIR and EACCES admission failures retain their raw system reason but receive the same generic supply-tools instruction, without explaining directory-vs-executable choice, access repair, or the MCP launch-environment/restart boundary.

Reproduction

  1. Use caller-supplied upstream WABT 1.0.41 and 1.0.42 Linux x64 release archives; verify their published SHA-256 files. Neither is installed globally.
  2. Set REA_WABT_BIN_DIRECTORY to the 1.0.41 bin directory in REA's launch environment.
  3. Call actual MCP inspect_wasm_artifact with the absolute path to an 8-byte valid empty WASM and detail: "summary".
  4. Compare the returned error against the configured executable's --version. Actual version output is absent from the error. Real 1.0.42 succeeds on the same bytes.

Also reproduced missing path, regular-file-as-directory and owned non-executable-tool inputs through public MCP. A real Codex CLI baseline recovered the version mismatch after additional shell inspection and retargeting only its authorized fixture symlink; not claiming the model failed or a measured improvement yet.

Expected behavior

Preserve already-observed stdout/stderr and exact probed command as producer-owned diagnostics. Give compact, condition-specific recovery: expected release and three required tools, correct directory selection/access, and changing REA_WABT_BIN_DIRECTORY in the shell or MCP server launch environment with restart when that environment changes. No implicit install, unknown flag, target mutation, version bypass or unchanged retry.

Impact and scope

Lost observations require avoidable diagnostics and weaken agent recovery guidance. Runtime reproduction is established; broader model success-rate impact is unknown. Restrict the fix to existing WABT configuration errors and shared CLI/MCP projection; preserve cleanup ownership and all prior failure classes.

Version / runtime / artifact / interface

REA 6.7.0 at the revision above; Node 24.18.0, Debian 12 Linux x64; upstream WABT 1.0.41 and 1.0.42. Codex CLI 0.161.0, gpt-6.1-sol. Generated empty module (SHA-256 93a44bbb96c751218e4c00d479e4c14358122a389acca16205b1e4d0dc5f9476), never executed. MCP; earliest failure: setup/provider admission.

Evidence / proposed validation

Captured public MCP envelopes and upstream version commands establish the diagnostic loss. Proposed guards: version mismatch, nonempty stderr despite correct stdout, empty banner, command attribution, path/permission recovery, cleanup preservation; actual CLI/MCP parity and sequential Codex permitted-repair vs read-only-blocked trials. Performance comparisons will include whole-session tokens, elapsed/CPU and sampled process-family RSS; cold-cache costs not yet measured.

Originally created by @gensokyo-dev on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5767 ## Before submitting - [x] Searched related open/closed reports, including #5598 and #4201. This concerns configuration admission, not optional WASM input attribution. - [x] Removed credentials and private absolute path prefixes. ## Area Provider or capability discovery; CLI and MCP. ## Observed behavior On `df8b4d8a5a8c218ac9f49dd75e014bd910209d36`, inspecting a valid empty module with actual upstream **WABT 1.0.41** returns: ```text capability_unavailable Unsupported wasm-validate version banner; expected 1.0.42. Supply WABT 1.0.42 via absolute REA_WABT_BIN_DIRECTORY; REA does not install tools. ``` The producer successfully read `1.0.41\n`, but the error discards that output and the exact probed executable. The same expected-version-only message also represents an unrelated executable returning an empty banner. These distinct observed conditions become indistinguishable in returned diagnostics. Actual ENOENT, ENOTDIR and EACCES admission failures retain their raw system reason but receive the same generic supply-tools instruction, without explaining directory-vs-executable choice, access repair, or the MCP launch-environment/restart boundary. ## Reproduction 1. Use caller-supplied upstream WABT 1.0.41 and 1.0.42 Linux x64 release archives; verify their published SHA-256 files. Neither is installed globally. 2. Set `REA_WABT_BIN_DIRECTORY` to the 1.0.41 `bin` directory in REA's launch environment. 3. Call actual MCP `inspect_wasm_artifact` with the absolute path to an 8-byte valid empty WASM and `detail: "summary"`. 4. Compare the returned error against the configured executable's `--version`. Actual version output is absent from the error. Real 1.0.42 succeeds on the same bytes. Also reproduced missing path, regular-file-as-directory and owned non-executable-tool inputs through public MCP. A real Codex CLI baseline recovered the version mismatch after additional shell inspection and retargeting only its authorized fixture symlink; **not claiming the model failed or a measured improvement yet**. ## Expected behavior Preserve already-observed stdout/stderr and exact probed command as producer-owned diagnostics. Give compact, condition-specific recovery: expected release and three required tools, correct directory selection/access, and changing `REA_WABT_BIN_DIRECTORY` in the shell or MCP server launch environment with restart when that environment changes. No implicit install, unknown flag, target mutation, version bypass or unchanged retry. ## Impact and scope Lost observations require avoidable diagnostics and weaken agent recovery guidance. Runtime reproduction is established; broader model success-rate impact is unknown. Restrict the fix to existing WABT configuration errors and shared CLI/MCP projection; preserve cleanup ownership and all prior failure classes. ## Version / runtime / artifact / interface REA 6.7.0 at the revision above; Node 24.18.0, Debian 12 Linux x64; upstream WABT 1.0.41 and 1.0.42. Codex CLI 0.161.0, `gpt-6.1-sol`. Generated empty module (SHA-256 `93a44bbb96c751218e4c00d479e4c14358122a389acca16205b1e4d0dc5f9476`), never executed. MCP; earliest failure: setup/provider admission. ## Evidence / proposed validation Captured public MCP envelopes and upstream version commands establish the diagnostic loss. Proposed guards: version mismatch, nonempty stderr despite correct stdout, empty banner, command attribution, path/permission recovery, cleanup preservation; actual CLI/MCP parity and sequential Codex permitted-repair vs read-only-blocked trials. Performance comparisons will include whole-session tokens, elapsed/CPU and sampled process-family RSS; cold-cache costs not yet measured.
bsakaguchi 2026-10-31 00:41:14 +00:00
  • closed this issue
  • added the
    bug
    triage
    labels
Author
Owner

@XinwangTao commented on GitHub (Oct 21, 2026):

Agreed — collapsing distinct probe outcomes (version mismatch vs. empty banner vs. raw ENOENT/EACCES) into one generic "supply tools" instruction makes recovery guidance nearly useless: the agent can't tell whether to swap the version, fix the path, or repair access without extra shell archaeology. Keeping the captured stdout/stderr plus the exact probed command as producer-owned diagnostics is the right direction — it also makes the MCP vs CLI launch-environment mismatch visible instead of guessed. A compact per-failure-class hint (version mismatch → expected release + which three tools; empty banner → probe attribution; path/access → directory-vs-executable choice or permission repair) would let the model act on the first error rather than re-probing.

<!-- gh-comment-id:6307787394 --> @XinwangTao commented on GitHub (Oct 21, 2026): Agreed — collapsing distinct probe outcomes (version mismatch vs. empty banner vs. raw ENOENT/EACCES) into one generic "supply tools" instruction makes recovery guidance nearly useless: the agent can't tell whether to swap the version, fix the path, or repair access without extra shell archaeology. Keeping the captured stdout/stderr plus the exact probed command as producer-owned diagnostics is the right direction — it also makes the MCP vs CLI launch-environment mismatch visible instead of guessed. A compact per-failure-class hint (version mismatch → expected release + which three tools; empty banner → probe attribution; path/access → directory-vs-executable choice or permission repair) would let the model act on the first error rather than re-probing.
Author
Owner

@gensokyo-dev commented on GitHub (Oct 21, 2026):

Fixed and merged in #5768. Final tested head 30cdef683 passed 54 focused tests and the 51-case actual WABT CLI/MCP lane. Real Codex before/after tasks validated permitted directory, permission and version repairs in the same MCP session; read-only cases now name the exact configuration/restart boundary and observed version. The nonzero-probe review finding was fixed before merge with original cancellation/deadline/cleanup state preserved. The complete 28-session cross-provider audit, honest scope limits and measurements are recorded under #5598.

<!-- gh-comment-id:6308270292 --> @gensokyo-dev commented on GitHub (Oct 21, 2026): Fixed and merged in #5768. Final tested head 30cdef683 passed 54 focused tests and the 51-case actual WABT CLI/MCP lane. Real Codex before/after tasks validated permitted directory, permission and version repairs in the same MCP session; read-only cases now name the exact configuration/restart boundary and observed version. The nonzero-probe review finding was fixed before merge with original cancellation/deadline/cleanup state preserved. The complete 28-session cross-provider audit, honest scope limits and measurements are recorded under #5598.
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#3504
No description provided.