Skip to content
pando/ docs

Delegation and Mesnada Configuration

Keys of the Mesnada orchestrator and of delegated-task handling, plus the tools the agent uses to delegate. For the idea, read Agent delegation; for the walkthrough, the guide Delegate to subagents with Mesnada.

Web UI: Settings > Mesnada (server, orchestrator, ACP) and Settings > General > Subagent Delegation.

Mesnada settings

Orchestrator

[Mesnada]
Enabled = true

[Mesnada.Server]
Host = 'localhost'
Port = 5005

[Mesnada.Orchestrator]
StorePath        = './.pando/mesnada/tasks.json'
LogDir           = './.pando/mesnada/logs'
EnginesDir       = ''        # defaults to <dirname(LogDir)>/engines
MaxParallel      = 5         # tasks in flight at once; 0 = unlimited
MaxPerEngine     = 0         # per-engine cap; 0 = unlimited
ClaimTTL         = '2m'      # how long a dispatch reservation lasts
DispatchInterval = '10s'     # how often deferred tasks are started
DefaultEngine    = 'pando'
DefaultModel     = ''
PersonaPath      = ''
KeyWeb UI labelDescription
MaxParallelMax parallel / Max parallel tasksTasks over the cap wait and start as slots free up
MaxPerEngineMax tasks per engine (0 = no limit)Keeps one engine from using every slot
ClaimTTLDispatch claim TTLA reservation that expires without the task starting is reclaimed
DispatchIntervalDispatch intervalGo duration string
DefaultEngineDefault enginepando, claude, copilot, openai, google, ollama or a custom engine
DefaultModelDefault modelUsed when a task names none
PersonaPathPersona pathFolder with persona files

Custom engines

Place *.template.yaml files in EnginesDir. Each template specifies command, args (with Go template expressions), prompt mode, output format and available models. Custom engines appear dynamically in the mesnada_spawn_agent tool.

Delegation

Subagent delegation settings
[Mesnada.Delegation]
Enabled             = true
InjectIntoLiveLoop  = true
ResurrectIdleLoop   = true
SynthesizeFallback  = false
MaxResurrections    = 4
MaxDepth            = 3
MaxConcurrent       = 8
ResurrectionTimeout = '10m'
KeyDefaultWeb UI labelDescription
EnabledfalseDelegation EnabledCapture delegated-task conclusions and re-enter the parent agent loop
InjectIntoLiveLoopfalseInject Into Live LoopHand a conclusion to a parent that is still running
ResurrectIdleLoopfalseResurrect Idle LoopWake an idle parent session when a related task completes
SynthesizeFallbackfalseSynthesize FallbackWrite a conclusion when the subagent omits it
MaxResurrections4Max ResurrectionsWake-ups allowed per session and chain of turns
MaxDepth3Max DepthLevels of subagents of subagents
MaxConcurrent8Max ConcurrentOutstanding tasks per parent, and sessions routed to one warm instance
ResurrectionTimeout10mResurrection TimeoutHow long to wait for sibling conclusions still pending

Warm instances and other projects

Warm instance, integrity gate and circuit breaker settings
[Mesnada.Delegation]
ReuseWarmInstances       = true
AutoStartWarmInstance    = true
WarmInstanceIdleTimeout  = '10m'   # '0' or empty = never stop it
WarmQueueDepth           = 0       # 0 = start a separate process when the instance is full
AllowExternalWarmTargets = true    # caller side
AcceptDelegations        = true    # target side
KeyWeb UI labelDescription
ReuseWarmInstancesReuse Warm InstancesRoute a delegated task to the already-running instance of its project. Requires Enabled
AutoStartWarmInstanceAuto-Start Warm InstanceStart an instance for the project when none is running (off = reuse only)
WarmInstanceIdleTimeoutWarm Instance Idle Timeout (0 = never)Stop an auto-started instance after this long without delegated work
WarmQueueDepthWarm Queue Depth (0 = cold-spawn at cap)Tasks that may wait for a slot in a full instance
AllowExternalWarmTargetsAllow External Warm TargetsSend a task to an instance launched by an editor, over IPC. The target must accept delegations
AcceptDelegationsAccept DelegationsLet this instance run tasks sent by peer instances

The project parameter of mesnada_spawn_agent routes the task to the right project’s instance.

Safety nets

Durable event log and dispatch settings
KeyDefaultWeb UI labelDescription
ConclusionGateDisabledfalseConclusion integrity gate (on)The gate downgrades “success” to “partial” when the files or memory references cited do not exist
BreakerDisabledfalseCircuit breaker (on)Refuses to relaunch a task that reached the failure limit, failed on authentication or is inside a rate-limit cooldown
MaxTaskRetries3Max consecutive failuresReset by any success
RateLimitCooldown5mRate-limit cooldownWait after a rate-limit failure
RecentSuccessWindow2mRecent-success windowRe-running a task that just succeeded is refused within this window
EventLogDisabledfalseDurable event log (on)Every final task outcome is written to disk and delivered even after a restart
EventLogMaxEntries5000Event log max entriesOlder events are compacted away
BlackboardMaxEntriesPerSwarm200Size limit of a swarm’s shared notes
BlackboardTTL168hA finished swarm’s shared notes are purged after this long

Tools the agent uses

mesnada_spawn_agent launches a task:

{
  "prompt": "Analyze the authentication module and write tests",
  "subagent_type": "general",
  "description": "Write auth tests",
  "background": true
}
ParameterDescription
promptThe instruction for the spawned task
subagent_typeexplore (read-only) or general (full capabilities)
backgroundtrue to keep going without waiting, false to block until completion
projectTarget a registered project by id, name, or path
engineCLI engine: pando, copilot, claude, gemini, etc.
modelOverride the model for this task
dependenciesList of task IDs that must complete first
task_idRelaunch an existing task in-place

Dependencies, with the logs of the earlier tasks passed along:

{
  "prompt": "Write tests based on the analysis",
  "dependencies": ["T1", "T2"],
  "include_dependency_logs": true,
  "dependency_log_lines": 100
}

Waiting without blocking (recommended) uses mesnada_await; the parent agent is resumed when results arrive:

{
  "action": "wait",
  "actor_id": "explore-1"
}

Blocking until one task completes uses mesnada_wait_task:

{
  "task_id": "T1",
  "timeout": "10m"
}
ToolPurpose
mesnada_get_taskGet task details
mesnada_list_tasksList tasks with filters
mesnada_cancel_taskCancel a task
mesnada_get_task_outputGet stdout/stderr

Agent self-service (pando_setup)

The built-in pando_setup tool needs no configuration and is always available to the agent. See Agent Self-Service.

CommandPurpose
helpList available commands or get usage for a specific one
configRead the active configuration (read-only, same view as TUI/WebUI settings)
providersList configured provider accounts with types, credentials, and model counts
modelsBrowse available models with context window, pricing, and capabilities
sessionCheck last turn’s token usage and accumulated session cost
commandsList available slash commands
run <command>Activate a slash command for the current session
pando_setup models --provider anthropic --detail --limit 5
pando_setup providers
pando_setup config                           # show all config
pando_setup config --search token            # search for token-related settings
pando_setup config TokenOptimization         # show a specific section
pando_setup run /caveman lite
pando_setup session

models uses the live model registry, enriched with models.dev: canonical ID (for example copilot.gpt-5.4), context window, price per million tokens, capabilities and knowledge cutoff.

Commands the agent may run with run:

  • Mode commands: /caveman, /caveman-finish, /ponytail, /ponytail-finish, /superpowers, /superpowers-finish, /learning, /learning-finish.
  • Instruction commands: /improve-agents-md, /vulnhunt, /vulnhunter-fix, /vulnhunt-fix-verify, and custom user: and project: commands.

Blocked, because they need you at the controls: /goal*, /compact, /db-compact and all -finish closing commands.

Security: configuration is strictly read-only (no write path exists); secrets are masked by key suffix (apikey, token, password, secret…) showing only the last 4 characters; the tool description stays under 600 characters; the tool cannot be trimmed away by context optimization.