Scenario

An empty list that an agent read as none

L3SeniorIncident25 minDebuggingDesign review

RolesAgent Systems EngineeringAI Evaluation and Reliability

Engine
rea 6.7.0 at 27dc42d with the Ghidra provider
Model
no model; the fixtures are the ledger binaries built at -O1 and -O2
Hardware
one aarch64 Mac

Situation

A coding agent investigates the arm64 executable ledger-arm64-O1 through the rea MCP server, with the Ghidra provider behind it. Its task is a security review of the division in _percent_change. The agent calls analyze_function once and writes in its report: "The function is a leaf. It calls nothing, so the division cannot reach a callback or a handler." A reviewer asks where that sentence comes from. The agent points at one line of the dossier, the callees array, which is empty.

The reviewer does not accept the line as proof and asks you to say what the dossier does and does not establish. You have the dossier, the row of the same record in the bundle summary, and the manual pages that describe both. The report is due in an hour, and the sentence about the leaf is the one that the rest of the review rests on.

Questions

  1. The callees array is empty. Name two different states of the world that produce that same line.
  2. Which field of the record says how complete the callees set is, and what does its value cover?
  3. The limitations list is long. Which one qualifies the callees array, and how does it change the sentence in the report?
  4. The bundle summary reports counts for the value flow. Why does rea stand behind a zero there and not behind an empty array in the dossier?
  5. What evidence in the same record settles whether the function makes a call? Write the sentence that the report should carry instead.
  6. If no facet settled the question, what would you record, and what would close it?

Commit to a cause after each listing. Write it down before you read the next one.

Evidence

1/7

the callees array of the dossier

The array that the agent read as proof. The incoming references start on the next line.

evidence/the-callees-line.txt
          "callees": [],
          "incoming_references": [

Source: manuals/reverse-engineering-101/capture/out/10-mcp-09-analyze-function-percent-change-O1.json, lines 1052-1053

2/7

the unresolved_calls array of the same dossier

Also empty. Read it together with the coverage block before you decide what empty means.

evidence/unresolved-calls.txt
          "unresolved_calls": [],
          "referenced_strings": [],

Source: manuals/reverse-engineering-101/capture/out/10-mcp-09-analyze-function-percent-change-O1.json, lines 1244-1245

3/7

the relationship_coverage block of the record

Read the status, then the diagnostic sentence that says what complete covers.

evidence/the-coverage-block.txt
        "relationship_coverage": {
          "status": "complete",
          "diagnostics": [
            "Only resolved Ghidra call references are returned; unresolved computed or indirect calls remain unknown, while function classifications distinguish thunks and externals."
          ]
        },
        "locations": [],

Source: manuals/reverse-engineering-101/capture/out/10-mcp-09-analyze-function-percent-change-O1.json, lines 1899-1905

4/7

the ten limitations of the record

The seventh string names the flows that the callees facet cannot hold.

evidence/the-limitations.txt
        "limitations": [
          "The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.",
          "The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.",
          "Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.",
          "Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.",
          "References cover the complete Ghidra function-body AddressSet and exact entry. Dossier incoming edges omit sources owned by that function; procedure_references also retains those internal edges.",
          "The dossier combines Ghidra FunctionManager, Listing, ReferenceManager, BasicBlockModel, and decompiler observations; provider-specific pseudocode and assembly are not cross-provider text invariants.",
          "Resolved reference metadata identifies computed, indirect, external, call, jump, and data edges; unresolved targetless flows remain unknown, and function classifications distinguish thunks and externals.",
          "Synthetic Ghidra entry-point references without actionable memory sources are omitted.",
          "The Java bridge serializes one function request per Program and lets each decompilation run until it completes or the caller cancels.",
          "macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."

Source: manuals/reverse-engineering-101/capture/out/10-mcp-09-analyze-function-percent-change-O1.json, lines 1887-1897

5/7

the value_flow counts of the same record in the bundle summary

The value_flow object gives counts with a truncated flag, which the callees array does not.

evidence/value-flow-counts.txt
      "operation": "analyze_function",
      "confidence": "observed",
      "authority": "shipped-artifact",
      "analysis_profile_digest": "3fc72c9b4b78498fb992b938f8f3389dc670244a293c1d40abf5e1d10162ed3b",
      "retention": "complete-record",
      "limitation_count": 10,
      "native_dossier": {
        "available": true,
        "procedure_address": "0x100000500",
        "procedure_name": "_percent_change",
        "value_flow": {
          "status": "observed",
          "truncated": false,
          "omitted_operations_lower_bound": 0,
          "known_omitted_inputs": 0,
          "known_omitted_edges": 0
        }
      }
    }

Source: manuals/reverse-engineering-101/capture/out/11-inspect-evidence-bundle-O1.json, lines 237-255

6/7

the head of the bundle summary

Eight records and zero unknown revisions, because no unknown was recorded before the export.

evidence/bundle-summary-head.txt
{
  "kind": "evidence-bundle-summary",
  "filters": {},
  "total_retained_records": 8,
  "matching_records": 8,
  "unknown_revisions": 0,

Source: manuals/reverse-engineering-101/capture/out/11-inspect-evidence-bundle-O1.json, lines 1-6

7/7

the assembly facet of the same dossier

Six instructions. Count the ones that transfer control to another function.

evidence/the-assembly-facet.txt
          "assembly": [
            "0x100000500: cbz w0, 0x100000514",
            "0x100000504: sub w8, w1, w0",
            "0x100000508: mov w9, #0x64",
            "0x10000050c: mul w8, w8, w9",
            "0x100000510: sdiv w0, w8, w0",
            "0x100000514: ret"
          ],

Source: manuals/reverse-engineering-101/capture/out/10-mcp-09-analyze-function-percent-change-O1.json, lines 1017-1024

The answer

Show the walkthrough
  1. Separate the array from the claim. An empty callees array says that the provider returned no resolved call reference. It does not say that no call exists. The two states that give the same line are a function with no calls and a function whose calls Ghidra could not resolve to a target. The agent picked one state without looking further.
  2. Read the second empty list. unresolved_calls is also empty. That removes one case: Ghidra saw no call site with an unknown destination. It does not remove computed or indirect flows that never became a reference at all.
  3. Read the coverage block. relationship_coverage.status is complete, and its diagnostic says that only resolved Ghidra call references are returned, and that unresolved computed or indirect calls remain unknown. Complete means that rea returned the whole resolved set without a read limit. It is a statement about the provider's read, not about the program at run time.
  4. Find the limitation that applies. The seventh of the ten strings says that resolved reference metadata identifies the edges that Ghidra found, and that unresolved targetless flows remain unknown. The record itself tells you how to read its empty arrays. The manual's rule is the same: missing coverage means unknown, not absent.
  5. Compare with a count that carries a statement. The bundle summary shows the value_flow object of the same record: truncated is false, and the omitted operations, inputs and edges are all 0. Those zeros come with a flag that says nothing was cut. The callees array carries no such flag. A zero with a truncation statement is a count. An empty list without one is an observation that nothing was seen.
  6. Read the unknown counters. The summary head says unknown_revisions is 0. That number means that no unknown had been recorded when the bundle was exported. It does not mean that the investigation has no open questions.
  7. Use the observed facet. The assembly facet holds six instructions: a compare and branch on zero, a subtract, a move of the constant, a multiply, a signed divide, and a return. None of them transfers control to another function. The assembly is the Listing text that Ghidra observed, and it is the evidence that the leaf claim needs. The callees array was the wrong line to cite for a true sentence.
Show the resolution

The claim in the report was right, and the evidence under it was wrong. The corrected sentence reads: "The assembly of _percent_change has six instructions and no call instruction; the dossier reports no resolved callee with complete coverage over resolved references, and the record states that unresolved targetless flows remain unknown." The report cites the assembly facet, the coverage block and the limitation, and it quotes the callees array as a secondary observation only.

The team also changes how the agent writes. A rule in its instructions now says that an empty list is reported as "none observed" with the coverage status beside it, never as "none". When no observed facet settles a question, the agent calls record_unknown with the question, the authority that would close it, and a recommended probe. For a call question that would be shipped-artifact authority and observed confidence, from the assembly or a process capture, as the unknowns that compare_functions opens already ask for.

Show the wrong turns
  • “The callees array is empty and the coverage is complete, so the function provably calls nothing.”

    Complete covers the resolved references that Ghidra returned. The record's own limitation says that unresolved targetless flows stay unknown.

  • “Record a residual unknown and ship the report with the question open.”

    The same record holds an observed facet that answers the question. Read every facet before you open an unknown.

  • “The bundle summary says zero unknowns, so nothing is open.”

    That counter reports the unknowns that were recorded. It cannot count the questions that nobody wrote down.

  • “Trust the pseudocode; it shows no function call either.”

    The pseudocode is a decompiler reading with low-confidence types, as the same manual shows for this function. Cite the instructions, not the reading of them.

Show the general rule

A list in a tool result is a claim about what the tool saw, not about what exists. Before you turn an empty list into "none", find the field that states the coverage of that list and the limitation that qualifies it, and prefer a count that comes with a truncation flag over an array that comes with nothing. When one facet is an interpretation, look for the facet that is an observation of the same thing, and cite that one. When no observation settles the question, write the question down with the evidence that would close it.

Taught in

The coverage page of Reverse Engineering 101 reads these same lines, the dossier page lists the sixteen facets and shows the six instructions, the failure modes lesson names a claim that outruns its evidence as an agent hallucination, and lesson 35 builds the unknowns ledger in Python.