[GH-ISSUE #8825] [Design] Bound inspection of retained command output #7767

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

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

Before submitting

  • I searched the open and closed issues and pull requests for a related discussion.
  • I understand the contribution scope must be reviewed before integration; open questions are welcome here.
  • This discussion does not include credentials, private samples, or sensitive target data.

Decision needed

Should REA offer a bounded way to inspect retained opaque command output, so an agent can answer a narrow question without transferring the entire stdout? How should it preserve command status, output completeness, source identity, and exact text?

Context and evidence

On macOS arm64, Node 24.22.1, and PR #8824 head 2f8624a23, I supplied GNU objdump 2.47 from a temporary Homebrew bottle and called public MCP inspect_with_objdump({operation: "architectures"}). The command succeeded and returned 423,472 bytes of stdout. Complete structured Evidence serialized to 863,830 UTF-8 JSON bytes; the documented detail: "summary" returned the entire stdout once and serialized to 433,643 bytes. Compact and full MCP profiles produced the same respective sizes. The command was target-free.

This matches the current contract: summary removes the raw mirror but retains the complete command observation. These are serialized byte counts, not model-token measurements, complete task costs, latency measurements, or proof of a transport failure. I did not run an autonomous-agent trial.

Expected interaction with targets

Read a retained command observation already produced by an explicitly requested, caller-supplied static tool. The architecture example launches objdump without a target; artifact inspections may read a caller-selected file. No target execution or mutation is proposed.

Boundary details (optional)

Preserve exact stdout/stderr and their ordering/encoding qualifications in retained Evidence; distinguish output truncation and unknown command completion from a deliberately bounded view. Keep exit status, signal, provider command identity, and parent Evidence reference. A search result or empty page must not imply that a truncated producer output contained no other matches.

Options and tradeoffs

Compare a small status-and-count view plus explicitly selected text ranges, a bounded literal search over retained text, and a targeted capability query. Keep complete output accessible. Avoid assuming every selected objdump -i is GNU or parsing arbitrary tool output into invented architecture facts. Consider whether a general command-observation view can serve other producers without making agent selection harder. Existing #5584 delivered the current non-duplicated summary; it does not claim this smaller view.

Verification available so far

I have observed results.

Success criteria and open questions

Exercise real successful and failing commands, partial/truncated output, empty stdout/stderr, Unicode boundaries, pages and filters, both MCP profiles, offline Evidence export/import, and caller-selected executables. Measure representative complete agent tasks, including schemas, requests, response tokens, elapsed time and memory, before claiming a performance improvement. Determine whether the extra calls are worthwhile for ordinary-sized outputs.

References

Related #5584 and #8823 / #8824 (unverified objdump implementation identity). cc @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0

Originally created by @morluto on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8825 ### Before submitting - [x] I searched the open and closed issues and pull requests for a related discussion. - [x] I understand the contribution scope must be reviewed before integration; open questions are welcome here. - [x] This discussion does not include credentials, private samples, or sensitive target data. ### Decision needed Should REA offer a bounded way to inspect retained opaque command output, so an agent can answer a narrow question without transferring the entire stdout? How should it preserve command status, output completeness, source identity, and exact text? ### Context and evidence On macOS arm64, Node 24.22.1, and PR #8824 head `2f8624a23`, I supplied GNU objdump 2.47 from a temporary Homebrew bottle and called public MCP `inspect_with_objdump({operation: "architectures"})`. The command succeeded and returned 423,472 bytes of stdout. Complete structured Evidence serialized to 863,830 UTF-8 JSON bytes; the documented `detail: "summary"` returned the entire stdout once and serialized to 433,643 bytes. Compact and full MCP profiles produced the same respective sizes. The command was target-free. This matches the current contract: summary removes the raw mirror but retains the complete command observation. These are serialized byte counts, not model-token measurements, complete task costs, latency measurements, or proof of a transport failure. I did not run an autonomous-agent trial. ### Expected interaction with targets Read a retained command observation already produced by an explicitly requested, caller-supplied static tool. The architecture example launches objdump without a target; artifact inspections may read a caller-selected file. No target execution or mutation is proposed. ### Boundary details (optional) Preserve exact stdout/stderr and their ordering/encoding qualifications in retained Evidence; distinguish output truncation and unknown command completion from a deliberately bounded view. Keep exit status, signal, provider command identity, and parent Evidence reference. A search result or empty page must not imply that a truncated producer output contained no other matches. ### Options and tradeoffs Compare a small status-and-count view plus explicitly selected text ranges, a bounded literal search over retained text, and a targeted capability query. Keep complete output accessible. Avoid assuming every selected `objdump -i` is GNU or parsing arbitrary tool output into invented architecture facts. Consider whether a general command-observation view can serve other producers without making agent selection harder. Existing #5584 delivered the current non-duplicated summary; it does not claim this smaller view. ### Verification available so far I have observed results. ### Success criteria and open questions Exercise real successful and failing commands, partial/truncated output, empty stdout/stderr, Unicode boundaries, pages and filters, both MCP profiles, offline Evidence export/import, and caller-selected executables. Measure representative complete agent tasks, including schemas, requests, response tokens, elapsed time and memory, before claiming a performance improvement. Determine whether the extra calls are worthwhile for ordinary-sized outputs. ### References Related #5584 and #8823 / #8824 (unverified objdump implementation identity). cc @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
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#7767
No description provided.