Repository navigation
Description
Summary
A tool parameter named properties is silently deleted from the rendered tool schema before the model sees it. The Gemma-4 chat template collides the parameter key properties with JSON Schema's own properties keyword while walking the nested schema, and drops the parameter along with its entire description.
create_node and update_node both take a parameter named exactly properties. It carries every field value on every write, and its description is one of the most heavily tuned strings in the system — including the allowed_values rule and the custom:-prefix rule from ADR-063.
The model never sees any of it.
Found while deriving the structural reference for #2122 (golden prompt corpus) via NODESPACE_PROMPT_DUMP. No production source was modified.
Reproduction
Minimal, using the merged golden-prompt utility from #2118 — no daemon, no DB, no gRPC:
name = "probe"
reps = 1
[[turn]]
system = "probe"
user = "probe"
[[turn.tool]]
name = "update_node"
description = "Update an existing node's content or properties immediately."
[turn.tool.parameters_schema]
type = "object"
required = ["id"]
[turn.tool.parameters_schema.properties.id]
type = "string"
description = "Node ID to update"
[turn.tool.parameters_schema.properties.content]
type = "string"
description = "New content/text for the node (optional)"
[turn.tool.parameters_schema.properties.properties]
type = "object"
description = "Properties to merge/update ... When a field lists allowed_values, use one of those values exactly."NODESPACE_PROMPT_DUMP=/tmp/dump.jsonl \
cargo run --release -p nodespace-agent --bin golden_runner -- --reps 1 <case>.tomlRendered result (420 chars) — id and content survive, properties is gone:
update_node{description:<|"|>Update an existing node's content or properties immediately.<|"|>,
parameters:{properties:{
content:{description:<|"|>New content/text for the node (optional)<|"|>,type:<|"|>STRING<|"|>},
id:{description:<|"|>Node ID to update<|"|>,type:<|"|>STRING<|"|>}
},required:[<|"|>id<|"|>],type:<|"|>OBJECT<|"|>}}
grep allowed_values against the full post-template prompt: not present.
The trigger is the key name
Control — byte-identical case with the parameter renamed properties → field_values:
| arm | rendered? | allowed_values guidance reaches model? |
prompt len |
|---|---|---|---|
parameter named properties |
no | no | 420 |
parameter named field_values |
yes | yes | 694 |
Nothing else changed. Nesting depth, the presence of a description, and sub-properties are all ruled out: a probe with bare_obj, rich_obj (with declared sub-fields), and an enum field all rendered correctly in the same run — only the key literally named properties vanished.
Where it happens
Not in our Rust. packages/nlp-engine/src/chat/mod.rs:1266 passes t.parameters_schema through intact into the OpenAI-format tool JSON. The loss occurs downstream inside llama.cpp's embedded Gemma-4 Jinja template when it walks the nested schema.
Since the template is upstream, the fix belongs on our side.
Why this likely matters more than it looks
Several long-standing, separately-investigated symptoms are consistent with "the guidance that explains how to fill properties is invisible to the model":
update_node({"id": "..."})called with zero properties — the exact failure that made the matrix's name-onlytoolSequencescore a pass (Autonomous goal: drive local-agent matrix reliability to 10/12+ without turn-by-turn relay #1917)- the model inventing property keys instead of using defined ones
- enum fields not being set to a value from
allowed_values create_nodelosing user-supplied values
Each was previously treated as a prompt-tuning problem. If the parameter carrying those values is absent from the schema, no amount of rewording that description can reach the model — it is deleted after the wording is chosen.
Worth re-measuring the affected cases after a fix rather than assuming; the point here is that the channel was never open.
Suggested fix
Rename the wire parameter on create_node and update_node from properties to a non-colliding name (field_values verified working). This is a tool-schema change in packages/agent/src/local_agent/tools.rs plus the params structs that deserialize it — serde(alias) already handles the node_id/id precedent for accepting both spellings if wanted during the change.
Per ADR-064 rule 1 (tool schemas own argument shape), this is squarely a schema-channel fix.
Scope note
This is not #2122 (which touches no production source) and not #2120 as currently written (which reproduces tuned golden strings). It is a prerequisite defect: a golden authored against a properties parameter is authoring text the model provably cannot see. #2122 will author its write-tool cases against a non-colliding parameter name and record the dependency.
🤖 Generated with Claude Code
Activity
Diagnose the unlisted-value failure to a capability boundary (#2122)
Golden prompt corpus: dev-workflow cases + context ablation (closes #…
malibio commentedon Aug 18, 2026
Scoping addendum — acceptance criteria and blast radius
The original body diagnoses the defect but never states a done condition, and it does not bound what the rename touches. Both added here so this can be picked up cold.
The change is narrower than a repo-wide grep suggests
grep -rn properties packages --include="*.rs"returns a large number of hits. Almost none of them are in scope. Two distinct concepts share the word:create_node/update_nodetoolspropertiesmap on a node (node_service,node_ops,markdown, the DB schema, every test fixture)The defect is purely that a tool parameter named
propertiescollides with JSON Schema's ownpropertieskeyword when the Gemma-4 template walks the nested schema. Nodes can keep storing apropertiesmap forever; only the argument the model is asked to produce needs a different name.Concretely in scope:
packages/agent/src/local_agent/tools.rs:78—AgentCreateNodeParams.propertiespackages/agent/src/local_agent/tools.rs:92—AgentUpdateNodeParams.propertiesparameters_schemaJSON literals indef_create_node()anddef_update_node()that declare the parameter and carry its (long, tuned) descriptionexec_create_node/exec_update_noderead those fields, plus their flat-extras scansBoth structs are private to that file, which is what keeps the change small.
On accepting both spellings
The body mentions
serde(alias)as an option. Worth being explicit: an alias is not needed for correctness here. There is no persisted data and no external caller — the only producer of this argument is the model, and it produces whatever the rendered schema tells it to. Per the repo's no-backward-compatibility rule, prefer the clean rename. An alias would also keep the broken spelling alive in a way that is invisible at the template layer, which is how this defect stayed hidden.Verifying the fix
The measurement loop is the golden runner from #2118 — no daemon, no DB:
Then confirm the parameter and its description survive into the post-template string. That is the only layer where this defect is visible —
--check(pre-template) shows the parameter present either way, which is precisely how it went unnoticed.Reference measurement from the original diagnosis: same case, one word changed, 420 chars rendered with
propertiesvs 694 withfield_values, with theallowed_valuesrule reaching the model only in the second.Why the name matters for what comes next
#2122's corpus (merged,
44ef2f1f) authored every write case againstfield_values, because tuning against a parameter the model never receives is not possible. ItsPATTERN.tomlalso establishes that write tools must declare each field as a typed sub-property — declarations that would be equally invisible inside a deleted parameter.So if this is fixed by renaming to something other than
field_values, the corpus files need updating to match, and their recorded measurements need re-taking. Renaming tofield_valuesmakes the corpus correct as written. That is a reason to prefer it, not a requirement.Acceptance criteria
create_nodeandupdate_nodedeclare their value parameter under a non-colliding name (field_valuesunless there is a reason to differ)NODESPACE_PROMPT_DUMP— not via--check, which cannot see this class of defectpropertiesconcept is untouchedupdate_nodecalled with an id and no values, invented property keys, enum values not drawn fromallowed_values. Each was investigated as a prompt-tuning problem while the guidance was provably unreachable; whether they resolve is an open question, not a foregone conclusionfield_values, the Author and tune the golden prompt corpus: production-shaped, dev-domain prompt strings #2122 corpus files are updated and re-measured, andPATTERN.toml's dependency note is revisedRelated
🤖 Generated with Claude Code
mstomar125 commentedon Aug 18, 2026
Resolved in #2144.
Renamed the wire parameter on
create_node/update_nodefrompropertiestofield_values(no back-compat alias, per this repo's greenfield policy) and updated every real call site: the tool schema definitions and deserializing params structs intools.rs, the flat-extras promotion lists and error messages,agent_loop.rs's splice-repair user-data key list, the Node Creation / Graph Editing skill guidance markdown, andlocal_agent_service.rs'sterse_write_facthistory renderer (which was reading a completed write's recorded arguments by the old key).Verified with the golden-runner probe from this issue's own reproduction: with the parameter renamed, the post-template prompt goes from 420 chars (parameter silently dropped) to 592 chars (parameter present,
allowed_valuesguidance reaching the model). Also verified live end-to-end against the locked model:scenario6_update_node_properties(issue #1927's exact reproduction) now getsupdate_node({"field_values":{"isReturned":true},...})3/3 trials, where it previously reproduced the silent no-op.Full details and test plan in the PR.