[GH-ISSUE #3067] [Bug] binary_session reports configured ADB tools as provider_missing #1072

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

Originally created by @coygeek on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3067

Before submitting

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

Area

Provider or capability discovery

Observed behavior

binary_session reports all 24 ADB tools as unavailable with reason: "provider_missing" and a generic remediation, even when REA_ADB_PATH points at a working adb. In the same MCP session, inspect_adb_client succeeds. Agents that choose operations from tool_availability, as the MCP contract instructs, are told the ADB tools cannot run while ADB is configured. Android/JADX entries already follow their engine's readiness (fixed in #1124).

On 6.4.0, binary_session listed all 24 adb-provider tools, including inspect_adb_client, as available: false, reason: "provider_missing", remediation "Install or configure a provider that declares this operation.". inspect_adb_client in the same server then succeeded and reported adb 37.0.1-15733141 with path_source: "environment".

The main build gave the same per-tool facts in grouped form: every adb-provider group had available: false, reason: "provider_missing", and the same generic remediation, and inspect_adb_client again succeeded. The entries do not change with configuration: in runs on both builds with REA_ADB_PATH unset (and adb not on PATH), the 24 ADB entries were identical, while inspect_adb_client then failed with capability_unavailable. Only inspect_adb_client was called; the device-bound ADB tools were not run, because no device was attached.

Reproduction

  1. Unpack platform-tools anywhere, then start the server with ADB configured: REA_ADB_PATH=/abs/platform-tools/adb npx -y rea-agents@6.4.0 mcp. No device or open target is needed. For the main build, start node scripts/rea.mjs mcp from the compiled checkout (npm ci --ignore-scripts, npm run compile) with the same environment instead.
  2. From a stdio MCP client, send these newline-delimited messages in order, waiting for the initialize response before sending the rest.
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"availability-probe","version":"1.0.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"binary_session","arguments":{}}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"inspect_adb_client","arguments":{}}}
  1. In response 2, read result.structuredContent.result.tool_availability and select the entries whose surface is adb-provider. On main, expand tool_availability.groups into per-tool entries first.
  2. Compare those entries with response 3.

Expected behavior

docs/mcp-contracts.md (lines 114-119 at the 6.4.0 tag; lines 337-347 on main in grouped form) says: "Call binary_session with {} and read result.tool_availability to choose a callable operation for the current target, provider, host, and negotiated client capabilities", with each tool's availability, reason, and remediation. The ADB tools need no open_binary target. With adb configured and callable, the readiness tool inspect_adb_client should be reported available, as the android-provider tools are when the JADX JAR and JDK are ready. No ADB entry should tell the caller to install or configure a provider that is already configured; tools that also need a connected device may still be unavailable, but for a reason that matches the actual missing prerequisite. When adb is missing or unusable, the entries should say so with an ADB remediation.

Restoration check: in the same session, the per-tool facts (expanded from groups where applicable) report inspect_adb_client available, and no adb-provider entry reports provider_missing with the generic remediation; each remaining unavailable ADB entry names its actual missing prerequisite. With REA_ADB_PATH set to a nonexistent file, the ADB entries are unavailable with an ADB remediation. Control: the android-provider entries still track the JADX JAR and JDK as they do today.

Impact and scope

Affected: the 24 adb-provider entries in binary_session.tool_availability, on both builds, whatever the ADB configuration. Agents that follow the documented availability contract are told that all ADB tools are unavailable while ADB is configured, and inspect_adb_client was observed succeeding in the same session, so agents may skip device work.

Not affected: the ADB tools themselves run when called; no data is lost.

Workaround: call inspect_adb_client directly to see the real ADB state (observed on both builds).

REA version

6.4.0 (npm, tag rea-agents-6.4.0 at a56f7bb668); also reproduced from source at main e049ef70f7

Runtime and platform

Node 26.10.0; macOS 27.0 arm64; Android SDK Platform-Tools r37.0.1 (adb 37.0.1-15733141)

Target and artifact context

No target, device, or emulator; target-free binary_session call

Interface

MCP

Earliest failure stage

Setup or provider admission

Relevant output or evidence

binary_session (6.4.0), each of the 24 adb-provider entries:
{"available":false,"reason":"provider_missing","remediation":"Install or configure a provider that declares this operation."}

inspect_adb_client (same server), selected fields:
isError=false provider {"id":"adb","name":"Android Debug Bridge","version":"37.0.1-15733141"} normalized_result.client.path_source "environment" normalized_result.contacted_adb_server false

Analysis or suspected cause

Source-derived, consistent with the runs on both builds: AvailabilityPolicy in src/application/CapabilityInventory.ts (lines 34-51 at the tag, 45-65 on main) has no ADB field, and the per-kind checks have no adb-provider branch, so these tools reach the descriptor fallback in providerAvailability (lines 491-518 at the tag, 604-631 on main), which returns provider_missing with the generic remediation.

Additional context

The same binary_session result also misreports the Apktool and JEB tools; each is reported separately because each engine has its own configuration, readiness tool, and restoration signal. Related but separate: #3008 asks rea doctor to report these providers; this report concerns binary_session.tool_availability.

Originally created by @coygeek on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3067 ### 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 Provider or capability discovery ### Observed behavior `binary_session` reports all 24 ADB tools as unavailable with `reason: "provider_missing"` and a generic remediation, even when `REA_ADB_PATH` points at a working `adb`. In the same MCP session, `inspect_adb_client` succeeds. Agents that choose operations from `tool_availability`, as the MCP contract instructs, are told the ADB tools cannot run while ADB is configured. Android/JADX entries already follow their engine's readiness (fixed in #1124). On 6.4.0, `binary_session` listed all 24 `adb-provider` tools, including `inspect_adb_client`, as `available: false`, `reason: "provider_missing"`, remediation "Install or configure a provider that declares this operation.". `inspect_adb_client` in the same server then succeeded and reported adb `37.0.1-15733141` with `path_source: "environment"`. The `main` build gave the same per-tool facts in grouped form: every `adb-provider` group had `available: false`, `reason: "provider_missing"`, and the same generic remediation, and `inspect_adb_client` again succeeded. The entries do not change with configuration: in runs on both builds with `REA_ADB_PATH` unset (and `adb` not on `PATH`), the 24 ADB entries were identical, while `inspect_adb_client` then failed with `capability_unavailable`. Only `inspect_adb_client` was called; the device-bound ADB tools were not run, because no device was attached. ### Reproduction 1. Unpack platform-tools anywhere, then start the server with ADB configured: `REA_ADB_PATH=/abs/platform-tools/adb npx -y rea-agents@6.4.0 mcp`. No device or open target is needed. For the `main` build, start `node scripts/rea.mjs mcp` from the compiled checkout (`npm ci --ignore-scripts`, `npm run compile`) with the same environment instead. 2. From a stdio MCP client, send these newline-delimited messages in order, waiting for the `initialize` response before sending the rest. ```json {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"availability-probe","version":"1.0.0"}}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"binary_session","arguments":{}}} {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"inspect_adb_client","arguments":{}}} ``` 3. In response 2, read `result.structuredContent.result.tool_availability` and select the entries whose surface is `adb-provider`. On `main`, expand `tool_availability.groups` into per-tool entries first. 4. Compare those entries with response 3. ### Expected behavior `docs/mcp-contracts.md` (lines 114-119 at the 6.4.0 tag; lines 337-347 on `main` in grouped form) says: "Call `binary_session` with `{}` and read `result.tool_availability` to choose a callable operation for the current target, provider, host, and negotiated client capabilities", with each tool's availability, reason, and remediation. The ADB tools need no `open_binary` target. With `adb` configured and callable, the readiness tool `inspect_adb_client` should be reported available, as the `android-provider` tools are when the JADX JAR and JDK are ready. No ADB entry should tell the caller to install or configure a provider that is already configured; tools that also need a connected device may still be unavailable, but for a reason that matches the actual missing prerequisite. When `adb` is missing or unusable, the entries should say so with an ADB remediation. Restoration check: in the same session, the per-tool facts (expanded from groups where applicable) report `inspect_adb_client` available, and no `adb-provider` entry reports `provider_missing` with the generic remediation; each remaining unavailable ADB entry names its actual missing prerequisite. With `REA_ADB_PATH` set to a nonexistent file, the ADB entries are unavailable with an ADB remediation. Control: the `android-provider` entries still track the JADX JAR and JDK as they do today. ### Impact and scope Affected: the 24 `adb-provider` entries in `binary_session.tool_availability`, on both builds, whatever the ADB configuration. Agents that follow the documented availability contract are told that all ADB tools are unavailable while ADB is configured, and `inspect_adb_client` was observed succeeding in the same session, so agents may skip device work. Not affected: the ADB tools themselves run when called; no data is lost. Workaround: call `inspect_adb_client` directly to see the real ADB state (observed on both builds). ### REA version 6.4.0 (npm, tag rea-agents-6.4.0 at a56f7bb668ab23fec8d33f7af353ac7ed2fe1895); also reproduced from source at main e049ef70f71aeb9965e9d75d4d4a84ea02eaee11 ### Runtime and platform Node 26.10.0; macOS 27.0 arm64; Android SDK Platform-Tools r37.0.1 (adb 37.0.1-15733141) ### Target and artifact context No target, device, or emulator; target-free `binary_session` call ### Interface MCP ### Earliest failure stage Setup or provider admission ### Relevant output or evidence ```text binary_session (6.4.0), each of the 24 adb-provider entries: {"available":false,"reason":"provider_missing","remediation":"Install or configure a provider that declares this operation."} inspect_adb_client (same server), selected fields: isError=false provider {"id":"adb","name":"Android Debug Bridge","version":"37.0.1-15733141"} normalized_result.client.path_source "environment" normalized_result.contacted_adb_server false ``` ### Analysis or suspected cause Source-derived, consistent with the runs on both builds: `AvailabilityPolicy` in `src/application/CapabilityInventory.ts` (lines 34-51 at the tag, 45-65 on `main`) has no ADB field, and the per-kind checks have no `adb-provider` branch, so these tools reach the descriptor fallback in `providerAvailability` (lines 491-518 at the tag, 604-631 on `main`), which returns `provider_missing` with the generic remediation. ### Additional context The same `binary_session` result also misreports the Apktool and JEB tools; each is reported separately because each engine has its own configuration, readiness tool, and restoration signal. Related but separate: #3008 asks `rea doctor` to report these providers; this report concerns `binary_session.tool_availability`.
bsakaguchi 2026-10-15 18:30:50 +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#1072
No description provided.