Dynamic workflows
Dynamic workflows let Roder coordinate larger jobs without stuffing every child-agent detail into the lead conversation. A workflow is a generated, built-in, user, workspace, or extension-provided script that drafts phases, estimates child-agent cost, requests approval, and then runs bounded agents through the normal runtime.
workflows/*. The older singular workflow/* methods still describe imported workflow files and should not be treated as the same protocol surface.How workflows start
- A substantive prompt that includes
workflowcan trigger a planning hint in the TUI. - Saved
.workflow.jsfiles can live in.agents/workflows/or~/.roder/workflows/. - The built-in
/deep-researchcommand runs through the same dynamic workflow runner. - Clients can call
workflows/planand thenworkflows/approve. /effort ultracodecan opt into automatic workflow planning when configured.
Approval and safety
First runs show the planned phases, child-agent estimate, scope, limits, and script preview before execution. Approval decisions are runOnce,alwaysForScriptAndWorkspace, or deny.
Workflow scripts run inside a constrained JavaScript host. They can use workflow APIs such as ctx.agents, ctx.phase, ctx.checkpoint, and ctx.report, but direct filesystem, shell, network, secret, module, and MCP access stays outside the script. Child agents perform actual work through the same Roder policy and tool gates as any other turn.
Runtime controls
The TUI command /workflows and the app-server protocol expose list, inspect, pause, resume, stop, restart-agent, save, and script-management operations. Run summaries carry status, phase counts, child-agent counts, failures, concurrency peak, elapsed time, token usage when available, and report previews.
{"jsonrpc":"2.0","id":1,"method":"workflows/plan","params":{"threadId":"THREAD_ID","prompt":"workflow: audit auth changes"}}
{"jsonrpc":"2.0","id":2,"method":"workflows/approve","params":{"runId":"RUN_ID","decision":"runOnce"}}
{"jsonrpc":"2.0","id":3,"method":"workflows/list","params":{"limit":10}}
{"jsonrpc":"2.0","id":4,"method":"workflows/get","params":{"runId":"RUN_ID","includeAgents":true}}Configuration
[dynamic_workflows]
enabled = true
trigger_word_enabled = true
auto_with_ultracode = true
max_concurrent_agents = 16
max_agents_per_run = 1000
workspace_workflows_dir = ".agents/workflows"
user_workflows_dir = "~/.roder/workflows"
[dynamic_workflows.approval]
require_approval = true
allow_always_for_script_and_workspace = trueLive provider and live web-search checks remain explicit. Normal workflow tests and fixtures are offline unless RODER_DYNAMIC_WORKFLOWS_LIVE orRODER_DEEP_RESEARCH_LIVE is set.