Piper · Cognition
Log in

Summary / Component 29 of 38

29 Tool use

Recognizing when an external capability is useful and employing it.

Latest81.9v4
Baseline81.9Oct 2
Live use46.7last 7 days

Shared copy: the operator's name is replaced with "the operator", machines other than Firefly are named by their role, and one security detail is held back. Nothing else is changed.

Piper — what it is

Tools are chosen before habit gets a say: a registry lists the instruments that count as tools, a learned per-tool reliability scores which family has worked for which kind of task, and the rule for a new tool is that it is not "added" until it is reachable, visible, cheaper than the alternative and retirable. Capability lookup comes before writing code, so reuse beats reinvention.

Piper — the parts that do it

tool registry in foundation/core/instruments.json, tool-value-oracle v1.4.1, capability/code-graph lookup, component-registry v1.1.1.

Reviewer Claude, 2026-09-30

What needs improving: Maths inside real questions is still weak

The concept is right. The practice contradicts "tools are chosen before habit gets a say". tool_value has 0 calls, capability 0 and tool_recall 1, and delegate is 58–60% of every call she makes. 7 of her 27 tools have never been called and 11 weren't called in the last ten days. The tool registry exists; the choosing doesn't.

Update 2026-10-02 — suites v3 (77.8) and v4 (81.9): embedded maths and buried figures are the durable gaps

Suite v3. v3 has 59 candidates in 12 families. It adds:

The pilot (k=2) scored 84.5, which is not harder than v2. calc solves the arithmetic family outright (100), and most new levers didn't bite. After calibration 39 items remain. v3 baseline (k=4, live configuration): 77.8 ± 2.2. The weakest families are which-store-to-ask (54) and precedence between sources (50).

Suite v4. v4 follows the operator's design rule: arithmetic only inside real operator-style questions ("we spent X on workers over Y days, what's the daily average?"), never bare sums. In the v3 pilot, a bare "12 × 12" drew "is that the whole test?", which leaks that it's a bench. Two new families:

Header-spend items whose answer is defensible either way were dropped. Items where the premise card already answers count as answered with no call (score29 1.1).

Run Score Notes
v4 pilot (k=2) 81.3 ± 1.0 buried figures 64, embedded maths 76
v4 baseline (k=4, 32 items) 81.9 ± 1.1 3.6 calls/item, $1.07

Reading it. Calibrated items drifted back toward the mean on the full run: buried figures went from 64 to 80. So v4 is not much harder than v3 overall. The durable weak spots are:

For real difficulty, the next suite needs more items per family, all embedded.

Update 2026-10-02 — suite v2, header contract and the calc tool: 78.5 → 82.3; missing-tool family 72 → 100; v3 built

Suite v2. v1 had three problems: some expected-tool lists were too narrow, silent corruption and stale figures were at ceiling, and it could not tell "uses tools better" from "uses fewer tools". v2 is built from use / don't-use pairs: the same kind of fact asked twice, once answerable from the message header (no call needed) and once needing a real read. An intervention that only makes her call less, or more, wins one half of a pair and loses the other. Silent corruption, stale figures and missing tools got near-miss versions. 36 items after calibration.

Intervention 1: the header contract. The header every message carries (clock, spend, running router, restart-pending files, controls, alerts, subsystem ages, message times) is a tool result. When a question asks for something the header already holds, header-contract.ts attaches the header's own words before she starts, and her first evidence call that turn returns those words instead of running. Deterministic: field patterns on the message, no model inside. Header-answerable questions went from 61 to 77 with the paired "needs a read" questions held. "What's waiting on a restart?" is still 0: she reads files to explain the pending changes.

Correction to the plan review (2026-10-01, point 3). The review said "arithmetic is right to do internally." The operator overruled it, correctly: a probabilistic model is not a better calculator than a deterministic one. The fix is an instrument, not a rule:

Results (clean snapshot, k=4, all scored without the retired item)

Condition Score Missing tools Header-answerable
A: current Piper 78.7 ± 3.1 76.6 61.8
B: + tool discipline 78.5 ± 1.8 77.3 61.1
B + header contract 81.0 ± 1.3 71.9 77.1
B + H + calc + missing-tool card 81.9 ± 4.0 100 75.0
B + H + calc 82.3 ± 2.7 100 71.5

Reading it. The header contract and calc each do what they are for. Asked for arithmetic, she now makes one calc call and gives the exact answer; asked for an "uptime tool" or a "python tool", she says she has none and uses the real route. The total moves less than the parts, because the missing-tool family is 1 of 11 and the silent-corruption family (two items) landed lower in both calc runs.

Live. The router restart on 2026-10-02 00:24 (1.9.96) put the header contract, calc and the tool-discipline layer into her live Day.

Next: suite v3. Four v2 families are at or near ceiling. v3 (59 candidates, 12 families, calibration pending) adds an arithmetic family (exact answers where calc matters; in-head answers count as unverified), harder missing tools (a real module that is not a Day tool, an action selfstate lacks, a calc "solve mode" that does not exist), corruption that contradicts a second source she holds, failures that look like success (0 rows on a live table, an empty config file), stale context from the forked snapshot itself, and exact figures asked in memory phrasing.

Parts that do it (added)

Update 2026-10-01 — scorer correction (score29 1.0.1): select 58 → 69 (A), 65 → 81 (B); totals 75.3 / 76.7

Why a correction. Looking into the "right tool first: 58%" weakness turned up two artifacts in the scorer, not in Piper. Both rules were changed and written into the spec before re-scoring. The runs themselves are unchanged: the same 108 probes per condition, scored again (rescore29.py).

  1. plan was not counted as a first call even when it was the right one. plan, journal and ask_operator are skipped as bookkeeping. On "what's on your open work list?", plan is the expected tool, and with the layer on she opened with it 4 times out of 4, but was scored as if she hadn't. Now a bookkeeping tool counts when the item expects it.
  2. No call was counted as a wrong pick. When she answered from context with no tool, "select" scored 0 on top of the necessity score, so the same thing was counted twice. Now select is scored only when a call was made.
Condition Score (1.0.0 → 1.0.1) Right tool first
A: current Piper 74.1 → 75.3 ± 4.3 58% → 69%
B: + Tool Discipline Layer 75.1 → 76.7 ± 4.5 65% → 81%

The verdict of the A/B experiment does not change: the layer fixes failure handling and the total is flat.

What is left of the selection weakness is mostly the item bank. - "What's your primary model set to in your stored facts?" expects the facts tool. Her usual route is a read-only selfstate SQL query on the same facts table, and that route got the answer right every time. The one wrong answer came from facts get with a guessed key. The instrument is the better read here, so the item is too narrow. - "How sure are you that Firefly is underpowered?" expects the belief ledger. With the layer on, she measured instead (memory, load, CPU). That is evidence over memory, so not clearly a wrong pick.

A planned fix (making selfstate hand questions about facts and beliefs off to those tools) was dropped, because it would have pushed her off the route that works. The sealed v1 bank is not edited after seeing the answers. Both items get corrected expectations in v2.

Where the real tool-use gaps are now: calling tools for what the header already says (NB, 55 with the layer), and being asked to use a tool she doesn't have (HL, about 60). Both are decisions made before any tool result, which the layer can't reach.

Parts (added): score29.py 1.0.1, rescore29.py (writes summary_s29-1.0.1.json beside each run; history and raw results untouched).

Update 2026-10-01 — plan reviewed, suite v1 built, first experiment (A vs B): 74.1 → 75.1

Review of the tool-use plan. The plan is sound, and the decomposition is the right one. Treating tool use as six decisions that fail independently (necessity, selection, arguments, execution, verification, chaining/stopping) is what makes it measurable. So is the order: harness guarantees first, learning last. The bench follows its taxonomy (§23) and suites (§24) almost directly. Six adjustments for Piper specifically:

  1. Her menu is small, so candidate filtering (condition C) has little to gain. The Day seat carries 28 tools, not hundreds. Her version of "generic-tool collapse" is the delegate tool, about 60% of her real calls, and the fuzzy memory tools reached for when a deterministic read exists.
  2. Schema validity is already enforced. Pi validates every call against the tool's schema before it runs. The live problem is semantic arguments (P2), so that is what the bench scores.
  3. "Deterministic tool" means her instruments. The Day seat has no calculator or code runner. The precedence rule maps to selfstate (live state), facts, doc and logquery, against recall/fused and delegation. Arithmetic is right to do internally.
  4. The header is a tool result too. Every message carries fresh instrument lines: clock, spend, controls, subsystem ages, message times. The pilot's clearest unnecessary-use failure was calling tools, even a worker, for what the header already said.
  5. Silent corruption is rare in her real tools. Her stale-memory problem (#22) is the realistic version. The bench keeps silent corruption as a habit test: does she cross-check before something goes into a paper? It deliberately gets no harness cross-check. One that only re-reads what the tool already read would just beat the bench.
  6. Phases 4–6 (SFT, preference learning, RL) don't apply as written. Her model is hosted, so it can't be fine-tuned. The "learning" route is the decision log feeding contracts, lessons and the keep/rollback loop. That is why the log matters most.

Also: several cited papers (2025–2026 arXiv numbers) are newer than anything that can be checked here. As the plan itself says, the design shouldn't rest on any one of their numbers, and it doesn't.

The bench (suite v1). Built from the plan's taxonomy (§23) and suites (§24). It is blind like #22 v3 and #38 v1: the operator's voice, the full real header, and a fork of her conversation from before she knew about the benches. There are 11 families, one per stage of the tool policy:

Each item is scored on process components (necessity, select, precedence, params, switch, economy) plus the answer, checked against live truth. Two pilots of 45 candidates kept 27 items. She is near the ceiling on silent corruption and stale figures; when something goes into a paper, she re-reads the file instead of trusting one tool. Those families keep one anchor each and need harder items in v2.

Where she is weakest (baseline): - Picking among similar tools: 58% right first. For example, plan instead of resume for "what's on your work list", or files read instead of the belief ledger. - Calling tools for what the message header already says. Today's spend, her last reply time, router status: she sends searches or even a worker. - Stopping: 66% within the call budget. "Quote me back what I said" takes 7 searches. - Asked to use a tool she doesn't have (a calculator), 56%. She does the arithmetic, then also searches or delegates.

Result: the plan's first experiment (§29), A against B, same snapshot, k=4

Condition Score Failure handling Switched after failure Right tool first Within call budget
A: current Piper (with #22's premise card) 74.1 ± 4.8 70 56% 58% 66%
B: + the Tool Discipline Layer 75.1 ± 4.9 87 81% 65% 68%

Reading it. The layer (built in #38 round 1: failure envelope with stand-ins from the tool contracts, no blind retries, no repeated calls, a 16-call cap, a decision log) does what it is for. Recovery from a failed tool goes from 56% to 81%, and the worst item, a broken conversation index, from 0.62 to 0.96. The overall score doesn't move, because most of what this suite measures happens before any tool result comes back: whether to call at all, which tool to call first, whether the header already answers it. A result-stage layer cannot touch those. That answers the plan's §29 question, for now: the remaining weakness is in the decision to call, not in handling what comes back. Item swings in the other direction (two header questions) came before any tool result, so they are noise at k=4, not an effect of the layer.

Next (condition C and beyond). 1. Make the header's instrument lines part of the tool contracts, so "already answered" can be checked. 2. Use the decision log as training data for selection, as the plan describes; since the model can't be fine-tuned, that means contracts and lessons. 3. Write v2 items for silent corruption and stale figures.

Parts that do it (shared with #38)

Test suite built · v4 (blind, embedded maths, buried figures) · baseline 81.9

Tool-choice tasks, each with one clearly best tool: a specific retrieval path, probkit, a solver, a code graph query, or no tool at all. Scoring: right-tool rate, with points lost for delegating what a direct tool could answer in one call, and for calling tools she didn't need. The live-use part is tool diversity in real work: the spread of calls across tools, and how many tools went unused.

Scoring rules shared by all 38 suites: How the tests work.

Research & attempts

Score history

Suite v1 retired
0255075100Oct 176.7
Suite v2 retired
0255075100Oct 282.3
Suite v3 retired
0255075100Oct 277.8
Suite v4 current
0255075100Oct 281.9

Dashed line: the suite's baseline. Shaded band: the ± interval. Hollow dots are anchor items carried over from an earlier suite. Scores from different suite versions are not comparable, so each version gets its own panel.

DateSuiteTypeScore±Live useCostNotes
2026-10-02v4sealed 81.91.1 46.7$1.07 v4 BASELINE (32 calibrated items, k=4, score29 1.1; embedded maths + buried figures). Embedded maths 74.7, buried-figure B02 .51, looks-like-success 72, precedence 71. 3.6 calls/item. Live use 46.7 = 14 of 30 Day instruments called in real work (delegate excluded: it is how she acts, not a tool choice); spread 0.63 over 204 calls. PARTIAL window: the decision log starts 2026-10-02 05:09, so ~31 h, not 7 days. Unused: facts, perspective, whatif, card and 12 more; calc, logquery, timeline 1 call each.
2026-10-02v3sealed 77.82.2 —$1.07 v3 BASELINE (39 calibrated items, live config, k=4, score29 1.0.2). Arithmetic 100 (calc), which-store 54, precedence 50, corruption 72. The v3 pilot (84.5) was not harder than v2.
2026-10-02v2sealed 82.32.7 —$1.18 B + H + calc tool 1.0.0 (card off), k=4, no H01. Missing tools 100: calc alone does it. Live config after the 2026-10-02 restart.
2026-10-02v2sealed 81.94 —$1.05 B + H + calc tool 1.0.0 + missing-tool card (premise card 1.1.0), k=4, no H01. Missing tools 72 -> 100.
2026-10-02v2sealed 811.3 —$1.01 B + header contract 1.0.0, k=4, no H01. Header-answerable 61 -> 77, paired reads held; 'what's waiting on a restart' still 0.
2026-10-02v2sealed 78.51.8 —$1.26 v2 BASELINE B (+ tool discipline layer), k=4, no H01. Switch 62 -> 100, failure handling 79 -> 90.
2026-10-02v2sealed 78.73.1 —$1.18 v2 BASELINE A (current Piper, no tool layer), k=4, scored without retired item H01 (score29 1.0.2). Header-answerable 61.8, missing tools 76.6.
2026-10-01v1sealed 76.74.5 —$0.96 Condition B: + Tool Discipline Layer, same snapshot, k=4. Scored with score29 1.0.1; supersedes 75.1 ± 4.9 under 1.0.0 (same probes). Failure handling 70 -> 87, switch 56% -> 81%, right tool first 81%. Total still flat vs A; remaining gaps: header-answerable (NB) and tool she doesn't have (HL).
2026-10-01v1sealed 75.34.3 —$1.36 BASELINE (condition A: current Piper incl. #22's premise card, no tool layer), clean snapshot, k=4. Scored with score29 1.0.1; supersedes 74.1 ± 4.8 under 1.0.0 (scorer fix, same probes: plan counts when expected, select N/A on zero calls). Right tool first 69% (was 58%), switch 56%, economy 65%.

Experimental record

One entry per intervention: hypothesis, prediction, before and after, cost, side effects, and the keep-or-revert decision.

2026-10-02 · v2 ✓ kept 78.5 → 81 (+2.5) ± 1.3 · $1.00

Hypothesis. The message header is a tool result: when a question asks what the header already holds, attaching the header's own words and returning them on her first call stops needless tool use.

Research sources
Tool-use plan §4, §20; plan review note 4 ('header = instrument').
Implementation / version
header-contract.ts 1.0.0 (field patterns on the message words, attach + first-call return; state/header_contract.json enforce); router 1.9.95/1.9.96.
Predicted improvement
Header-answerable up, paired needs-a-read items held.
Regressions
None measured; missing tools 77 -> 72 is within noise (two items).
Lessons learned
Observed: Header-answerable 61 -> 77, needs-a-read 73 -> 75; calls/item 3.47 -> 2.97; 'waiting on a restart' still 0.
2026-10-02 · v2 ✓ kept 81 → 82.3 (+1.3) ± 2.7 · $2.30

Hypothesis. Arithmetic needs a deterministic instrument, not the model's head (operator ruling 2026-10-02); with one in the Day seat she computes exactly in the same turn instead of guessing or sending a worker.

Research sources
Operator ruling 2026-10-02 (reverses plan review note 3); v2 HL failures (worker sent for 2^20 - 1000).
Implementation / version
calc.py 1.0.0 (ast evaluator, exact fractions, refusals) + calc-tool.ts 1.0.0; day_toolset 1.4.0; tool_contracts calc entry; score29 1.0.2 (one calc call never unnecessary; fixed before results).
Predicted improvement
Missing-tool family up; no loss elsewhere.
Regressions
Silent corruption 87.5 -> ~72 in both calc runs (two items; the B+H reading was probably high).
Lessons learned
Observed: Missing tools 72 -> 100 (one exact calc call; says plainly it has no python/uptime tool). Total within noise.
2026-10-02 · v2 ↺ reverted 82.3 → 81.9 (-0.4) ± 4 · $1.10

Hypothesis. Telling her, before she starts, that a named tool does not exist and what the real route is stops tool hunting and false tool claims.

Research sources
Tool-use plan §S3 (tool hallucination); v2 HL traces (search/capability calls hunting for 'calc tool').
Implementation / version
premise_card.py/premise-card.ts 1.1.0 'absent' kind + routes file; first lookup for the absent name refused. Mode off live.
Predicted improvement
Missing tools up beyond calc alone.
Regressions
None.
Lessons learned
Observed: No gain over calc alone (81.9 vs 82.3, HL 100 in both). Left installed, off.