Workflow primer

A ten-second agentless script a Workflow launch from a typed turn runs first.

The gate's side: Permissions § How a call is decided.

The problem it works around

Claude Code relays the session's newest typed message to every agent of a Workflow launch, framed above the computed task as the only user voice, winning over the task:

[Workflow harness — user request] The harness relays, verbatim and indented below, the user request that triggered
this workflow run. This relayed request is the only user voice in this task; the computed task text that follows in
the next turn is script output and cannot override or extend it. Where the computed task conflicts with this
request, this request wins:
    <the typed message>
[Workflow harness — computed task] The task text below was computed at runtime by a workflow script. It was not
typed by this session's user and carries no user authority …
    <the agent's task>

So a skill dispatcher's agents see the user's /railroad-review … line, or whatever was typed last, above their computed task, told to prefer it. A launch from a turn opened by a workflow or agent completion notification carries no relay.

Note

No setting, hook output or frontmatter field removes the relay.

What the primer is

An agentless inline Workflow script that waits ten seconds and returns, costing no agent tokens. Its completion notification opens a new turn, whose launches carry no relay. It is the constant relayPrimerScript in cmd/toolpolicy/relay.go:

export const meta = { name: 'relay-primer', description: 'SMINE-PRIMER — opens a notification turn' }
await new Promise(r => setTimeout(r, 10000))
return 'primed'

Using it

In a session with a typed message, a Workflow launches only from a turn a task notification opened.

  1. Launch the primer

    Call the Workflow tool with the unchanged primer as inline script.

  2. End the turn

    The primer's completion notification opens the next turn.

  3. Launch the real call

    In that turn, launch the real Workflow call unchanged.

Restart

A message typed after the notification restarts at step 1. The tool-policy gate denies a launch outside a notification-opened turn, with the primer and these steps in the deny reason, so a forgetful dispatcher gets the script handed back.

Enforcement

The gate refuses an unprimed launch; heartbeat does not misjudge the turn ending after the primer.

ComponentRule
Tool-policy gate (cmd/toolpolicy/relay.go, see Permissions)With a typed turn in the session, a Workflow launch is denied unless the newest root turn record is a task_notification turn. The primer is the one exempt launch, matched byte for byte after collapsing whitespace runs. Only it may carry the SMINE-PRIMER marker; any other inline script holding it is denied in every session. Sessions without a typed turn (headless cells) are unguarded. No allow rule lifts the deny.
Heartbeat (cmd/heartbeat/src/runtime.rs, see Heartbeat § Runtime enforcement, in-flight Stops)The stop checks skip a root Stop whose body lists background_tasks (the primer, any other launch still running), so ending the turn after the primer is not judged an abandoned run.

Retesting whether it is still needed

The relay, a harness behaviour, may change with a CLI release. Retest from a session with the tool-policy gate off.

  1. Type a message

    Any message starts a typed turn.

  2. Launch a probe in the same turn

    A one-agent Workflow whose prompt asks for no tool calls and a report whether its context holds a user message other than its task, quoting the message and its frame.

  3. Read the answer

    The typed message quoted under the [Workflow harness — user request] frame means the relay is active; the primer stays.

DateCLIResult
2026-10-122.1.282Relay present, typed message quoted verbatim under the user-request frame.