34.4 The structured reply protocol
Each model turn is one object with say, question, help, docs, read, save, run, and done. run is a list of argument arrays and reasons; arguments exclude the nlmx executable name. This protocol distinguishes communication, information requests, file generation, and execution proposals.
How the mechanism works
Embedded generation can be grammar-constrained. Server replies are parsed leniently: surrounding text, fences, omitted keys, a command string, and a leading nlmx can be normalized. A reply that is cut off, is not JSON, or is a runaway (a list that repeats itself) is called unreadable. It is left out of the conversation, the model is asked once more, and the raw text is kept only in ask_log.jsonl (event unreadable_reply). If the second reply is no better, nlmx shows what the assistant meant to say (its say text) with a note that nothing was run, or a plain sentence when nothing can be read, and the request ends; the session continues (nlmx 4.18.1 and later).
Evidence from nlmx 4.16.1
A question pauses action. help, docs, and read supply more grounded context. save writes from a real template after checking keys. done=true closes the request. A message-only reply can end or wait depending on whether commands already ran.
What the mechanism protects—and what it does not
The mechanism controls a defined part of the workflow. It does not make the model’s prose correct, select the right scientific question, validate external data, or transfer accountability away from the user. Treat policy safety, computational success, statistical adequacy, and scientific validity as separate conclusions.
Review practice
Structured output is a reliability mechanism, not a truth guarantee. Review raw replies in ask_log.jsonl; distinguish what the model proposed from the normalized command nlmx recorded and executed.
For a novice, read the human transcript first, then the JSONL event log, exact settings/commands, and native command outputs. “The session completed” describes the outer process only; individual proposals may have been planned, declined, refused, failed, corrected, or executed.
Evidence to retain
- nlmx version/build, backend identity,
.asksettings, policy, limits, and system prompt; - request, raw replies, help/manual/file context events, confirmations, refusals, and corrections;
- every settings version and exact executed command, with child exit status and full output;
- reviewer interpretation, unresolved warnings, scientific limitations, and final disposition.
Navigation
See the previous page, next page, and guardrail, policy, and audit index.