Skip to content

agent.command.v1

Compose an agent command line

Returns the command line that starts the named agent the way this person runs it, ready for terminal.open.v1. Give it a prompt to open the agent on that work, or a session to continue: the agent that recorded a session resumes it the provider's own way, and any other agent is handed a prompt naming the session's transcript so it reads the content itself. It starts nothing and writes nothing.

At a glance

Callable byagent, cli, plugin
Effectread — Reads state and changes nothing.
Confirmationnever — Runs without asking.
Idempotencynone
Leaves the machineno
Provided bydev.tenon.core
Contract classsealed

Input

PropertyRequiredTypeConstraints
agentyesstringlength 1–64
includeUserOptionsnoboolean
promptnostringlength 0–32768
sessionno{agent, sessionID, transcriptPath?}

Output

PropertyRequiredTypeConstraints
agentyesstringlength 1–64
argumentsyesstring[]items 0–64
commandLineyesstringlength 0–49152
handoffyesboolean

Errors it can return

These are this contract’s own failures, on top of the lifecycle errors every intent can settle with. See Errors.

  • dev.tenon.core.agent-handoff-unresolved
  • dev.tenon.core.agent-unavailable

Call it

From a plugin — declare it in intents.uses first:

js
const result = await tenon.intents.send("agent.command.v1", {})
if (!result.ok) throw new Error(result.error.code)

From a shell:

sh
tenon-cli intent send agent.command.v1 --input '{}'

Ask your own build for this same contract with tenon-cli intent describe agent.command.v1.