[GH-ISSUE #5584] [Feature] Compact command replies with retained complete GDB/objdump Evidence #3391

Closed
opened 2026-10-31 00:39:51 +00:00 by bsakaguchi · 1 comment
Owner

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

Before submitting

  • I searched open/closed issues and PRs for related work.
  • I reviewed the contribution scope; this proposal changes delivery of existing observations.
  • No credentials, private samples or sensitive target data are included.

Area

MCP or agent integration

Current limitation

A selected native-function disassembly carries repeated output inside complete command Evidence. There is no opt-in summary for gdb_console / inspect_with_objdump analogous to existing retained summaries.

Observed on cf5194f68 plus Go PR head 99003cf32; the relevant GDB/reverse/process code is byte-identical on current main c2858d2aa. GNU GDB 13.1 and objdump 2.40 read the installed Bash ELF (SHA-256 55b89ab22bee4792a210f493a53fb066accd5d30b69837c28d98be5ff863efcf). No inferior was executed.

Selected Bash function Native instructions / bytes Single complete GDB Evidence Console field
execute_command 66 / 239 25,383 UTF-8 bytes 5,613 UTF-16 units
execute_command_internal 3,365 / 15,428 1,304,436 UTF-8 bytes 303,926 UTF-16 units

The console field contains producer MI stream-line text, including its quoting/escapes; it must not be silently reinterpreted as decoded console text. raw_result mirrors normalized_result, whose records also repeat the named stream content.

Use cases

Read architecture and the complete byte-annotated body of one selected function, retain complete original Evidence, and close the owned debugger. Independent ELF symbol/section mapping verifies every returned instruction byte and complete function coverage. Exported parents remain exact.

Actual Codex 0.163 with a deterministic local SSE backend: default output budget truncates the small function reply into invalid JSON. With explicit per-tool budgets, completed small/large tasks use 9/10 model requests; the large task includes one actual client compaction request, answered by an explicitly deterministic observed-ID/retained-body checkpoint. Whole captured-request JSON cl100k_base proxies are 604,811 / 1,268,931 tokens. Wall 7.272 / 9.692 s, CPU 6.526 / 8.859 s, kernel process-family peak 786 / 822 MiB. One CPU, bounded memory, verified cleanup and zero observed OOM events. These are baseline measurements, not claimed gains or real model usage/quality/billing; OS caches were unflushed. The earlier fixture failure on unhandled compaction is preserved separately.

Desired outcome and success criteria

Offer opt-in command summaries that retain the unchanged complete parent and return the useful original streams, correlated completion result and required status/identity/coverage. Preserve producer strings, partial/unknown flags, source links and caller-selected commands. Default complete delivery remains compatible. Reuse the shared retained-summary/application/domain implementation through CLI/MCP and offline Evidence-file queries.

Compare equivalent completed real CLI/SDK/client tasks, including catalog/schema overhead, extra calls/compaction, elapsed/CPU time and family memory. Verify native bytes and exact exported parents, small/large cases, failed/partial captures, unavailable retention and closed-session querying. A smaller reply alone is not a token or speed claim.

Expected interaction with targets

Read existing files or captured data; launch existing provider processes; write only a caller-selected new CLI Evidence bundle. Existing unrestricted GDB command authority and its declared effects remain authoritative; summary delivery adds no engine command, target control or lifecycle authority. Qualification uses static file loading/disassembly.

Verification available so far

I have observed results.

Alternatives considered

  • Existing objdump symbol selection (#5171) already avoids unrelated native disassembly; the measured task uses it.
  • get_evidence_bundle filters select observations, while summary mode reports metadata rather than the requested command output.
  • #1960 proposes one authoritative output representation within broader breaking lifecycle work. This proposal preserves default complete parents and does not depend on those unmerged changes. #1961 and other GDB lifecycle/TTY proposals are separate work.

Possible direction

Reuse existing detail: summary and inspect_analysis_view summary dispatch, with schemas from the current command-fact owners. Project existing fields; do not add an MI decoder or a live-state cache. Keep complete raw records reachable. Confirm measured benefit before integration.

References

Current typed command contracts and retained-summary implementation; #5171, #1960, #1961. Reproducible scripts and bounded receipts will accompany a qualified implementation PR. Rizin's configured default command returns ENOENT; ADB's default executable is missing; Cutter has no configured/default bridge in this environment. Those providers have no runtime performance claim here.

Originally created by @gensokyo-dev on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5584 ### Before submitting - [x] I searched open/closed issues and PRs for related work. - [x] I reviewed the contribution scope; this proposal changes delivery of existing observations. - [x] No credentials, private samples or sensitive target data are included. ### Area MCP or agent integration ### Current limitation A selected native-function disassembly carries repeated output inside complete command Evidence. There is no opt-in summary for `gdb_console` / `inspect_with_objdump` analogous to existing retained summaries. Observed on `cf5194f68` plus Go PR head `99003cf32`; the relevant GDB/reverse/process code is byte-identical on current main `c2858d2aa`. GNU GDB 13.1 and objdump 2.40 read the installed Bash ELF (SHA-256 `55b89ab22bee4792a210f493a53fb066accd5d30b69837c28d98be5ff863efcf`). No inferior was executed. | Selected Bash function | Native instructions / bytes | Single complete GDB Evidence | Console field | | --- | ---: | ---: | ---: | | `execute_command` | 66 / 239 | 25,383 UTF-8 bytes | 5,613 UTF-16 units | | `execute_command_internal` | 3,365 / 15,428 | 1,304,436 UTF-8 bytes | 303,926 UTF-16 units | The console field contains producer MI stream-line text, including its quoting/escapes; it must not be silently reinterpreted as decoded console text. `raw_result` mirrors `normalized_result`, whose `records` also repeat the named stream content. ### Use cases Read architecture and the complete byte-annotated body of one selected function, retain complete original Evidence, and close the owned debugger. Independent ELF symbol/section mapping verifies every returned instruction byte and complete function coverage. Exported parents remain exact. Actual Codex 0.163 with a deterministic local SSE backend: default output budget truncates the small function reply into invalid JSON. With explicit per-tool budgets, completed small/large tasks use 9/10 model requests; the large task includes one actual client compaction request, answered by an explicitly deterministic observed-ID/retained-body checkpoint. Whole captured-request JSON `cl100k_base` proxies are 604,811 / 1,268,931 tokens. Wall 7.272 / 9.692 s, CPU 6.526 / 8.859 s, kernel process-family peak 786 / 822 MiB. One CPU, bounded memory, verified cleanup and zero observed OOM events. These are baseline measurements, not claimed gains or real model usage/quality/billing; OS caches were unflushed. The earlier fixture failure on unhandled compaction is preserved separately. ### Desired outcome and success criteria Offer opt-in command summaries that retain the unchanged complete parent and return the useful original streams, correlated completion result and required status/identity/coverage. Preserve producer strings, partial/unknown flags, source links and caller-selected commands. Default complete delivery remains compatible. Reuse the shared retained-summary/application/domain implementation through CLI/MCP and offline Evidence-file queries. Compare equivalent completed real CLI/SDK/client tasks, including catalog/schema overhead, extra calls/compaction, elapsed/CPU time and family memory. Verify native bytes and exact exported parents, small/large cases, failed/partial captures, unavailable retention and closed-session querying. A smaller reply alone is not a token or speed claim. ### Expected interaction with targets Read existing files or captured data; launch existing provider processes; write only a caller-selected new CLI Evidence bundle. Existing unrestricted GDB command authority and its declared effects remain authoritative; summary delivery adds no engine command, target control or lifecycle authority. Qualification uses static file loading/disassembly. ### Verification available so far I have observed results. ### Alternatives considered - Existing objdump symbol selection (#5171) already avoids unrelated native disassembly; the measured task uses it. - `get_evidence_bundle` filters select observations, while summary mode reports metadata rather than the requested command output. - #1960 proposes one authoritative output representation within broader breaking lifecycle work. This proposal preserves default complete parents and does not depend on those unmerged changes. #1961 and other GDB lifecycle/TTY proposals are separate work. ### Possible direction Reuse existing `detail: summary` and `inspect_analysis_view` summary dispatch, with schemas from the current command-fact owners. Project existing fields; do not add an MI decoder or a live-state cache. Keep complete raw records reachable. Confirm measured benefit before integration. ### References Current typed command contracts and retained-summary implementation; #5171, #1960, #1961. Reproducible scripts and bounded receipts will accompany a qualified implementation PR. Rizin's configured default command returns ENOENT; ADB's default executable is missing; Cutter has no configured/default bridge in this environment. Those providers have no runtime performance claim here.
bsakaguchi 2026-10-31 00:39:51 +00:00
Author
Owner

@matbrgz commented on GitHub (Oct 20, 2026):

Cross-referencing with canonical proposal #5499 ([Feature] Query retained Go build metadata without full raw replies) and pull requests #5614, #5660, and #5661. All represent the unified provider capability pattern of delivering compact summaries (detail: summary | complete) with retained underlying Evidence to prevent tool response budget exhaustion. Cataloged under Cluster BW in consolidation tracker #4330.

<!-- gh-comment-id:6299132307 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical proposal #5499 (`[Feature] Query retained Go build metadata without full raw replies`) and pull requests #5614, #5660, and #5661. All represent the unified provider capability pattern of delivering compact summaries (`detail: summary | complete`) with retained underlying Evidence to prevent tool response budget exhaustion. Cataloged under Cluster BW in consolidation tracker #4330.
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#3391
No description provided.