[GH-ISSUE #7109] [Bug] binary_session {} returns ~66 KB (~19K tokens) with no target open; 21% larger than 6.7.0 #4274

Closed
opened 2026-10-31 00:48:23 +00:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @kaoru0822-kitauji on GitHub.

Before submitting

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

Area

MCP or agent integration

Observed behavior

binary_session called with {} and no target open returns 66,279 characters of text content (about 19K tokens, estimated at 3.5 bytes per token), plus an identical copy in structuredContent. In 6.7.0 the same call returns 54,622 characters, so 6.8.0 is +21% larger. I found no changelog entry for this growth.

Breakdown of result in 6.8.0, JSON characters per key, with 6.7.0 for comparison:

key 6.7.0 6.8.0
analysis_provider_candidates 25,485 35,794
tool_availability 24,239 25,587
capabilities 3,180 3,180
server_identity 1,334 1,334
everything else < 200 < 200

Most of analysis_provider_candidates is the full per-provider rejection diagnostics for unconfigured providers: every Ghidra check, Java fields, IDA, JADX and Kuna details, and each provider's nested capability list. That is the same information rea doctor reports. With a target open (/System/Applications/Calculator.app), the response is 143,451 bytes in total.

The bundled skill (v49) sends agents to binary_session {} when a tool is unadvertised and during connection recovery (SKILL.md, references/native-and-artifacts.md, references/connection-and-recovery.md). So a routine status check costs about 19K tokens on a machine with no deep-analysis provider configured.

Reproduction

  1. npx -y rea-agents@6.8.0 mcp over stdio, with no provider environment variables set.
  2. initialize, then tools/call binary_session with {}.
  3. Measure result.content[0].text.length: 66,279 in 6.8.0, 54,622 in 6.7.0, on the same host.

Expected behavior

An idle session-status call should return a compact answer: open state, the selected provider, a per-provider availability status and code, and tool availability. Full diagnostics should be on demand or referenced through rea doctor, with the per-provider status and the remediation pointer kept inline.

Impact and scope

Every agent that follows the skill's recovery guidance pays this cost, and pays it again on each retry. Applies on any host where providers are unconfigured or unavailable. That's the default after rea setup on macOS without Hopper, Ghidra or IDA.

REA version

6.8.0 (compared with 6.7.0)

Runtime and platform

macOS 26.7.1 (25G241) arm64, Node.js 24.22.1

Target and artifact context

No target open; also measured with /System/Applications/Calculator.app open.

Interface

MCP

Earliest failure stage

Result delivery (response size)

Relevant output or evidence

The measurements above, taken with @modelcontextprotocol/client 2.3.1 over stdio. Token counts are estimates from byte length, not tokenizer counts.

Typed outcome or recovery expected

Not a failure. A size and efficiency regression on a successful call.

Analysis or suspected cause

NOT_ENOUGH_INFO. Not investigated in source. The growth is concentrated in analysis_provider_candidates (+10,309 characters).

Additional context

Related to the broader catalog-repetition design in #723. This is about one tool's result, not tools/list.

Originally created by @kaoru0822-kitauji on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7109 Originally assigned to: @kaoru0822-kitauji on GitHub. ### 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 MCP or agent integration ### Observed behavior `binary_session` called with `{}` and no target open returns 66,279 characters of text content (about 19K tokens, estimated at 3.5 bytes per token), plus an identical copy in `structuredContent`. In 6.7.0 the same call returns 54,622 characters, so 6.8.0 is +21% larger. I found no changelog entry for this growth. Breakdown of `result` in 6.8.0, JSON characters per key, with 6.7.0 for comparison: | key | 6.7.0 | 6.8.0 | |---|---|---| | `analysis_provider_candidates` | 25,485 | 35,794 | | `tool_availability` | 24,239 | 25,587 | | `capabilities` | 3,180 | 3,180 | | `server_identity` | 1,334 | 1,334 | | everything else | < 200 | < 200 | Most of `analysis_provider_candidates` is the full per-provider rejection diagnostics for unconfigured providers: every Ghidra check, Java fields, IDA, JADX and Kuna details, and each provider's nested capability list. That is the same information `rea doctor` reports. With a target open (`/System/Applications/Calculator.app`), the response is 143,451 bytes in total. The bundled skill (v49) sends agents to `binary_session {}` when a tool is unadvertised and during connection recovery (`SKILL.md`, `references/native-and-artifacts.md`, `references/connection-and-recovery.md`). So a routine status check costs about 19K tokens on a machine with no deep-analysis provider configured. ### Reproduction 1. `npx -y rea-agents@6.8.0 mcp` over stdio, with no provider environment variables set. 2. `initialize`, then `tools/call` `binary_session` with `{}`. 3. Measure `result.content[0].text.length`: 66,279 in 6.8.0, 54,622 in 6.7.0, on the same host. ### Expected behavior An idle session-status call should return a compact answer: open state, the selected provider, a per-provider availability status and code, and tool availability. Full diagnostics should be on demand or referenced through `rea doctor`, with the per-provider status and the remediation pointer kept inline. ### Impact and scope Every agent that follows the skill's recovery guidance pays this cost, and pays it again on each retry. Applies on any host where providers are unconfigured or unavailable. That's the default after `rea setup` on macOS without Hopper, Ghidra or IDA. ### REA version 6.8.0 (compared with 6.7.0) ### Runtime and platform macOS 26.7.1 (25G241) arm64, Node.js 24.22.1 ### Target and artifact context No target open; also measured with `/System/Applications/Calculator.app` open. ### Interface MCP ### Earliest failure stage Result delivery (response size) ### Relevant output or evidence The measurements above, taken with `@modelcontextprotocol/client` 2.3.1 over stdio. Token counts are estimates from byte length, not tokenizer counts. ### Typed outcome or recovery expected Not a failure. A size and efficiency regression on a successful call. ### Analysis or suspected cause NOT_ENOUGH_INFO. Not investigated in source. The growth is concentrated in `analysis_provider_candidates` (+10,309 characters). ### Additional context Related to the broader catalog-repetition design in #723. This is about one tool's result, not `tools/list`.
Author
Owner

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

这个成本很容易被低估:skill 恢复流程会让 agent 在每次未配置 provider 的重试时反复支付这 19K token,而结果里超过九成是 analysis_provider_candidates 的完整拒绝诊断——这些细节 rea doctor 已经能给出,塞进每次会话状态检查纯属重复。建议 idle 状态下只返回紧凑字段(open state、选定 provider、每个 provider 的 availability status/code、tool availability 摘要),把完整诊断移到按需参数(如 verbose 或显式 diagnostics: true),这样恢复流程的常规探测就从 19K token 降到几百 token。顺带建议在 MCP 文档里注明 binary_session 默认响应的 token 成本,避免 agent 在无 provider 主机上循环支付。

<!-- gh-comment-id:6396530723 --> @XinwangTao commented on GitHub (Oct 25, 2026): 这个成本很容易被低估:skill 恢复流程会让 agent 在每次未配置 provider 的重试时反复支付这 19K token,而结果里超过九成是 analysis_provider_candidates 的完整拒绝诊断——这些细节 rea doctor 已经能给出,塞进每次会话状态检查纯属重复。建议 idle 状态下只返回紧凑字段(open state、选定 provider、每个 provider 的 availability status/code、tool availability 摘要),把完整诊断移到按需参数(如 verbose 或显式 diagnostics: true),这样恢复流程的常规探测就从 19K token 降到几百 token。顺带建议在 MCP 文档里注明 binary_session 默认响应的 token 成本,避免 agent 在无 provider 主机上循环支付。
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#4274
No description provided.