Repository navigation
Closed
Milestone
Description
Why. Today there are three separate clients for the same job:
remote_task.pyfrom feat: let local agents delegate tasks to Moca #455 (the original context-delegation PR): uploads local files once as a workload's context, then runs many tasks in parallel and waits for each result.- Maia's demo CLI,
moca start | check | list(kagenti-demos/sandboxing/moca_chained_subagents).starthands a task to Moca through a background process that holds the request open, so the local agent can quit.checkcollects the result later, andlistshows what's pending. - Coding-agent subagents A2: mocactl subagent commands (spawn, subagents, get, watch, approve, follow-up) over today's API #381 (planned
mocactlsubagent commands):spawn,subagents,get,watch,approve,follow-up. It's the same idea as Maia's, plus a local record of spawned tasks.
mocactl today has login, run (interactive turns), sessions, credentials and promote/bundles (config bundles). We should agree on one client before building more.
Proposal
mocactlis the client. It already handles login, server URLs and sessions.- Coding-agent subagents A2: mocactl subagent commands (spawn, subagents, get, watch, approve, follow-up) over today's API #381's commands with Maia's proven behavior: a background worker holds each run open, the result is written to disk, and
/runs/statusis used only to recover a result if the worker died. - Context is an option on a task:
mocactl spawn --workload <id> "prompt"runs the task with that workload's files (feat: run tasks on a workload's context in shared sandboxes #494, run tasks on a workload's context). - Workloads are set up separately:
mocactl workloads create --context <file>uploads a context file made bycontextctl ctx export, andmocactl workloads delete <id>cleans up.mocactlnever callscontextctlitself. - Fan-out is many
spawncalls under a concurrency limit. There's no separate batch command. - Naming:
mocactlalready uses "bundle" for config bundles, so uploaded context is called a context in the CLI, never a bundle.
Open questions
- Is
mocactl workloads …the right place for workload setup? - Should the delegate skill call
mocactldirectly, or a thin wrapper whose permission prompts read clearly (Maia'sBash(moca start*)pattern)? - What should
watchprint so hundreds of tasks stay readable in Claude Code's Monitor tool? - Once this exists, should Maia's demo switch to
mocactl?
Not in scope: server changes, and per-workload sandboxes, which are #476 (phase 2: per-workload sandboxes and storage).
Metadata
Metadata
Assignees
Labels
No labels
Activity
pdettori commentedon Oct 13, 2026
@moonlight16 I agree we should converge to one CLI. I would recommend mocactl as it already handles login, control plane interaction, sessions management, user creds management and more. @maia-iyer wdyt ?
moonlight16 commentedon Oct 13, 2026
Update: #496 (by @evaline-ju) already shipped
mocactl spawn,subagentsandget, so the CLI has converged onmocactl, as @pdettori suggested. What's left for delegation with context is small:mocactl spawn --workload <id>;mocactl workloads create --context <file>andmocactl workloads delete <id>.#517 (seed sandbox files before a leaf runs) asks for the same thing. @maia-iyer, does that cover what your demo's
start/check/listneeds, or is anything missing?maia-iyer commentedon Oct 14, 2026
Yes this should be a perfect fit. We have moved to mocactl as of yesterday, and the main blip is the ability to seed sandbox state easily before deploying a subagent which should be addressed with the --workload flag as above
pdettori commentedon Nov 16, 2026
Closing: the CLI converged on mocactl.
spawn,subagentsandget(feat: mocactl subagent commands - spawn, subagents, get #496)workloads create/get/deleteandspawn --workload(feat(mocactl): workloads create/get/delete and spawn --workload #520)workloads list(feature:mocactl workloads listto enumerate caller's live workloads #552, via feat(mocactl): addworkloads list(#552) #675)@maia-iyer confirmed on 2026-10-14 that the demo moved to mocactl. Open questions 2 and 3 (a delegate-skill wrapper, and what
watchshould print for Monitor) can be filed separately if still wanted.feat(mocactl): get --wait and spawn --max-concurrent (#381)