Adrian RomoAdrian Romo
All writing
Architecture Note 5 min read· Updated

The Tool Nobody Called

I gave my homelab's agents one tool for grounded answers. It served 1 of 69 lookups, and my voice assistant called it in 0 of 32 turns. The nudges meant to fix that had been going to a debug log.

The memory layer behind my homelab has one front door for agents: an MCP tool called ground_question. You ask it a question and it returns a token-budgeted packet of cited evidence, a verdict on whether that packet is enough (answerable, partial or insufficient), and whether the caller should fall back to other tools. It lives on a server that exposes 96 tools in total.

I spent weeks making the packet better. Then I measured who opened the door.

One call in sixty-nine

The door merged on October 29 and did not load. The server ran from my working copy, 92 commits behind main, so the reconnect step restarted old code. It went live on October 31, once the launcher pointed at the deploy checkout.

On November 6 I counted. Over 14 days, ground_question was 1 of 69 lookups on that server, and the one call was a probe after the restart. Nothing told an agent the door existed, and the door itself returned its sufficiency verdict as a hard-coded null.

The fix was plain. The tool returns the verdict now, and the server's MCP instructions, the session brief, the repo's agent instruction files and the plugin's recall skill all name it first. Two days later the share was 4 of 76 lookups (5.3%). The target set that day is 25%. Many lookups are legitimately tool-specific, so a quarter is the bar for agents reaching for it by default. It is not there.

Zero of thirty-two

The other consumer I cared about is Aegis, my self-hosted voice copilot. Mapping it for an evaluation produced the first finding before any model ran: deployed Aegis does not use the compiled layer at all. It imports the older context operations in-process and has never called ground_question.

So I tested it offline. A harness drove Aegis's own system prompt, tool schemas and read tools against qwen3:14b, with every write tool refused and nothing sent to the running service. The scenario was a Pi-hole and DNS outage: eight operator questions in one conversation, scored against 21 verified claims, one deterministic pass and three sampled passes per arm.

Offered ground_question as one tool among eighteen, with a prompt line asking for it first, the model called it in 0 of 32 turns. Every arm answered 4 to 6 of the 8 questions without calling any tool.

Forcing the call on every turn is a diagnostic, not a fair arm, but it shows what the packet does when it is actually read:

arm                    correct of 21   unsupported   prompt tokens   p50 per question
keyword search only          2           11 of 13        27,845           3.1 s
Aegis as deployed            6           13 of 17        63,974           4.4 s
door offered                 5            7 of 15        78,713           4.3 s
door forced                  9            2 of 20       167,455          24.3 s

Unsupported statements fell from 13 of 17 to 2 of 20. That cost 2.6 times the prompt tokens and 5.5 times the latency, and by question 7 the accumulated packets filled the 32,768-token context. The door showed its own defects too: the spoken address "Aegis," polluted the first packet, and 6 of 8 packets called themselves partial or insufficient, including some that held the answer.

Limits: one scenario, one model, three sampled passes, and the harness blocked vector search in every arm, which understates deployed Aegis. Whether Aegis forces a first call or gets the packet injected is an open decision on my list.

Nudges into a log file

This had happened before. My agent plugin carries a delegation ladder: try a memory lookup before a sweep of file reads, and send bulk reading to a local model or bound it. A hook nudges sessions toward it, and since plugin 0.2.0 it printed those nudges on a PreToolUse hook's standard output.

Claude Code sends that output to the debug log. Only SessionStart and UserPromptSubmit output, and the JSON additionalContext field, reach the model. No nudge had ever reached a session; the only message that did was a block, because the block already used the JSON path. Meanwhile the hook's own log recorded every nudge faithfully, which proved the hook ran and said nothing about whether anyone heard it. That is the mistake from my earlier post about alerts: a record that something happened, read as evidence of a property it never measured.

An A/B in two fresh headless sessions on October 27 settled it. The old script wrote its nudged row and the model reported seeing nothing. The JSON version wrote the same row and the model quoted the nudge verbatim. The fix shipped that night.

The fall in sessions with a memory lookup, 30 of 40 in September to 8 of 31 in October before the fix, says nothing about the ladder: it mixes undelivered nudges with lookups that had moved to the MCP server, which the hook could not see. The rate is now judged only over sessions that ran the fixed hook, once ten of them are decided. I have no recorded reading since the fix.

A metric that could not turn green

The other rung, sending bulk reading to local models, had a different bug. Its rate counted only a call to the model router as success. In September I switched that rung from nudging to blocking, and the cheapest way to comply with the block was to bound the read with a line limit or a tail flag. A bounded read makes no router call, so a hook working perfectly would have reported 0% forever.

The hook now records a bounded read as its own event, and the re-measure counts an opportunity as handled if it was delegated or bounded.

What I took from it

Shipping a tool and having it used are two measurements, and the second needs checks on its own instrument: that the message actually reaches the model, that the numerator can move at all, and that the event I logged is the event the model saw. Today the door share is 5.3% against 25%, Aegis still answers without it, and the nudge fix has no re-measure yet.

Written by

Adrian Romo

Senior Backend Engineer: Python backends, AWS, enterprise integrations, realtime voice systems, and AI infrastructure.

Keep going

Where to next?

Browse more technical writing, see the engineering case studies, or reach out directly.