Skip to content

Variables & Special Strings

fuseraft fills in placeholders at two moments, and each kind has its own spelling, so you can always tell which is which:

Spelling Filled in By Example
{{name}} once, when the file is written fuseraft init, from a template modelId: "{{model}}"
{name} every run the runtime ~/.fuseraft/sessions/{project_slug}/{session_id}/brief.json
${NAME} every run the runtime, from the environment Authorization: Bearer ${GITHUB_TOKEN}

A team file that fuseraft init wrote has no {{…}} left in it. If fuseraft validate finds one, the file was copied out of a template instead of generated from it.


These exist only in template files. fuseraft init replaces them in every file it writes, then checks that the result loads. See Templates for how to write one.

Every template has these:

Variable Value Set with
{{model}} The model ID. Defaults to the model saved in ~/.fuseraft/config, else a default for the first provider whose API key is in the environment. --model, or the wizard
{{endpoint}} The provider URL. Defaults to the endpoint saved in ~/.fuseraft/config, and is often empty. --endpoint, or the wizard
{{project}} The name of the current directory. --var project=…

A template adds its own in template.yaml:

variables:
testCommand:
description: Command that runs the tests
default: npm test
ticket:
description: Ticket the work is for # no default: required

Set them with --var testCommand="pytest -q" --var ticket=SHOP-12. The wizard asks for any you don’t pass. A variable without a default is required: --no-interactive fails without it.

Rule What happens
{{name}} or {{ name }} Replaced with the value. Names ignore case: {{Model}} is {{model}}.
A line that uses a variable with no value The whole line is left out. endpoint: "{{endpoint}}" disappears when no endpoint is set.
A name the template doesn’t know An error naming the file and line. A typo never reaches a team file.
\{{ A literal {{. Write \{{ user.name }} to get {{ user.name }}.
Braces holding anything other than a name Left alone. {{.Dir}} (Go templates), {{#each}} and { x } pass through unchanged.
A value with a line break An error. A variable fills one line.

Put quotes around a variable that starts a YAML value: modelId: "{{model}}". Unquoted, {{model}} reads as a YAML map, so an editor flags the template as broken before it’s rendered.

There are no conditionals, loops or includes. Like team files, templates are declarative.


fuseraft expands these at the start of every run.

Token Value
{session_id} The run’s session ID. The same ID across --resume.
{project_slug} The project’s absolute path with separators replaced by -, e.g. home-me-code-shop. Keeps each project’s runtime files apart under ~/.fuseraft/.
~/ at the start of a path Your home directory.
~/.fuseraft/ fuseraft’s home: ~/.fuseraft, or the folder in the FUSERAFT_HOME environment variable.

They’re expanded in:

  • artifacts.*.path, and so in every gate, reads and writes that names the artifact;
  • agents.*.instructions and markdown agent file bodies;
  • file: sources in an agent’s advanced.context;
  • paths under advanced: brownfield.discoveryBriefPath, brownfield.conventionProfilePath, and the chatroom, change tracking, event stream and evidence store paths.
Token Where Value
{file} advanced.testSelector.findRelatedCommand Each changed file’s path, one command per file.
{name}, {date}, {time} fuseraft schedule add --output The job name, yyyy-MM-dd and HHmm.

${NAME} takes the value of environment variable NAME when the run starts. An unset variable becomes an empty string, and fuseraft validate warns where it can. The values are never written back to disk or to logs.

They’re expanded in:

Field
mcpServers.*.url, headers, env, oauth.clientSecret in team files and in ~/.fuseraft/config
agents.*.remoteAgent.headers
security.httpAllowedHosts
advanced.apiProfiles.*.baseUrl, defaultHeaders
advanced.memory.webhook.headers

Everywhere else, ${…} is plain text. Keep secrets in these fields, never in instructions. An API key goes in the environment variable named by a model’s apiKeyEnvVar, or in the OS keychain (fuseraft keychain).


fuseraft reads an agent’s output for these. They’re the only text with a fixed meaning.

String Meaning
handoff(route_keyword: "<route>") The tool call that takes a route. A route’s name is the target agent’s name, end, or the edge’s name:. The agent’s instructions get the list of its routes in the generated Team protocol section.
A route name alone on its own line The same, for a remote agent with no tools. Markdown emphasis around it is ignored.
end The route that finishes the run. It’s taken only after its gates pass.
BLOCKED alone on its own line The agent can’t continue. The run stops at once, without a correction loop. Write what’s missing above it.
A fenced ```json {"review": [...]} block The verdict the reviewJudgement gate parses. The agent is told the exact shape.

Agents are told not to write a route name inside a sentence; the name only counts as a handoff when it stands alone on its own line.

Strings fuseraft writes into the conversation

Section titled “Strings fuseraft writes into the conversation”

You’ll see these in transcripts and fuseraft sessions output. Agents read them but never need to write them.

String Meaning
[fuseraft: A → B] A turn boundary: A handed off to B. Compaction keeps these, and routing uses them to spot stale signals.
[fuseraft: parallel merge — …] The merged result of a parallel edge.
[Task Reminder] The task, repeated at the end of a long context so it’s near the agent’s attention.
[tool result — evicted: read_file(path). Preview: "…"] An old tool result dropped to save room. The agent re-reads with a targeted range if it needs it.
[UNVERIFIED ASSUMPTION: …] A claim carried over by compaction that no tool has confirmed. Agents check it before acting on it.
REPLAN BLOCKED In a correction: a handoff back to planning was refused while a forward gate is still failing.