Quick reference

This page lists every name a prompt author can write, grouped by kind, with a link to the section that teaches each one. Rows are alphabetical, except the top-level frontmatter keys, which follow the order the file structure chapter teaches them.

Frontmatter keys

Frontmatter is YAML between two --- delimiter lines at the very top of the file, a leading byte-order mark is dropped, and any key not listed here fails the parse with parse error kind Frontmatter.

KeyValueRequiredDefaultTaught in
namestring naming the promptyesnoneThe required name and description keys
descriptionstring summarizing what the prompt doesyesnoneThe required name and description keys
runvilEngine major, a whole number from 0 to 4294967295, and only 0 runsnononeThe runvil version key
max_tool_iterationsround cap, a whole number from 1 to 1000no24 unless the Host or Harness sets anotherTool rounds and the round cap
inputfile declaration map of path and descriptionnononeInput and output file declarations
input.descriptionstring giving the input file's purposeyesnoneInput and output file declarations
input.pathstore path of the input file, such as paper.mdyesnoneInput and output file declarations
outputfile declaration map of path and descriptionnononeInput and output file declarations
output.descriptionstring giving the output file's purposeyesnoneInput and output file declarations
output.pathstore path of the output file, such as report.mdyesnoneInput and output file declarations
useslist of Pack ids or vendor/name entries, such as [web, acme/poop], each Pack id named oncenononeTools, Packs, and the uses: key
argsmap of arg name to arg declaration, each name once and matching [A-Za-z][A-Za-z0-9_-]{0,63}noone optional string arg named proseThe name grammar for role labels, arg names, and local tool aliases
args.<name>.defaultvalue whose YAML kind matches type, or null for nonenononeOptional arguments, defaults, and descriptions
args.<name>.descriptionstring, kept as writtennononeOptional arguments, defaults, and descriptions
args.<name>.optionalbooleannofalseOptional arguments, defaults, and descriptions
args.<name>.typestring, boolean, integer, or numberyesnoneArgument types
modelsmap of role label to role declaration, each label once and matching [A-Za-z][A-Za-z0-9_-]{0,63}nononeThe name grammar for role labels, arg names, and local tool aliases
models.<label>.descriptionfree prose, kept as writtennothe bound model's own descriptionDeclaring roles under models:
models.<label>.keywordslist from hard thinking, no-thinking and soft frontier, fast, small, creative, chatnoempty listDeclaring roles under models:
models.<label>.min_contextwhole number of tokens from 1 to 4294967295nononeDeclaring roles under models:

Lua globals and members

Every global, function, field, and error kind a Lua block can use, plus the standard names the sandbox removes or never loads.

NameKindSummaryTaught in
_GglobalThe global tableThe sandbox
_VERSIONglobalHolds the Lua version stringThe sandbox
argsglobalHolds the run's exact argument string, never parsed or trimmedThe argument string in args
argvglobalParsed argument string; writable only in the H1 pass, frozen elsewhereArguments at a glance
assertfunctionChecks a condition, raising its message when falseRaising and catching errors
callfunctionRuns a contained chain at target; optional input string replaces argsJump and call at a glance
collectgarbageremovedReads nil; no garbage collector controlThe sandbox
compactorsglobalTable of shipped compactor policies, holding fail and clearCompactors and context exhaustion
compactors.clearfunctionRemoves every record from messages, keeping the rendered tool list; works only inside a compactorcompactors.clear
compactors.failfunctionDefault compactor; always raises context_exhausted with the reason it is given, any stringcompactors.fail
coroutineremovedReads nil; no creating coroutines or yielding on your ownThe sandbox
debugnot loadedNever loaded; no stack frame, local, or hook inspectionThe sandbox
dofileremovedReads nil; no running a Lua file from diskThe sandbox
err.anchorfieldAnchor text passed to a failed store.str_replaceEditing, deleting, and checking files
err.countfieldTimes the anchor matched: 0 absent, 2 or more ambiguousEditing, deleting, and checking files
err.finish_reasonfieldEmpty round's finish reason, such as stop or length; nil if unreportedEmpty replies and finish reasons
err.kindfieldLowercase error kind string, one of thirteen, to branch onError values
err.messagefieldMessage text; tostring(err) and .. give the same textError values
err.pathfieldPath or pattern as passed; not_a_directory may name the blocking fileWhen a store call fails
err.reasonfieldStore tag such as not_found, or a context_exhausted reason such as precheck or providerWhen a store call fails
err.rulefieldBroken rule's snake_case tag, such as traversal or wildcardStore paths
err.taskfieldTask id on task_not_owned, task_consumed, and a cancelled task's errorCancelling and listing tasks
err.tasksfieldOn tasks_live, leaked task ids in spawn order joined by , Ownership, leaked tasks, and abandonment
err.valid_up_tofieldByte offset where valid UTF-8 ends, on a not_utf8 failureWriting and reading files
errorfunctionRaises a string or table and stops the current blockRaising and catching errors
getfenvremovedReads nil; no function environmentsThe sandbox
getmetatablefunctionReads a metatable, as in stock Lua on values other than _GThe sandbox
handle.capabilitiesfieldRole's keywords, a sequence of kebab-case strings in declaration orderModel handles
handle.contextfieldBound model's context window in tokens, a positive integerModel handles
handle.descriptionfieldRole's description:, or the bound model's catalog descriptionModel handles
handle.labelfieldRole label or raw model id, the same string as handle.nameModel handles
handle.max_tokensfieldmax_tokens option from models.use, or nilModel handles
handle.model_idfieldName part of the bound model's model idModel handles
handle.namefieldRole label, or the raw model id, as a stringModel handles
handle.providerfieldProvider id the model catalog records, or nilModel handles
handle.temperaturefieldtemperature option from models.use, or nilModel handles
handle.thinkingfieldtrue for thinking, false for no-thinking, nil for neitherModel handles
handle:infermethodRuns one round on the handle's model and returns the replyModel handles
handle:loopmethodRuns the section's messages on the handle's model, optional compactor; returns nilHow the loop runs
input.askfunctionReturns the operator's next message as typed; needs user-input declaredAsking the operator
ionot loadedNever loaded; no file or stream I/OThe sandbox
ipairsfunctionWalks an array table in orderThe sandbox
itemglobalThe member a fanout arm runs for, or a task's item seedWhat an arm sees
jsonglobalTable of JSON helpers: encode, encode_lines, decode, decode_lines, null, arrayEncoding and decoding JSON with json
json.arrayfunctionMarks a table as a list, or returns a new empty one, so an empty list encodes as []Keeping empty lists with json.array
json.decodefunctionReturns the Lua value of one JSON document; lists come back marked, nulls as json.nullDecoding JSON text with json.decode
json.decode_linesfunctionReturns a marked list of every JSON value in a text, such as a JSON Lines fileJSON Lines with json.encode_lines and json.decode_lines
json.encodefunctionReturns compact one-line JSON with sorted keys; { debug = true } writes a placeholder in place of each value that is not JSON dataEncoding values with json.encode
json.encode_linesfunctionEncodes each list item as one line, each followed by a newlineJSON Lines with json.encode_lines and json.decode_lines
json.nullfieldTruthy userdata standing for JSON null; test with v == json.nullNull values and json.null
jumpfunctionEnds the block and moves the walk to another sectionJumping to a section
kind = "cancelled"error kindCancelled task delivered by a wait, or a stopped run or callCancelling and listing tasks
kind = "context_exhausted"error kindConversation overflows the context window and compaction does not make it fit, or compactors.fail raisesCompactors and context exhaustion
kind = "empty_model_reply"error kindNo text or tool calls, except an empty stop after tool callsEmpty replies and finish reasons
kind = "internal"error kindA failure the prompt cannot fix, such as a transport failureError kinds in Lua and the run error they become
kind = "lua"error kindAn authoring or runtime failure, such as a compile or argument errorError values
kind = "out_of_scope_tool"error kindModel calls a tool outside the scope, raised at models.loopTool errors
kind = "store"error kindAny failure the store itself reports for an operationWhen a store call fails
kind = "task_consumed"error kindA wait names a task whose result is already deliveredWaiting with tasks.join_any and tasks.join
kind = "task_not_owned"error kindA task operation names an unowned task or an unknown idOwnership, leaked tasks, and abandonment
kind = "tasks_live"error kindA chain ends normally while an author task it spawned is liveOwnership, leaked tasks, and abandonment
kind = "tool"error kindA bound tool fails on a script tools.call, invalid structured JSON includedTool errors
kind = "tool_loop_exhausted"error kindLoop reaches the round cap without a final replyTool rounds and the round cap
kind = "unbound_tool"error kindA script tools.call names no bound tool, or a task built-inTool errors
loadremovedReads nil; no compiling a string into a functionThe sandbox
loadfileremovedReads nil; no loading a Lua file from diskThe sandbox
loadstringremovedReads nil; no loading code from a stringThe sandbox
logfunctionRecords one single-line checkpoint of at most 256 charactersLogging and lifecycle reports
mathglobalStandard math library, as in Lua 5.5The sandbox
messagesglobalThe section's conversation, a message list created empty at each section entry; cannot be reassignedmessages is the section's conversation
#messagesmethodNumber of records in the message listReading records
messages:appendmethodAppends a record table that names its own role, with optional meta; returns the listBuilding a message list
messages:assistantmethodAppends an assistant record, optional tool_calls then meta; returns the listBuilding a message list
messages:replacemethodInside a compactor only, replaces records first through last with new records; returns the listEditing a list with replace
messages:systemmethodAppends a system record, optional meta; returns the listBuilding a message list
messages:toolmethodAppends a tool record answering a tool_call_id, optional meta; returns the listBuilding a message list
messages:usermethodAppends a user record, optional meta; returns the listBuilding a message list
messages[i]fieldRead-only view of record i, or nil past the endReading records
modelsglobalTable that selects model roles by label and runs roundsModel roles instead of models
models.compactfunctionRuns compactor(reason) once over messages outside any loop, checking the structural rules; returns nilCompacting on demand with models.compact
models.defaultfunctionSets the prompt-wide default role and returns its handleThe prompt-wide default with models.default
models.getfunctionReturns a handle for a role label or raw model idGetting handles with models.get
models.inferfunctionRuns one round on the section's model and returns the replyRunning a round with models.infer
models.loopfunctionRuns the section's messages to a final reply, appending records, optional compactor; its first round fixes the section's tool list; returns nilStarting a conversation
models.usefunctionSelects a role for the current section and returns its handleSelecting a role per section with models.use
models.use (max_tokens)optionResponse token limit, a whole number from 1 to 4294967295Sampling options on models.use
models.use (temperature)optionSampling temperature, a finite number from 0.0 to 2.0Sampling options on models.use
nextfunctionSteps through keys in the same fixed order as pairsDeterministic table iteration
osnot loadedNever loaded; no os.time, os.clock, os.getenv, or os.executeThe sandbox
packagenot loadedNever loaded; no package.path, package.loaded, or search pathsThe sandbox
pairsfunctionVisits keys in a fixed sorted order on every runDeterministic table iteration
pairs(messages)methodVisits each record in order with its 1-based positionReading records
pcallfunctionCatches errors, suspending calls included; Engine failures arrive as error valuesRaising and catching errors
pack.namefieldThe Pack's Pack id as a stringTool objects and Pack objects
pack.toolsfieldArray of the Pack's Tool objects in tool id orderTool objects and Pack objects
packsglobalTable of read-only Pack objects with required, extras, get, offerTool objects and Pack objects
packs.extrasfunctionPack objects for the undeclared runvil Packs the run knows, sorted by nameTool objects and Pack objects
packs.getfunctionReads one Pack object by Pack id, required or extraTool objects and Pack objects
packs.offerfunctionOffers every tool of a Pack given by id, object, or list; raises after the first loop round renders the tool listOffering tools with tools.offer and packs.offer
packs.requiredfunctionPack objects of the declared Packs, sorted by nameTool objects and Pack objects
printremovedReads nil; log is the output path insteadThe sandbox
promptglobalTable holding prompt.section and prompt.listReading sections with prompt.section and prompt.list
prompt.listfunctionReturns a visible list section's items as strings, or nilReading sections with prompt.section and prompt.list
prompt.sectionfunctionReturns a visible section's own raw Markdown body, or nilReading sections with prompt.section and prompt.list
proseglobalRead-only pending prose above the block, placeholders renderedPending prose and the prose global
rawequalremovedReads nil; no raw table accessThe sandbox
rawgetremovedReads nil; no raw table accessThe sandbox
rawlenremovedReads nil; no raw table accessThe sandbox
rawsetremovedReads nil; no raw table accessThe sandbox
record.contentfieldRecord's text, or a non-empty array of content partsMessage records
record.metafieldRecord's metadata, any JSON data up to 8192 bytes, never sent to the model; nil when absentRecord metadata with meta
record.rolefieldMessage role: system, user, assistant, or toolMessage records
record.tool_call_idfieldOn a tool record, the id of the call it answersMessage records
record.tool_callsfieldAssistant's tool calls, each with id, name, and argumentsMessage records
requirefunctionLoads a section's Lua as a library; replaces stock Lua requireSharing code with require
result.exhaustedfieldtrue only when the arm's models.loop hits the round capReading the results
result.itemfieldThe member the arm runs on, keeping its Lua typeReading the results
result.okfieldtrue when the arm completes normally, false at the round capReading the results
result.textfieldArm's text or ''; a capped arm gets the UNKNOWN exhausted stubReading the results
selectfunctionselect(n, ...) as in standard Lua 5.5The sandbox
setfenvremovedReads nil; no function environmentsThe sandbox
setmetatablefunctionSets a metatable; refuses finalizers and weak globalsThe sandbox
status.blockedfieldWhat the task waits on: chat, tool_call, store, tasks, call, queuedChecking on a task with tasks.status, tasks.ready, and tasks.note
status.depthfieldThe task chain's call depth, 1 when spawned from the main walkChecking on a task with tasks.status, tasks.ready, and tasks.note
status.notefieldThe task's latest progress note from tasks.noteChecking on a task with tasks.status, tasks.ready, and tasks.note
status.okfieldtrue or false once the task ends, nil while it runsChecking on a task with tasks.status, tasks.ready, and tasks.note
status.originfieldWho starts the task: author or modelChecking on a task with tasks.status, tasks.ready, and tasks.note
status.sectionfieldThe section the live task is in nowChecking on a task with tasks.status, tasks.ready, and tasks.note
status.statefieldTask state: running, done, cancelled, or abandonedChecking on a task with tasks.status, tasks.ready, and tasks.note
status.targetfieldSection name the task's chain starts at, without # marksChecking on a task with tasks.status, tasks.ready, and tasks.note
status.tasksfieldId strings of its own live tasks, in spawn orderChecking on a task with tasks.status, tasks.ready, and tasks.note
status.turnsfieldCount of finished model roundsChecking on a task with tasks.status, tasks.ready, and tasks.note
storeglobalTable of store operations, present in every Lua blockWhat the store is
store.appendfunctionAdds text to a file's end, creating it if absent; returns nilWriting and reading files
store.deletefunctionRemoves a file or empty directory; returns nil, even when absentEditing, deleting, and checking files
store.existsfunctionReturns whether anything exists at a pathEditing, deleting, and checking files
store.globfunctionReturns a sorted array of store paths matching a wildcard patternFinding files with store.glob
store.readfunctionReturns a file's text, or lines start through endWriting and reading files
store.read_numberedfunctionReturns a file's lines as N| text, optionally a line rangeReading line ranges and numbered lines
store.str_replacefunctionReplaces the single anchor old with new and returns nilEditing, deleting, and checking files
store.writefunctionCreates or replaces a file with a text string and returns nilWriting and reading files
stringglobalStandard string library, including method calls such as s:matchThe sandbox
sysglobalRead-only table of run factsRun facts in sys and ui
sys.executionfieldThe run's name, which the Harness assignsRun facts in sys and ui
sys.idfieldCurrent section entry id, such as 0.1Section entry ids
sys.indexfieldAn arm's 1-based position in collection order, or a task's index seedWhat an arm sees
sys.modelfieldBound model's catalog id, readable after the section's first tool callRun facts in sys and ui
sys.section_countfieldNumber of top-level sections in the promptRun facts in sys and ui
sys.section_namefieldRunning section's name; the H1 title in the H1 passRun facts in sys and ui
sys.taskidfieldNearest enclosing task's id, '0' on the main walkRun facts in sys and ui
sys.whenfieldRun start instant as an RFC 3339 UTC stringRun facts in sys and ui
tableglobalStandard table library, as in Lua 5.5The sandbox
table.concatfunctionJoins strings, numbers, and __tostring values with a separatorThe sandbox
tasksglobalTable holding every task function, fanout includedStarting a task with tasks.spawn
tasks.cancelfunctionEnds a task the caller owns and returns nothingCancelling and listing tasks
tasks.concurrencyfunctionSets or reads the chain's concurrency limit, returning the effective limitConcurrency and the admission window
tasks.fanoutfunctionRuns a worker section once per member, results in collection orderFanout in one call
tasks.joinfunctionWaits for all tasks; returns { task, ok, result } entries, then timed_outWaiting with tasks.join_any and tasks.join
tasks.join_anyfunctionWaits for the first task to end; returns handle, ok, resultWaiting with tasks.join_any and tasks.join
tasks.join_any (timeout)optionWait limit in seconds, also on tasks.join; never cancels tasksTime limits on waits
tasks.notefunctionPublishes the caller's own task's latest progress noteChecking on a task with tasks.status, tasks.ready, and tasks.note
tasks.pendingfunctionLists the caller's live task handles in spawn orderCancelling and listing tasks
tasks.pending (origin)optionFilters the list to author or model tasksCancelling and listing tasks
tasks.readyfunctionChecks without waiting whether a task has endedChecking on a task with tasks.status, tasks.ready, and tasks.note
tasks.spawnfunctionStarts a section as a task, returns handle { task = id } at onceStarting a task with tasks.spawn
tasks.spawn (index)optionInteger of 0 or more that becomes the task's sys.indexStarting a task with tasks.spawn
tasks.spawn (input)optionString that replaces the task's args, re-deriving argvStarting a task with tasks.spawn
tasks.spawn (item)optionJSON data that becomes the task's item and {{ item }} seedStarting a task with tasks.spawn
tasks.statusfunctionReturns a task's status as a plain tableChecking on a task with tasks.status, tasks.ready, and tasks.note
tonumberfunctionTurns a value such as a numeric string into a numberThe sandbox
tool.descriptionfieldThe tool's description text from the tool catalogTool objects and Pack objects
tool.idfieldThe tool's canonical tool id, such as web/searchTool objects and Pack objects
tool.packfieldPack object of the Pack named by the tool idTool objects and Pack objects
toolsglobalTable holding every tool operationTools, Packs, and the uses: key
tools.allow_tasksfunctionLets the section's model start tasks, optionally on listed headingsTool scope and the task built-ins
tools.callfunctionCalls a tool from Lua and returns its outputCalling tools from Lua and counting calls
tools.callsfieldRead-only per-section call counts keyed by tool id or aliasCalling tools from Lua and counting calls
tools.extrasfunctionTool objects of offered tools from undeclared runvil Packs, in id orderTool objects and Pack objects
tools.getfunctionReads one Tool object by tool idTool objects and Pack objects
tools.offerfunctionPuts catalog tools in the section's tool scope; raises after the first loop round renders the tool listOffering tools with tools.offer and packs.offer
tools.offer_localfunctionDefines a local tool from an alias, description, params, and handler; raises after the first loop round renders the tool listDefining local tools with tools.offer_local
tools.requiredfunctionTool objects of offered tools from declared Packs, in id orderTool objects and Pack objects
tostringfunctionTurns a value such as a number into textThe sandbox
typefunctionReturns a value's Lua type name, such as 'table'The sandbox
uifunctionReturns the Host's run-start snapshot table, when the run has oneRun facts in sys and ui
untrustedfunctionWraps a string in the run's untrusted envelope and returns itHanding store text to a model with untrusted
varglobalGuarded table of JSON data that passes between sectionsKeeping state in var
warnremovedReads nil; no Lua warningsThe sandbox
xpcallfunctionLike pcall, with a message handler that sees the failure firstRaising and catching errors

Substitution forms

Each form goes in a section's prose and takes effect when a Lua block reads prose.

FormInsertsTaught in
\\A single literal \Escapes and literal braces
\{{A literal {{, starting no placeholderEscapes and literal braces
\}}A literal }}Escapes and literal braces
{{ args }}The raw argument string, exactly as passedInserting arguments with args and argv
{{ argv }}The whole parsed arguments, with an object or array as compact JSONInserting arguments with args and argv
{{ argv.key }}One field of the parsed arguments, at any depthInserting arguments with args and argv
{{ item }}The item seeded into a fanout arm or a task, rendered by its typeInserting the fanout or task item
{{ name }}The whole value of the section-local Lua global by that nameInserting Lua globals by bare name
{{ path }}A live value from the run, named by the trimmed pathPlaceholders in prose
{{ prose }}Rejected as recursive, so the prose read fails with substitution kind SerializeSubstitution error kinds
{{ sys.key }}A field of sys, such as sys.id or sys.whenInserting var and sys values
{{ var.key }}The current value of that field of varInserting var and sys values

Pack tools

Each Pack tool comes from a Pack you declare under uses: by its Pack id, web or user-input, while Provided by gives the fully qualified name of the Pack, which a Host's Plugin adds, and the Engine offers the four task built-ins to the model in each round after a section calls tools.allow_tasks.

ToolProvided byArgumentsReturnsTaught in
await_tasksEngine built-intimeout (no time limit when omitted; non-negative seconds)The notice of each model task that ended, one per lineawait_tasks and task notices
taskEngine built-intarget (required heading reference); input (no argument override when omitted)Task id={id} startedGiving the model task tools
task_cancelEngine built-inid (required task id string)Task id={id} cancelledThe model's task_status and task_cancel
task_statusEngine built-inid (required task id string)One status line, such as Task id=0.0 (## Child): done, ok, turns 0The model's task_status and task_cancel
user-input/askrunvil/user-inputnoneThe operator's next message as trusted plain textAsking the operator
web/fetchrunvil/weburl (required); max_chars (default 40,000; 1 to 40,000); raw (default false)Untrusted text: a url:, truncated:, and extraction: header, a blank line, then the pageFetching a page
web/searchrunvil/webquery (required; 1 to 400 characters, not only whitespace); count (search provider default; 1 to 20); freshness (pd, pw, pm, or py); country (not blank, at most 128 characters); search_lang (not blank, at most 128 characters); safesearch (off, moderate, or strict); include_domains (default empty; at most 20 bare hostnames); exclude_domains (default empty; at most 20 bare hostnames)Untrusted compact JSON of query and results, each with title, url, and descriptionSearching the web

Limits and defaults

Each row gives a limit, its default, and who can change it, and the Pack tools table holds the Pack tool limits.

LimitDefaultSet byTaught in
concurrency8 tasks at onceHarnessRun limits and their defaults
json nesting limit127 levels of nested tables, arrays, and objects, on encode and decodefixedSize and nesting limits
json.decode input cap8,388,608 bytes per json.decode or json.decode_lines callfixedSize and nesting limits
json.encode key limit100,000 keys that are not numbers or booleans on one path, per json.encode or json.encode_lines callfixedSize and nesting limits
json.encode size budgetOne eighth of lua_memory_bytes in values and lua_memory_bytes in bytes of text per json.encode, json.encode_lines, or var write, so 8,388,608 values and 67,108,864 bytes by defaultHarness, through lua_memory_bytesSize and nesting limits
log byte quota256 bytes per allowed log event, 262,144 bytes by defaultHarnessLogging and lifecycle reports
log message limit256 Unicode charactersfixedLogging and lifecycle reports
lua_log_events1024 log events per section VMHarnessLua memory and log quotas
lua_memory_bytes64 MiB per section VMHarnessLua memory and log quotas
max_response_bytes16 MiB per model replyHarnessRun limits and their defaults
max_tool_iterations24 model rounds per loop call unless the Harness sets anotherfrontmatterRun limits and their defaults
output reservemax_tokens, else one eighth of the window up to 8192 tokens, at most half the windowfixedThe context precheck
recursion depth cap8 nested levels, counting each call, task, and fanout armfixedThe recursion depth cap
request_timeout120 seconds per wait for the next part of a model replyHarnessRun limits and their defaults

Parse error kinds

Each parse failure has one parse error kind, the four fence rules say what a Fence failure can break, and the location fields say which prompt failed and where.

NameTypeMeaningTaught in
Closerfence rulea closing line after an exact lua opener that is not exactly three backticksExact fence rules and fence errors
columnlocation fieldthe 1-based column of the mistake, read with the lineWhere an error points
Fenceparse error kinda lua fence left open, or a break of the Label, Opener, Closer, or Lookalike ruleParse errors and their kinds
Frontmatterparse error kindfrontmatter missing, unclosed, or not valid YAML, or a key or value the contract rejectsParse errors and their kinds
Internalparse error kindthe parser fails through no fault of the prompt, such as a Lua compiler that cannot startParse errors and their kinds
Labelfence rulea fence label that starts with lua in any letter case but is not exactly luaExact fence rules and fence errors
linelocation fieldthe 1-based line in the prompt file as writtenWhere an error points
Listparse error kinda list section item that is a marker with no text after itParse errors and their kinds
Lookalikefence rulea line outside every fence that looks like a lua opening lineExact fence rules and fence errors
Luaparse error kinda Lua block that does not compile because of a syntax errorParse errors and their kinds
namelocation fieldthe prompt's frontmatter name, on a Structure, Fence, or List failure after the frontmatterWhere an error points
Openerfence rulea lua fence whose opening line is not exactly three backticks then luaExact fence rules and fence errors
spanlocation fieldthe byte range of the offending region in the body after the frontmatter, when the failure can locate itWhere an error points
Structureparse error kindan invalid H1 title or heading tree, such as two sibling sections with one nameParse errors and their kinds

Run error kinds

A failed run reports exactly one run error kind, and a failed {{ }} placeholder names its substitution kind in its message.

NameTypeMeaningTaught in
BadPathsubstitution kind{{ var }} or {{ sys }} written with no keySubstitution error kinds
Bindingrun error kindmodels.infer or models.loop runs with neither models.use nor models.default in effect; a tool whose parameter schema is not a JSON object is left out of the offering insteadInfer errors and the missing-model error
Cancelledrun error kindnever reported; a run the Host cancels ends with the cancelled outcome, not a failureRun error kinds
Completionrun error kinda model call fails at the transport, backend, or decode layer, or an empty_model_reply goes uncaughtRun error kinds
ContextExhaustedrun error kinda request overflows the model's context window and the selected compactor leaves it over, or a direct compactors.fail call goes uncaughtCompactors and context exhaustion
Determinismrun error kinda store call meets a claims conflict, which no pcall catchesRaces, claims, and determinism
EmptySegmentsubstitution kindan empty or space-padded path segment, as in {{ var. }} or {{ }}Substitution error kinds
Internalrun error kindan Engine invariant breaks, a fault in the Engine rather than the promptRun error kinds
Luarun error kindan uncaught runtime error or {{ }} failure, running past the memory ceiling, a block that returns a table, a Pack prelude that cannot install, or a task fault: a leaked task, a task its chain does not own, a result waited on twice, or a cancelled task's error raised again right after its waitLua blocks, section VMs, and Engine globals
MissingKeysubstitution kindan absent key under var, sys, argv, or a global, as in {{ sys.bogus }}, or a path that continues past a scalar or aims at an array elementInserting var and sys values
NilArgvsubstitution kindany argv placeholder while argv is nil, as when the argument string is not JSONInserting arguments with args and argv
NilItemsubstitution kind{{ item }} where no item is seeded, such as in a walked sectionInserting the fanout or task item
NotATablesubstitution kinda dotted path after args or item, as in {{ args.x }}Inserting arguments with args and argv
NullValuesubstitution kinda path that lands on JSON null, under every root except itemSubstitution error kinds
Parserun error kindthe frontmatter or the body's structure fails to parse, a Lua block does not compile, or the runvil: key is missingRun error kinds
Quotarun error kinda block runs out its log event or byte quota, or a call, tasks.spawn, or tasks.fanout arm nests past the call depth capThe recursion depth cap
RequirementsUnmetrun error kindthe environment falls short of a requirement the prompt states, or an H1 block fails the hard gatePreparing the run
Serializesubstitution kinda bare global that is not JSON data, and {{ prose }}Inserting Lua globals by bare name
Substitutionrun error kindnever reported; an uncaught substitution failure ends as Lua, or as RequirementsUnmet in the H1 passCatching and reading substitution errors
Toolrun error kinda dispatched tool fails, the model calls a tool outside its round's scope, a tools.call names no tool bound in the run, or models.loop reaches its round capTool rounds and the round cap
Unclosedsubstitution kinda {{ with no }} anywhere later in the proseSubstitution error kinds
UnknownNamespacesubstitution kinda first segment that is neither a root nor a set global, as in {{ ghost }}Inserting Lua globals by bare name
Versionrun error kindthe runvil: key declares a major version other than 0The runvil version key
Vfsrun error kindan uncaught store failure, a run that declares no store, or a store backend that fails as the run startsWhen a store call fails