[GH-ISSUE #5474] [Bug] trace_crash advertises its provider document selector as Hopper-specific #3330

Closed
opened 2026-10-31 00:39:13 +00:00 by bsakaguchi · 2 comments
Owner

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

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

On the production stdio MCP server, prompts/list describes the optional trace_crash.document argument as Open Hopper document to inspect. The documented workflow is provider-neutral. The analogous investigate_feature.document argument returns Active target's provider document name.

An independent verifier reproduced this catalog wording and confirmed that prompts/get accepts and renders a generic document value. No target or external provider was open.

Reproduction

From the source revision below with locked dependencies installed and npm run build:cached completed, run this verifier-executed script. It starts node scripts/rea.mjs mcp with isolated home and XDG directories, calls prompts/list, and makes a prompts/get control request. Both the original probe and the draft's embedded reproduction returned the output below.

node --input-type=module <<'NODE'
import { mkdtemp, mkdir } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { Client } from '@modelcontextprotocol/client';
import { StdioClientTransport } from '@modelcontextprotocol/client/stdio';
const root = await mkdtemp(join(tmpdir(), 'rea-prompt-check-'));
const env = { PATH: process.env.PATH, REA_LOG_LEVEL: 'silent' };
for (const key of ['HOME', 'TMPDIR', 'XDG_CONFIG_HOME', 'XDG_DATA_HOME', 'XDG_CACHE_HOME', 'XDG_STATE_HOME']) {
  env[key] = join(root, key.toLowerCase());
  await mkdir(env[key], { recursive: true });
}
const client = new Client({ name: 'prompt-contract-check', version: '1' });
const transport = new StdioClientTransport({
  command: process.execPath, args: ['scripts/rea.mjs', 'mcp'],
  cwd: process.cwd(), env, stderr: 'inherit',
});
try {
  await client.connect(transport);
  const { prompts } = await client.listPrompts();
  for (const name of ['trace_crash', 'investigate_feature']) {
    const argument = prompts.find(p => p.name === name).arguments.find(a => a.name === 'document');
    console.log(name + ': ' + argument.description);
  }
  const rendered = await client.getPrompt({
    name: 'trace_crash',
    arguments: { crash_signal: 'SIGSEGV', document: 'ProviderDocument' },
  });
  const text = rendered.messages.filter(m => m.content.type === 'text').map(m => m.content.text).join('\n');
  console.log('Selected document rendered: ' + text.includes('ProviderDocument'));
  console.log('Hopper in rendered prompt: ' + text.includes('Hopper'));
} finally {
  await client.close();
}
NODE

Expected behavior

prompts/list should describe trace_crash.document in provider-neutral terms while retaining the optional document selector. docs/mcp-prompts.md:3 describes the workflows as provider-neutral, and docs/mcp-prompts.md:102 identifies the current provider's list_documents result as the document completion source. Exact wording need not match another prompt.

Impact and scope

P3 wording defect in caller-visible prompt metadata. A generic document value was accepted and rendered, so this reproduction demonstrates no execution failure. The workaround is to use the current provider's document name despite the label. Real Ghidra/IDA sessions, provider document lookup, completion inventories, and analysis operations were not exercised.

REA version

6.7.0; source commit 074768901f3cdc8205b61773fb1faf6f6c7b3ca8.

Runtime and platform

Node v26.12.0; macOS, darwin arm64. No analysis provider was started.

Target and artifact context

Not applicable. Prompt discovery and rendering require no binary, target document, or analysis artifact. ProviderDocument is a synthetic context value.

Interface

MCP

Earliest failure stage

Transport or result projection

Relevant output or evidence

Observed through the production stdio MCP client in the reproduction:

trace_crash: Open Hopper document to inspect
investigate_feature: Active target's provider document name
Selected document rendered: true
Hopper in rendered prompt: false

The control request was prompts/get with {"name":"trace_crash","arguments":{"crash_signal":"SIGSEGV","document":"ProviderDocument"}}. It succeeded; the rendered prompt does not include per-argument descriptions. The verifier recorded exit 0 and empty server stderr.

Typed outcome or recovery expected

Return accurate provider-neutral metadata for trace_crash.document in prompts/list. Preserve optionality, successful rendering of the selected document context, and session-aware document completion. No new error type is needed for this wording defect.

Analysis or suspected cause

Source-derived reasoning: src/contracts/promptContracts.ts:276 supplies the Hopper-specific string, and src/server/registerPrompts.ts:101 propagates argument descriptions into the MCP schema. src/server/promptCompletion.ts:89 uses the shared document inventory lookup; this source inspection does not establish real-provider lookup behavior.

Additional context

Prepared with AI assistance and independently reproduced through production stdio MCP. A submission-time fetch found no later changes to the cited contract, registration, completion, or documentation files; the wording remains in upstream main at 21e0c580e7456af311ecfb12af8fc2531b429606.

Originally created by @coygeek on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5474 ### 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 On the production stdio MCP server, `prompts/list` describes the optional `trace_crash.document` argument as `Open Hopper document to inspect`. The documented workflow is provider-neutral. The analogous `investigate_feature.document` argument returns `Active target's provider document name`. An independent verifier reproduced this catalog wording and confirmed that `prompts/get` accepts and renders a generic document value. No target or external provider was open. ### Reproduction From the source revision below with locked dependencies installed and `npm run build:cached` completed, run this verifier-executed script. It starts `node scripts/rea.mjs mcp` with isolated home and XDG directories, calls `prompts/list`, and makes a `prompts/get` control request. Both the original probe and the draft's embedded reproduction returned the output below. ```sh node --input-type=module <<'NODE' import { mkdtemp, mkdir } from 'node:fs/promises'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { Client } from '@modelcontextprotocol/client'; import { StdioClientTransport } from '@modelcontextprotocol/client/stdio'; const root = await mkdtemp(join(tmpdir(), 'rea-prompt-check-')); const env = { PATH: process.env.PATH, REA_LOG_LEVEL: 'silent' }; for (const key of ['HOME', 'TMPDIR', 'XDG_CONFIG_HOME', 'XDG_DATA_HOME', 'XDG_CACHE_HOME', 'XDG_STATE_HOME']) { env[key] = join(root, key.toLowerCase()); await mkdir(env[key], { recursive: true }); } const client = new Client({ name: 'prompt-contract-check', version: '1' }); const transport = new StdioClientTransport({ command: process.execPath, args: ['scripts/rea.mjs', 'mcp'], cwd: process.cwd(), env, stderr: 'inherit', }); try { await client.connect(transport); const { prompts } = await client.listPrompts(); for (const name of ['trace_crash', 'investigate_feature']) { const argument = prompts.find(p => p.name === name).arguments.find(a => a.name === 'document'); console.log(name + ': ' + argument.description); } const rendered = await client.getPrompt({ name: 'trace_crash', arguments: { crash_signal: 'SIGSEGV', document: 'ProviderDocument' }, }); const text = rendered.messages.filter(m => m.content.type === 'text').map(m => m.content.text).join('\n'); console.log('Selected document rendered: ' + text.includes('ProviderDocument')); console.log('Hopper in rendered prompt: ' + text.includes('Hopper')); } finally { await client.close(); } NODE ``` ### Expected behavior `prompts/list` should describe `trace_crash.document` in provider-neutral terms while retaining the optional document selector. `docs/mcp-prompts.md:3` describes the workflows as provider-neutral, and `docs/mcp-prompts.md:102` identifies the current provider's `list_documents` result as the document completion source. Exact wording need not match another prompt. ### Impact and scope P3 wording defect in caller-visible prompt metadata. A generic document value was accepted and rendered, so this reproduction demonstrates no execution failure. The workaround is to use the current provider's document name despite the label. Real Ghidra/IDA sessions, provider document lookup, completion inventories, and analysis operations were not exercised. ### REA version 6.7.0; source commit `074768901f3cdc8205b61773fb1faf6f6c7b3ca8`. ### Runtime and platform Node v26.12.0; macOS, darwin arm64. No analysis provider was started. ### Target and artifact context Not applicable. Prompt discovery and rendering require no binary, target document, or analysis artifact. `ProviderDocument` is a synthetic context value. ### Interface MCP ### Earliest failure stage Transport or result projection ### Relevant output or evidence Observed through the production stdio MCP client in the reproduction: ```text trace_crash: Open Hopper document to inspect investigate_feature: Active target's provider document name Selected document rendered: true Hopper in rendered prompt: false ``` The control request was `prompts/get` with `{"name":"trace_crash","arguments":{"crash_signal":"SIGSEGV","document":"ProviderDocument"}}`. It succeeded; the rendered prompt does not include per-argument descriptions. The verifier recorded exit 0 and empty server stderr. ### Typed outcome or recovery expected Return accurate provider-neutral metadata for `trace_crash.document` in `prompts/list`. Preserve optionality, successful rendering of the selected document context, and session-aware document completion. No new error type is needed for this wording defect. ### Analysis or suspected cause Source-derived reasoning: `src/contracts/promptContracts.ts:276` supplies the Hopper-specific string, and `src/server/registerPrompts.ts:101` propagates argument descriptions into the MCP schema. `src/server/promptCompletion.ts:89` uses the shared document inventory lookup; this source inspection does not establish real-provider lookup behavior. ### Additional context Prepared with AI assistance and independently reproduced through production stdio MCP. A submission-time fetch found no later changes to the cited contract, registration, completion, or documentation files; the wording remains in upstream `main` at `21e0c580e7456af311ecfb12af8fc2531b429606`.
Author
Owner

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

TL;DR: This looks fixed on main, from a source text check only. Closing is the maintainers' call.

Checked on main b3aadaf47 (Linux). In src/contracts/promptContracts.ts, the trace_crash document argument has new text. It now reads "Active target's provider document name". That is the same as investigate_feature. No "Open Hopper document" text is left in src or docs. This matches the fix in ee12d517a.

Not run

  • A live prompts/list over MCP, and prompts/get.

Thanks, coygeek, for the clear report.

Commands
grep -rn "Open Hopper document" src docs

Exit 1 (no match).

grep -n "provider document name" src/contracts/promptContracts.ts

Exit 0: lines 107 (investigate_feature) and 276 (trace_crash) both read optional("Active target's provider document name", "document").

Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.11
  • Node: 24.18.0 (build only)
  • Head: b3aadaf47

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

<!-- gh-comment-id:6298168122 --> @CassieFox23 commented on GitHub (Oct 20, 2026): **TL;DR:** This looks fixed on main, from a source text check only. Closing is the maintainers' call. Checked on main b3aadaf47 (Linux). In `src/contracts/promptContracts.ts`, the `trace_crash` document argument has new text. It now reads "Active target's provider document name". That is the same as `investigate_feature`. No "Open Hopper document" text is left in `src` or `docs`. This matches the fix in ee12d517a. ### Not run - A live `prompts/list` over MCP, and `prompts/get`. Thanks, coygeek, for the clear report. <details> <summary>Commands</summary> ```sh grep -rn "Open Hopper document" src docs ``` Exit 1 (no match). ```sh grep -n "provider document name" src/contracts/promptContracts.ts ``` Exit 0: lines 107 (`investigate_feature`) and 276 (`trace_crash`) both read `optional("Active target's provider document name", "document")`. </details> <details> <summary>Test setup</summary> - Box: Nobara 44 (Fedora 44 base), Linux 7.2.11 - Node: 24.18.0 (build only) - Head: b3aadaf47 </details> 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊
Author
Owner

@morluto commented on GitHub (Oct 21, 2026):

Closing as fixed on main by github.com/morluto/rea@ee12d517a2, retained at 67a6477f01.

trace_crash.document now says Active target's provider document name, matching the provider-neutral prompt contract while preserving optionality and rendering/completion behavior. This is a prompt metadata correction, requiring no live provider.

This closure follows current-main producer and regression source inspection and the existing issue evidence. Tests and runtime reproductions were not rerun in this audit; no additional platform/provider coverage is implied.

<!-- gh-comment-id:6324291034 --> @morluto commented on GitHub (Oct 21, 2026): Closing as fixed on main by https://github.com/morluto/rea/commit/ee12d517a25d34853d40e31fc039c7d1576c60e1, retained at 67a6477f011ae358fc333e5a6e26c86d932654ed. trace_crash.document now says Active target's provider document name, matching the provider-neutral prompt contract while preserving optionality and rendering/completion behavior. This is a prompt metadata correction, requiring no live provider. This closure follows current-main producer and regression source inspection and the existing issue evidence. Tests and runtime reproductions were not rerun in this audit; no additional platform/provider coverage is implied.
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#3330
No description provided.