[GH-ISSUE #8435] [Bug] Crash prompt overlooks retained dossier handoff for call paths #6604

Open
opened 2026-11-01 21:12:37 +00:00 by bsakaguchi · 4 comments
Owner

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

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

The trace_crash MCP prompt tells agents to request analyze_function detail complete when build_call_path will consume the dossiers. That is no longer necessary for the common same-session workflow: the default summary identifies a retained complete parent which build_call_path accepts by exact retained Evidence reference. The prompt does not explain that handoff.

Reproduction

On REA main 6e9ee97a69cb16c7150d8b550e705cba055ee4f0, macOS arm64 and Ghidra 12.1.4/JDK 21, with a source-built static arm64 Mach-O and the default 1,024-element MCP input allowance:

  1. Read MCP prompt trace_crash using a synthetic crash description. Its instructions include “requesting detail complete when build_call_path will consume them”. guided_workflows rendering the same workflow returned the same instruction.
  2. Open the target with Ghidra; call analyze_function for _audit_dispatch and _audit_initial without detail. Use each returned normalized_result.parent_evidence_id in a retained-evidence reference in build_call_path.functions. The call succeeded, found the observed static path, and linked both source dossier IDs.
  3. As an input-size control, read those exact complete dossier records from get_evidence_bundle and send them inline in the same call. REA rejected the request before tool execution with resource_constraint and a 1,024-element limit. This control deliberately sends full records inline; the prompt does not explicitly require the agent to do so.

The target's SHA-256 was unchanged and it was not executed. The crash description was synthetic; no actual crash or autonomous agent behavior was observed. The calls used real REA stdio MCP and the TypeScript SDK.

Expected behavior

Recommend the existing default summary and exact parent_evidence_id retained-reference handoff for same-session paths. Keep detail complete available when a caller needs to carry a complete record inline, and clarify that a summary view itself is not a complete dossier. See the tool contract and Evidence reuse guidance.

Impact and scope

The prompt encourages transfer of full dossiers when it can offer the existing compact same-session route; sending multiple full dossiers back can exhaust the default input allowance for the observed fixture. The prompt does not require inline input and we did not measure actual agent selections or token consumption. One Ghidra/Mach-O workflow was tested; Kuna, CLI and other host/target combinations were not tested in this probe.

REA version

6e9ee97a69cb16c7150d8b550e705cba055ee4f0 (source, built runtime).

Runtime and platform

Node 24.22.1; macOS arm64; Ghidra 12.1.4/JDK 21; TypeScript MCP SDK over stdio with compact output schema.

Target and artifact context

Self-built arm64 Mach-O, SHA-256 f771508a5d2a8afee3419ad1a075c6f4ad499fbb91b2584f49c9c006fb908e05, analyzed statically.

Interface

MCP

Earliest failure stage

Transport or result projection

Relevant output or evidence

Live prompt and guided_workflows: requesting detail complete when build_call_path will consume them. The retained-reference request returned status: found and linked both parent IDs; the exact same parent records supplied inline returned resource_constraint with max_input_elements: 1024. Prompt source.

Analysis or suspected cause

The prompt appears to retain earlier advice from before retained dossier inputs were supported. This is a source-derived hypothesis; no commit-history cause is established. A regression could check the rendered MCP prompt and guided_workflows against the current same-session tool contract, while preserving full inline use for portable contexts.

Additional context

The original retained-reference limitation was fixed and validated in #8281. This report concerns stale agent guidance rather than a regression in build_call_path.

cc @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0

Originally created by @morluto on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8435 ### 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 The `trace_crash` MCP prompt tells agents to request `analyze_function` `detail complete` when `build_call_path` will consume the dossiers. That is no longer necessary for the common same-session workflow: the default summary identifies a retained complete parent which `build_call_path` accepts by exact retained Evidence reference. The prompt does not explain that handoff. ### Reproduction On REA main `6e9ee97a69cb16c7150d8b550e705cba055ee4f0`, macOS arm64 and Ghidra 12.1.4/JDK 21, with a source-built static arm64 Mach-O and the default 1,024-element MCP input allowance: 1. Read MCP prompt `trace_crash` using a synthetic crash description. Its instructions include “requesting detail complete when build_call_path will consume them”. `guided_workflows` rendering the same workflow returned the same instruction. 2. Open the target with Ghidra; call `analyze_function` for `_audit_dispatch` and `_audit_initial` without `detail`. Use each returned `normalized_result.parent_evidence_id` in a `retained-evidence` reference in `build_call_path.functions`. The call succeeded, found the observed static path, and linked both source dossier IDs. 3. As an input-size control, read those exact complete dossier records from `get_evidence_bundle` and send them inline in the same call. REA rejected the request before tool execution with `resource_constraint` and a 1,024-element limit. This control deliberately sends full records inline; the prompt does not explicitly require the agent to do so. The target's SHA-256 was unchanged and it was not executed. The crash description was synthetic; no actual crash or autonomous agent behavior was observed. The calls used real REA stdio MCP and the TypeScript SDK. ### Expected behavior Recommend the existing default summary and exact `parent_evidence_id` retained-reference handoff for same-session paths. Keep `detail complete` available when a caller needs to carry a complete record inline, and clarify that a summary view itself is not a complete dossier. See the [tool contract](https://github.com/morluto/rea/blob/6e9ee97a69cb16c7150d8b550e705cba055ee4f0/src/contracts/sessionToolContracts.ts#L139-L143) and [Evidence reuse guidance](https://github.com/morluto/rea/blob/6e9ee97a69cb16c7150d8b550e705cba055ee4f0/docs/mcp-contracts.md#L45-L57). ### Impact and scope The prompt encourages transfer of full dossiers when it can offer the existing compact same-session route; sending multiple full dossiers back can exhaust the default input allowance for the observed fixture. The prompt does not require inline input and we did not measure actual agent selections or token consumption. One Ghidra/Mach-O workflow was tested; Kuna, CLI and other host/target combinations were not tested in this probe. ### REA version `6e9ee97a69cb16c7150d8b550e705cba055ee4f0` (source, built runtime). ### Runtime and platform Node 24.22.1; macOS arm64; Ghidra 12.1.4/JDK 21; TypeScript MCP SDK over stdio with compact output schema. ### Target and artifact context Self-built arm64 Mach-O, SHA-256 `f771508a5d2a8afee3419ad1a075c6f4ad499fbb91b2584f49c9c006fb908e05`, analyzed statically. ### Interface MCP ### Earliest failure stage Transport or result projection ### Relevant output or evidence Live prompt and `guided_workflows`: `requesting detail complete when build_call_path will consume them`. The retained-reference request returned `status: found` and linked both parent IDs; the exact same parent records supplied inline returned `resource_constraint` with `max_input_elements: 1024`. [Prompt source](https://github.com/morluto/rea/blob/6e9ee97a69cb16c7150d8b550e705cba055ee4f0/src/contracts/promptContracts.ts#L340-L355). ### Analysis or suspected cause The prompt appears to retain earlier advice from before retained dossier inputs were supported. This is a source-derived hypothesis; no commit-history cause is established. A regression could check the rendered MCP prompt and `guided_workflows` against the current same-session tool contract, while preserving full inline use for portable contexts. ### Additional context The original retained-reference limitation was fixed and validated in #8281. This report concerns stale agent guidance rather than a regression in `build_call_path`. cc @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
Author
Owner

@morluto commented on GitHub (Nov 1, 2026):

Real Kuna control on main 6e9ee97a, macOS arm64 and verified Kuna 1.986, using stdio MCP and the default 1,024-element input allowance: the same trace_crash prompt and guided_workflows render include the complete-detail instruction. On a separate source-owned arm64 Mach-O, default analyze_function summaries for _evaluate and _adjust supplied parent IDs; build_call_path with those two retained references found the direct static path and cited both dossier sources. I retrieved those exact parents from the bundle and repeated the request inline: it also succeeded and returned exactly the same complete Evidence object.

This positive control matters: the observed Ghidra size refusal is fixture/result dependent, not a blanket failure of complete dossiers. The Kuna run used an existing owned export cache, so it does not establish cold-export timing. The fixture SHA-256 ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d stayed unchanged and it was not executed. No token or autonomous-agent behavior was measured.

<!-- gh-comment-id:6553152730 --> @morluto commented on GitHub (Nov 1, 2026): Real Kuna control on main `6e9ee97a`, macOS arm64 and verified Kuna 1.986, using stdio MCP and the default 1,024-element input allowance: the same `trace_crash` prompt and `guided_workflows` render include the complete-detail instruction. On a separate source-owned arm64 Mach-O, default `analyze_function` summaries for `_evaluate` and `_adjust` supplied parent IDs; `build_call_path` with those two retained references found the direct static path and cited both dossier sources. I retrieved those exact parents from the bundle and repeated the request inline: it also succeeded and returned exactly the same complete Evidence object. This positive control matters: the observed Ghidra size refusal is fixture/result dependent, not a blanket failure of complete dossiers. The Kuna run used an existing owned export cache, so it does not establish cold-export timing. The fixture SHA-256 `ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d` stayed unchanged and it was not executed. No token or autonomous-agent behavior was measured.
Author
Owner

@morluto commented on GitHub (Nov 1, 2026):

Provenance control for the Ghidra fixture: in the same session, the summary's retained parent and a later analyze_function(detail: "complete") result had different Evidence IDs. Comparing their complete records found identical fields except that the latter included one additional limitation: Loaded from a local REA analysis snapshot; this call did not re-run the provider. A subsequent identical complete-detail call returned the same complete Evidence as that replay. The target hash was unchanged and it was not executed.

This is why the size comparison in the original report uses the exact records identified by the summary parents, rather than assuming a second analysis request has the same provenance. It does not establish a detail-option identity defect. One function and provider/host were tested.

<!-- gh-comment-id:6553163824 --> @morluto commented on GitHub (Nov 1, 2026): Provenance control for the Ghidra fixture: in the same session, the summary's retained parent and a later `analyze_function(detail: "complete")` result had different Evidence IDs. Comparing their complete records found identical fields except that the latter included one additional limitation: `Loaded from a local REA analysis snapshot; this call did not re-run the provider.` A subsequent identical complete-detail call returned the same complete Evidence as that replay. The target hash was unchanged and it was not executed. This is why the size comparison in the original report uses the **exact records identified by the summary parents**, rather than assuming a second analysis request has the same provenance. It does not establish a detail-option identity defect. One function and provider/host were tested.
Author
Owner

@morluto commented on GitHub (Nov 1, 2026):

Completed-task comparison on the real Ghidra fixture

I ran two separate fresh stdio MCP servers on main 6e9ee97a, Ghidra 12.1.4/JDK 21, Node 24.22.1 and macOS arm64. Each read the same trace_crash prompt and compact-output full tool catalog, opened the same owned Mach-O, analyzed _audit_dispatch and _audit_initial, supplied both complete-parent IDs as retained references to build_call_path, and closed the session. One used default summaries; the other requested complete dossiers. Both completed with exactly the same final path Evidence, including source links and ID. The target was unchanged and not executed.

Estimated o200k_base tokens for the captured JSON prompt/catalog plus all tool requests and responses, serialized compactly (one run each):

Delivery Full SDK response objects Structured tool results only
Summary 137,660 131,649
Complete 145,422 135,486

Both totals include the same 125,362-token catalog. Full SDK responses contain both text and structured representations, so actual model cost depends on the host; the structured-only projection is another estimate, not a measured model transcript. Neither includes host/system instructions or protocol initialization framing. One fixture and one choice of tools are not an autonomous-agent evaluation.

Each run used a fresh provider session; OS/file caches were not controlled and a warm-session comparison was not measured. Elapsed times were 6.366 s and 5.337 s respectively; sampled process-family CPU lower bounds were 8.85 and 8.36 s, and peak summed sampled RSS was 1,062,976 and 1,097,472 KiB. The 100 ms sampler can miss short-lived processes and peaks, and summed RSS can double-count shared memory. Single runs do not support a latency, CPU or memory improvement claim. This control shows a real token/context difference while preserving the same final Evidence; it does not make complete delivery incorrect when the caller needs it.

<!-- gh-comment-id:6553182773 --> @morluto commented on GitHub (Nov 1, 2026): ### Completed-task comparison on the real Ghidra fixture I ran two separate fresh stdio MCP servers on main `6e9ee97a`, Ghidra 12.1.4/JDK 21, Node 24.22.1 and macOS arm64. Each read the same `trace_crash` prompt and compact-output full tool catalog, opened the same owned Mach-O, analyzed `_audit_dispatch` and `_audit_initial`, supplied both complete-parent IDs as retained references to `build_call_path`, and closed the session. One used default summaries; the other requested complete dossiers. Both completed with exactly the same final path Evidence, including source links and ID. The target was unchanged and not executed. Estimated `o200k_base` tokens for the captured JSON prompt/catalog plus all tool requests and responses, serialized compactly (one run each): | Delivery | Full SDK response objects | Structured tool results only | | --- | ---: | ---: | | Summary | 137,660 | 131,649 | | Complete | 145,422 | 135,486 | Both totals include the same 125,362-token catalog. Full SDK responses contain both text and structured representations, so actual model cost depends on the host; the structured-only projection is another estimate, not a measured model transcript. Neither includes host/system instructions or protocol initialization framing. One fixture and one choice of tools are not an autonomous-agent evaluation. Each run used a fresh provider session; OS/file caches were not controlled and a warm-session comparison was not measured. Elapsed times were 6.366 s and 5.337 s respectively; sampled process-family CPU lower bounds were 8.85 and 8.36 s, and peak summed sampled RSS was 1,062,976 and 1,097,472 KiB. The 100 ms sampler can miss short-lived processes and peaks, and summed RSS can double-count shared memory. Single runs do not support a latency, CPU or memory improvement claim. This control shows a real token/context difference while preserving the same final Evidence; it does not make complete delivery incorrect when the caller needs it.
Author
Owner

@morluto commented on GitHub (Nov 1, 2026):

Draft #8437 updates the shared crash prompt to show the same-session summary-parent reference shape and keeps complete inline delivery for portability. The public MCP prompt / guided_workflows regression failed on the original wording and passed in both schema profiles after the change; real Ghidra and Kuna controls are recorded in the PR.

<!-- gh-comment-id:6553212221 --> @morluto commented on GitHub (Nov 1, 2026): Draft #8437 updates the shared crash prompt to show the same-session summary-parent reference shape and keeps complete inline delivery for portability. The public MCP prompt / `guided_workflows` regression failed on the original wording and passed in both schema profiles after the change; real Ghidra and Kuna controls are recorded in the PR.
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#6604
No description provided.