Dobby Subagent MCP
A local stdio MCP server that lets Claude, or any MCP client, hand one scoped task at a time to a worker CLI and get a structured result back. Planning, research and review stay read-only, builds stay inside the repository, multi-lens reviews are verified from the reviewers' own session records, and every run leaves inspectable logs.
| Provider | Worker | Platforms |
|---|---|---|
codex |
OpenAI models through codex exec |
macOS, Linux |
gemini |
Google models through the Antigravity CLI (agy) |
macOS |
Tools
| Tool | What it does |
|---|---|
plan |
Break down a task and propose a scoped plan. |
research |
Investigate code, docs and context, and report findings with evidence. |
brainstorm |
Evaluate an idea, scope an MVP, and recommend whether to build it. |
build |
Implement a change, run focused verification, and report diffs. |
validate |
Run the repository's existing build, test or lint commands and report results. |
review |
Review code with one lens directly, or fan out to one subagent per lens. |
reverse_engineer |
Investigate binaries, with Ghidra when it is configured. |
list_models |
List each provider's models and reasoning efforts, read live from its CLI. |
start_run |
Start any worker tool in the background and return a task_id. |
wait_run |
Block until a background run, or the first of several, finishes. |
get_run |
Return a run's status, or its final result, without blocking. |
list_runs |
List a repository's recent runs, to recover task ids. |
cancel_run |
Stop a background run this server started. |
Requirements
- Python 3.12+ and
uv. - A git worktree for the target repository.
- The CLI of each provider you use; the other is not needed:
- Codex:
codex-cli0.169.0 or newer (live-tested on 0.174.0), signed in with file-based credentials (cli_auth_credentials_store = "file", the default) orCODEX_API_KEY. Codex keys keyring credentials by theCODEX_HOMEpath, which Dobby's private per-run home does not share, so credentials kept in the keyring or in memory ("keyring","auto"or"ephemeral", set by yourconfig.toml,/etc/codex/config.toml,/etc/codex/requirements.tomlor a managed profile) fail before launch with that explanation. - Gemini: macOS and
agy1.5.23 or newer, signed in.
- Codex:
Dobby checks the CLI's version before every run, from the run's private scratch directory, never the repository. For Codex it then runs codex login status and codex mcp list --json the same way; see Codex workers.
Codex project trust
Codex 0.169 and later load project-local configuration and MCP servers only for trusted projects, including in the sandboxed codex exec runs Dobby starts. To enable them, run codex exec --trust in the target repository from your normal Codex environment before using Dobby; trust saved inside a Dobby run is discarded with its runtime, and an explicitly untrusted project needs its saved setting changed first. When Codex reports disabled project configuration, Dobby adds a warning to the response, even on success. It never grants trust itself. See the Codex change.
Optional MCP integrations
- fetchaller-mcp lets
researchandbrainstormsearch and fetch the web. It is also left on forplan,buildandreverse_engineer. - ghidra-mcp gives
reverse_engineerGhidra.
Dobby finds them in the provider's MCP config: $CODEX_HOME/config.toml and the repository's .codex/config.toml for Codex, ~/.gemini/config/mcp_config.json for Gemini. A missing integration is not an error; the prompt tells the worker not to call it. Anything that widens a sandbox, such as the Ghidra helper directory, comes only from your own config, never the repository's, which a worker can write.
Install
dobby-subagent-mcp is not published to PyPI yet. Install it from a checkout:
uv tool install .
Register it with your MCP client under the key dobby:
{
"mcpServers": {
"dobby": { "command": "dobby-subagent-mcp" }
}
}
To run from the checkout instead, use "command": "uv" with "args": ["--project", "/ABSOLUTE/PATH/TO/dobby-subagent-mcp", "run", "dobby-subagent-mcp"]. Remove any registration of the server's pre-0.2.0 name first: that server does not honour Dobby's recursion guard.
Recommended Claude Code setup
Add this to your CLAUDE.md so Claude delegates correctly:
## Delegating Work to Dobby (dobby MCP)
Offload grunt work — build/test, code review, research, planning, implementation, brainstorming, reverse engineering — to the `dobby` MCP tools instead of doing it inline. Saves tokens and context.
- Give focused prompts with a concrete outcome. One task per call — if you have multiple things to ask, make multiple Dobby calls (in parallel when independent) instead of bundling them into one vague prompt.
- Call `mcp__dobby__*` directly. Never wrap them in a general-purpose Agent/Task subagent.
- Pass the absolute path of the current repository as `repo_root` on every Dobby call except `list_models`, including `get_run`, `wait_run`, `list_runs` and `cancel_run`.
- Name `provider` and `model` on every worker call; call `mcp__dobby__list_models` for current options.
- Don't lower `timeout_seconds` below the default. Err too long — a short timeout kills the run; a long one costs nothing because Dobby returns as soon as it's ready.
- For `review`, omit `agents` or pass one lens for a direct single-agent review. Pass two or more of `generalist`, `security`, `performance`, `architecture`, `correctness`, `ux`, and `regression` for fan-out; use `timeout_seconds=1200` for multi-agent review.
- For long work, start it with `mcp__dobby__start_run`, wait for its `task_id`, then either block on `mcp__dobby__wait_run` or poll `mcp__dobby__get_run` (on Claude Code, `/loop` or `ScheduleWakeup` can schedule the polls). Never race a `start_run` and its lookup.
- A Dobby run takes no further input once started; to change scope, start a new run. To stop one, call `mcp__dobby__cancel_run`.
Environment variables
| Variable | Effect |
|---|---|
CODEX_BINARY, AGY_BINARY |
Worker CLI to run. Otherwise the one on PATH, then /opt/homebrew/bin/codex or ~/.local/bin/agy. |
CODEX_HOME |
The Codex home runs are seeded from (default ~/.codex). |
CLAUDE_CONFIG_DIR |
Where helper files a Codex config references are mirrored from (default ~/.claude). |
CODEX_API_KEY |
Codex credentials without an auth.json. |
XDG_CACHE_HOME |
Linux: the private runtime base is $XDG_CACHE_HOME/dobby (default ~/.cache/dobby). |
RUST_LOG |
Codex log filter. When unset, Dobby uses codex exec's default plus an SSE trace target. |
DOBBY_ACTIVE |
Set to 1 in every worker. Dobby refuses to run where it is set, so it never calls itself. |
DOBBY_RUN_ID |
Set in every worker to its task id. |
Calling the tools
Every tool except list_models requires repo_root, the absolute path of the target git worktree's top level. A directory inside the worktree is rejected: git reports changes from the top level, so a subdirectory root would miss them. Dobby never infers it from MCP metadata or its own working directory, which is often Dobby's own checkout. list_models accepts repo_root and ignores it.
Worker tools and start_run take:
| Param | |
|---|---|
prompt |
Required. One task with a concrete outcome. |
provider, model |
Required. See Choosing a worker. |
reasoning_effort |
Optional, default medium. |
files |
Files to start from; the worker widens scope only when they are not enough. |
important_context |
High-priority background, delivered verbatim. |
timeout_seconds |
Run budget. See Defaults. |
extra_roots |
Extra directories, absolute or inside the repository: readable by read-only tools, writable by mutating ones. |
agents |
review only. See Review. |
danger |
build and reverse_engineer with provider="codex" only. |
An unknown argument name is rejected, so a misspelled files cannot silently turn into a whole-repository run. Input errors keep their detail as MCP tool errors.
Choosing a worker
provider and model are required and have no default. provider is codex or gemini. reasoning_effort is optional and defaults to medium for every tool; it must be a level the model supports.
Dobby carries no model list. Options are read live, cached for 10 minutes, and returned by list_models:
codex |
gemini |
|
|---|---|---|
| Source | codex debug models |
agy models |
model |
catalog slug | family, such as gemini-4-neon (the effort suffix is reasoning_effort) |
| Not offered | hidden entries | non-Gemini models and orchestrators |
| Suggested | the model in your Codex config, else the catalog's first | the model in your agy settings, else the first listed |
A missing or invalid choice fails before any worker starts, and the error lists the valid options. The server instructions list the options as of startup; a catalog not loaded within 10 seconds is named as still loading.
Defaults
Any explicit timeout_seconds must be at least 300s.
| Tool | Timeout | Sandbox |
|---|---|---|
plan |
600s | read-only |
research |
1200s | read-only |
brainstorm |
600s | read-only |
review |
600s direct, 1200s multi-agent | read-only |
validate |
600s | workspace-write |
build |
1200s | workspace-write |
reverse_engineer |
1800s | workspace-write |
A workspace-write run can write the repository and its extra roots, but not their git metadata, .dobby/, or the agent configuration in .codex/, .agents/, .claude/, .gemini/ and .mcp.json, so a build asked to edit those cannot. Nor can it write git's hooks directory, template directory or a config file git reads, when core.hooksPath (on any branch), init.templateDir or an include.path puts one inside a writable root, nor the .git file and hooks directory of another worktree nested inside one, such as .worktrees/feat: husky's .husky/_ is the common case, so a build whose npm install runs husky's prepare script gets a denied write there. Only a Codex run with danger=true can.
danger=true runs build or reverse_engineer with Codex's danger-full-access, without a sandbox. Every other tool, including start_run with another tool, rejects it, and provider="gemini" rejects it everywhere.
Review
review agents: generalist (default), security, performance, architecture, correctness, ux, regression. Zero or one effective agent runs directly. Pass two or more for fan-out to one subagent per lens, normally with timeout_seconds=1200. Fan-out runs a parent plus one child per lens, so pick only lenses that help. A lens that delivers nothing usable adds a next_steps entry saying how to re-run it alone, which takes the direct path. agents on any other tool is rejected.
Background runs
start_run takes a worker tool's params plus required tool, starts it in the server process, and returns an AsyncRunHandle (task_id, tool, state, summary, repo_root, artifact_paths, provider, model, reasoning_effort). An omitted timeout_seconds is that tool's default, except that multi-agent review automatically uses 1200 seconds. Independent start_run calls may run in parallel, but wait for each one's response before looking up its task_id.
wait_run(repo_root, task_id | task_ids, timeout_seconds) blocks until a background run finishes: pass task_id for one run, task_ids for whichever of several finishes first, or neither for every run live for the repository when called. Passing both, or an empty task_ids, is rejected. It returns the get_run shape plus pending_task_ids, the runs still unfinished; re-call wait_run(task_ids=pending_task_ids) until that is empty. On timeout state is running. Runs are shielded from the waiter, so a cancelled or timed-out wait loses nothing, and a run not live in this server, for example after a restart, is answered from its artifacts at once.
timeout_seconds is default 540s / 9 min, clamped to [1, 100_000]. Keep it below your client's own tools/call timeout. Claude Code's MCP_TOOL_TIMEOUT defaults to 100,000,000 ms, about 28 hours, which is why the wait is capped at 100_000s. Codex CLI's default is 300 seconds, below Dobby's default wait, so raise it first (tool_timeout_sec = 100000 under [mcp_servers.dobby] in ~/.codex/config.toml) or pass a shorter wait. Other clients vary. A client that gives up on a call never stops the run.
get_run(repo_root, task_id) returns a RunLookupResponse without blocking: state, summary, provider, tool, status, result_state, stop_reason, artifact_paths, warnings, and the final result once finished. list_runs(repo_root, limit=10) lists the newest runs in .dobby/runs/ with the same summary fields.
cancel_run(repo_root, task_id) stops a background run this server started: it kills the worker's process group, writes a final stop_reason: cancelled result, removes the run's private runtime, and returns the get_run shape, waiting at most about 5 seconds for the run to unwind. An unknown or finished run is left alone, with a warning.
Run states:
running: the run is live in this server.finished: a final result is available.unknown: the run directory exists without a readable final result. Withresult_state: placeholder, the server that ran it died without cleaning up; the next server start marks it final.not_found: no such run, or an invalidtask_id.
A synchronous worker call can still hit the client's tools/call ceiling, so prefer start_run with wait_run or get_run for long work. Live tracking is in-process: a server restart loses running work, but finished results stay readable from .dobby/runs/.
Results
Worker tools return a ToolResponse: task_id, tool, status (success or error), summary, completeness (full, partial or blocked), important_facts, next_steps, files_changed (this run only), file_diffs, artifact_paths, sandbox_violations, repo_root, exit_code, duration_ms, warnings, raw_output_available, provider, model, reasoning_effort, result_state, stop_reason, plus review_details for review and reverse_engineer_details for reverse_engineer. sandbox_violations lists sandbox and permission problems the run hit, such as a declined command or a patch Codex could not apply, whatever its stop reason. A denial the worker hit does not by itself fail the run; the checks under sandbox_violation below do.
A run Dobby stops on a timeout or stall before the worker answers still returns what its progress events show: the tail of the worker's narration and its last completed tool calls in important_facts, marked as reconstructed in warnings.
Stop reasons
The first three are ACP's StopReason values; the rest are Dobby's.
end_turn: the worker delivered a result and nothing failed.refusal: the worker setrefused: true;completenessisblocked.cancelled: Dobby stopped the run, and the summary says why: the MCP request was cancelled or the client disconnected,cancel_run, the server stopped (Dobby server stopped (SIGTERM), or(stdin closed)), or a later server start found the run orphaned. Also used whenagyitself ends withCANCELEDorINTERRUPTED, and by the placeholder result written at start.timeout: the run used uptimeout_seconds, which also bounds the CLI check and the pre-run repository snapshot.stall: Codex only. No stdout or stderr for 180 s (effortminimal,lowormedium) or 300 s (any other effort), so Dobby killed the worker.sandbox_violation: a mutating run withoutdanger=truechanged a protected file, a mutating run moved or removedHEAD(a commit, reset or deleted branch), a read-only run reported changing files that Dobby also saw change, oragyended its turn with no answer after denying a permission. Always paired with asandbox_violationsentry.error: anything else that failed: a preflight check (platform, private runtime, a Codex sign-in or MCP listing that failed, a missing or too-old CLI), a non-zero exit, missing or invalid structured output, failed review evidence, a post-run check that ran out of time, or a private runtime that could not be deleted.
stop_reason does not decide status alone: a review that timed out with usable findings, or a multi-agent review whose parent failed after reviewers delivered verified findings, returns status: success and completeness: partial beside a timeout or error stop reason.
Review details
review_details reports the requested and effective lenses, orchestration_protocol (multi_agent_v2, agy_subagents, or null for a direct review), execution_evidence (direct_parent, codex_session_rollouts or agy_transcripts), the per-lens execution_manifest, manifest_validated, coverage_complete, and completed, partial, blocked and failed lens counts.
For a multi-agent review Dobby builds the manifest itself from session records it verifies after the run; the parent reports none. The parent only starts reviewers, and the findings, next steps, warnings and per-lens summaries are rebuilt from each child's own verified result, never from the parent's synthesis.
manifest_validated: truemeans no lens's evidence failed an integrity check. It does not mean every reviewer finished;coverage_complete: truedoes. A direct review hascoverage_complete: null.- A lens that never delivered, or whose result failed its assignment attestation, is lost coverage: it is
failed, and the other lenses' verified findings still return as a partial success. - A lens whose evidence contradicts what Dobby asked for (started twice, the wrong role or arguments, a collaborating child, a parent message or follow-up task sent to it after its spawn, file changes) fails integrity: it contributes no text at all, its summary is a neutral placeholder, and the run reports
manifest_validated: falsewithstatus: error, thoughimportant_factsmay still hold the other lenses' verified findings. - Evidence that cannot be trusted as a whole (an unexpected or nested session, an unselected subagent, a parent message to no selected lens or to all of them at once, unreadable records) discards every finding.
- A
blockedchild is not usable coverage.
Each reviewer gets its scope from Dobby, not the parent: Dobby writes a per-run agent definition with that lens's canonical assignment inlined into the private runtime. A child whose task message carries a different assignment must review the one Dobby gave it and report the conflict in warnings. Each child also attests the assignment's SHA-256 at the start of its summary. The digest is only a consistency check: the parent knows it too, so on its own it would prove a child saw the assignment's identity, not that it reviewed that scope. Scope substitution is bound rather than made impossible: enforcement is an instruction the reviewer model follows, so a child persuaded by a crafted task payload while still echoing the expected digest would pass every mechanical check.
Reverse-engineering details
reverse_engineer_details.ghidra reports whether Ghidra was configured, a mode (not_configured, prelaunch_failure, no_activity, startup_only, direct_mcp or helper_fallback), a summary, and the observed mcp_calls and helper_calls, read from the run's progress events.
File diffs
Mutating tools return one file_diffs entry per changed file inside the repository:
{
"path": "/abs/repo/src/foo.py",
"oldText": "...", // null for new files
"newText": "...", // null for deleted files
"truncated": false // true for files over 2 MB or binary; both texts are then null
}
Names follow ACP's camelCase diff shape on the wire, in result.json and in events.jsonl. Diffs come from before-and-after snapshots, with one 60-second budget for every git show in a run; files past it get no diff and are named in warnings. A worker may also supply file_diffs for changes the snapshot cannot reconstruct. Read-only tools always return file_diffs: [].
Streaming progress
Every run writes ACP-shaped events to events.jsonl. When the tools/call request carries a progressToken, Dobby also sends each event as an MCP notifications/progress: progress counts events, message is a short label, and the event itself is in _meta.acpEvent. Events use ACP session/update shapes: agent_message_chunk, tool_call and tool_call_update (with kind one of read, edit, delete, move, search, execute, think, fetch, other, and rawInput where known), and plan.
Live delivery never slows the worker and is best-effort: a client more than 1024 events behind misses the newest notifications, and one that stops responding is abandoned once the run's timeout is spent. events.jsonl always records every event. A line that is not JSON or nests too deeply is skipped, as is a line still unfinished after 1 MiB, up to its newline; stdout.log keeps every byte.
For a background run, events go only to a wait_run caller currently waiting on it, tagged with _meta.taskId and _meta.perTaskCount. Earlier events are not replayed; read events.jsonl.
Files on disk
Each run writes <repo_root>/.dobby/runs/<task-id>/: request.json, prompt.txt, stdout.log, stderr.log, last_message.txt, result.json, output-schema.json and events.jsonl. result.json is replaced atomically: it holds a placeholder from the start until the final result. Treat .dobby/ as unredacted local logs. Mutating tools add .dobby/ to .gitignore, and refuse a .gitignore that is a symlink, has several hard links, is not a regular file or is larger than 4 MiB; they never read it past that size. Invalid task ids and symlinked artifact paths fail closed.
A mutating worker can write its run directory, so Dobby treats every artifact it reads back as untrusted. It reads one only as a regular file: never through a symlink, never a FIFO or a device, and never past a size cap far above what real runs write (stdout.log, stderr.log and events.jsonl 256 MiB, of which only the end is read past the cap; result.json 256 MiB; last_message.txt and request.json 16 MiB). Anything else reads as unreadable, with a warning naming the file. Dobby creates each log fresh and replaces every other artifact by renaming a new file over it, so it never opens what a worker left at that path. If the run directory itself was replaced, for example by a symlink, Dobby neither reads the run's logs and result from the replacement nor writes anything into it, and the run fails with status: error saying so. A mutating run cannot write .dobby/ at all, so it cannot edit another run's artifacts, such as the result.json that get_run returns, unless it is a Codex run with danger=true. output-schema.json is only the run's record: each CLI reads a private copy in the run's runtime.
Each run also gets a private runtime outside the repository and outside system temp, mode 0700:
~/Library/Caches/dobby/<task-id>/ Linux: ${XDG_CACHE_HOME:-~/.cache}/dobby/<task-id>/
.lock locked by the run for its whole life
owner.json task id, run directory, server pid, worker pid and process group, start time
output-schema.json the output schema the CLI reads, mode 0600
scratch/ the worker's TMPDIR and per-run caches, writable
codex-home/ Codex: copied auth.json, rewritten config.toml, sessions, per-run review agents
claude-config/ Codex: helper files the Codex config references
home/ Gemini: private HOME with a link to your keychain folder
workspace/ Gemini: agy's empty working directory
settings.json Gemini: the run's permission rules
A runtime is always created fresh, never adopted, and removed when the run ends, without following the keychain link. If it cannot be removed, the run fails with status: error naming the path, because it holds copied credentials; a scratch tree that cannot be removed is only a warning. The base must be owned by you and not be a symlink.
Stopping and recovery
Every stop Dobby controls leaves a final stop_reason: cancelled result saying why: an MCP cancellation or client disconnect, cancel_run, or the server stopping.
SIGTERM, SIGINT, SIGHUP and stdin EOF stop the server cleanly. It kills every worker's process group, gives runs about 1.5 seconds to unwind, writes the results they did not, removes their private runtimes, and exits; a watchdog finishes the job after about 3 seconds if that stalls. A placeholder result.json therefore means a server died without cleaning up, for example on SIGKILL.
On startup Dobby sweeps the runtime base in the background. A runtime whose lock is free belongs to a dead server: its worker group is killed only when a live member's command line names that run's runtime or run directory, the runtime is removed, and a placeholder result becomes a final cancelled result saying it was interrupted, but only in a directory shaped like the run's own <repo>/.dobby/runs/<task-id>, whatever owner.json claims. Runtimes locked by a live server are skipped. One without a lock file is never deleted, only reported once it is more than two minutes old. One with a lock but no owner.json may be a claim still in progress, so it is skipped without touching its lock until it is two minutes old, then removed as an orphan.
Safety
These apply to both providers.
- No recursion. Workers get
DOBBY_ACTIVE=1, and Dobby refuses to run inside one. - MCP allowlist. MCP servers run outside the worker's sandbox, so each role keeps only the servers it uses:
fetchallerforplan,research,brainstormandbuild;fetchallerandghidraforreverse_engineer; none forvalidateandreview. Every other configured server is turned off, and so is anything recognisable as Dobby, even under an allowed name. - No commits. Commits are forbidden. A mutating run that moves or removes
HEADreturnsstatus: errorwithstop_reason: sandbox_violation. - Protected files. Some files make git, Codex, Claude Code or Gemini CLI run code outside any sandbox the next time you use them:
.codex,.agents,.claude,.geminiand.mcp.json, and the.gitentry itself, in the repository and every writable root, plushooks,config,config.worktreeandinfo/in each one's git directory and common git directory. So are git's hooks directory and every other one that acore.hooksPathin any config file names (an include for another branch can bring it into effect), every template directoryinit.templateDirorGIT_TEMPLATE_DIRnames (git cloneruns its hooks at once), and every config file git reads or aninclude.pathorincludeIf.<condition>.pathnames (whether its condition holds now or not, and including one set throughGIT_CONFIG_COUNTorGIT_CONFIG_PARAMETERS), wherever your repository, global or system config puts them inside a writable root; the.gitentry of every other worktree of the repository inside one, with its hooks directories, a relativecore.hooksPathresolved against that worktree; and, for any protected path that is or lies below a symlink, where it leads inside a writable root. For Codex, the writable roots include your own[sandbox_workspace_write]writable_roots, and git's hooks, template and config paths under/tmp, which Codex's:workspacemakes writable, count too. Before and after every run Dobby fingerprints them by metadata alone (type, permissions, owner, inode, and for files size, mtime and ctime), listing directories only through descriptors that follow no link, and never reading a file. A change fails a mutating run withoutdanger=truewithstop_reason: sandbox_violationnaming the paths. Adanger=truerun only warns, and so does a read-only run, whose sandbox lets the worker write none of them, so the change is almost surely yours. Who made the change cannot be told, so during a mutating run your own changes count too: Claude Code saving an approval to.claude/settings.local.json, orgit push -u,gh pr checkoutorgit configwriting.git/config. An extra root of$HOME, or for Codex awritable_rootsentry of$HOMEin your own config, makes~/.claude, which Claude Code writes in normal use, a protected path. Never compared:.claude/worktrees,.claude/agent-memory,.claude/scheduled_tasks.lock,.DS_Storeand git'sinfo/refs, which change in normal use. Each tree is compared up to 10,000 entries; past that the run warns. Only the hook itself is protected, not what it runs: a hook that is a symlink to a file in the repository, or that runs repository code (husky'snpx lint-stagedreadinglint-staged.config.js, a hook calling./scripts/check.sh), runs a worker's edit to that file at your next commit. - Read-only attribution. A read-only worker's sandbox blocks its writes, so a change Dobby observes during the run is someone else's, such as you editing in another terminal: it is a warning. It is a sandbox violation only when the worker also reports changing that file.
- Process groups. Every worker runs in its own session. Stopping one sends SIGTERM to its process group, so a git child can release
index.lock, then SIGKILL after a grace period; a group Dobby has killed, or whose worker it has reaped, is never signalled again. After the worker exits, a descendant still holding its output pipes gets a brief grace before the group is killed, so the run reports the real exit code instead of waiting out its timeout. A descendant that left the group (for example withsetsid) is abandoned after a short drain, with a warning. - Dobby's own git. Snapshots,
HEADlookups and diffs rungit --no-optional-locks -c core.fsmonitor=false -c core.hooksPath=/dev/null, andgit showruns with--no-textconv, so configuration a worker planted cannot run code outside the sandbox, and an interrupted snapshot never leavesindex.lockbehind.git statusreads no.gitattributesfrom the worktree (git 2.40 or newer), so a worker cannot make it run a clean filter, and it never runs git inside a submodule, whose.gitfile a worker could redirect. An edit inside a submodule is reported as the submodule's path, found from file metadata, without a per-file diff. The snapshot helper is a separate Python process started in isolated mode outside the repository, so a module a worker wrote there (ajson.py, say) is never imported. To find where your own git runs hooks and which config files it reads, Dobby runsgit rev-parseandgit config --listwithout thecore.hooksPathoverride; neither runs a hook. It lists the repository's other worktrees withgit worktree list --porcelain -z, which needs git 2.36 or newer; with an older git every run fails before launch. - Log failures. If a worker's output cannot be written to its log, for example on a full disk, Dobby keeps reading and mapping it so the worker is never blocked, and says so in
warnings. - Config files. Dobby reads each config it parses (your Codex
config.toml, the repository's.codex/config.toml,agy's MCP config and settings) only as a regular file of at most 1 MiB, so a FIFO or a huge file there cannot freeze or exhaust the server. A symlink to one of your own configs is followed, as a dotfiles setup needs; a symlink at the repository's.codexor.codex/config.tomlnever is, because a worker could plant one. - Snapshots. Change detection hashes only regular files. A FIFO, socket or device in the repository is fingerprinted by its type and metadata without being opened, so a FIFO a worker left where a tracked file was cannot hang later snapshots.
Codex workers
- Private home. Each run gets its own
CODEX_HOME(<runtime>/codex-home), seeded from yourauth.jsonandconfig.tomlwith paths rewritten, plus helper files the config references underCODEX_HOMEorCLAUDE_CONFIG_DIR; the home itself and itssessions/are never copied. Saved project trust carries over. The server needs read access to those files. Codex runs in the repository withapproval_policy="never",--json, and theappsandpluginsconnectors off. - Unreadable config. If your
config.tomlor the repository's.codex/config.tomlexists but Dobby cannot read it safely (a symlink in the repository, a FIFO, over 1 MiB) or parse it as UTF-8 TOML, the run fails before launch withstatus: errornaming the file: Codex could start MCP servers from it that Dobby could not turn off. A repository whose.codexis a symlink to shared config therefore cannot run Codex workers until it is a real directory. - Sign-in check. Before launch,
codex login statusruns against the private home, so credentials Dobby could not copy fail the run with an explanation instead of at the first model request. It is skipped withCODEX_API_KEY, and for a model provider that does not use Codex's sign-in: a built-in other thanopenai, or a custom provider withoutrequires_openai_auth = true. - MCP servers. Dobby turns servers off with a single
-c mcp_servers={...}table that repeats each server's owncommandorurl, so a name with a dot or a space works, and so does a server defined only in an untrusted repository's.codex/config.toml. It finds them in yourconfig.toml, the repository's.codex/config.toml, andcodex mcp list --json, which it runs before launch against the private home and which also sees/etc/codex/config.toml, a managed profile and a cloud-managed config. If that listing fails or prints something Dobby cannot read, the run fails before launch. The listing never starts a server, but for an enabled HTTP server Codex holds no credentials for, it fetches the server's OAuth metadata. Dobby passes the listing its own overrides, so that reaches only servers the role keeps and servers no file Dobby reads defines. - Sandbox. Read-only tools run in
-s read-only, which reads anywhere and writes nowhere, so they get no--add-dir. Mutating tools withoutdanger=truerun in a per-run permission profile,dobby_<task id>, that extends Codex's:workspaceand keeps.dobby,.claude,.gemini,.mcp.json,.codex,.git,.agentsand.awsread-only (on macOS in any letter case) in the repository and every writable root, for shell commands andapply_patchalike, along with other worktrees'.gitentries and git's hooks directories, template directories and config files where a writable root, or the/tmpthat:workspacemakes writable, holds them (see Protected files). Codex also keeps read-only where any of these leads through a symlink. A run whose hooks or template directory is a whole writable root (core.hooksPath = .), or whose hooks, template or config path holds*,?,[or], which a profile reads as a pattern, is refused before launch. Each extra root and the scratch directory are added with--add-dir. Your own[sandbox_workspace_write]grants carry over:writable_rootsbecome extra--add-dirroots,network_accessturns on the profile's network, andexclude_slash_tmpmakes/tmpread-only. The repository's config never adds a grant, and neither does/etc/codex/config.toml. An administrator'sallowed_permission_profilesrequirement that does not allow the profile makes Codex fall back to another one, without those read-only entries.validateis workspace-write because validation writes caches and build output; its prompt forbids source edits. - Environment. The worker keeps your environment, since Codex needs its credentials and its
shell_environment_policyfilters them from shell commands.TMPDIR,UV_CACHE_DIRandXDG_CACHE_HOMEpoint into scratch. - Stalls. Dobby sets
RUST_LOGso Codex keeps writing its SSE trace to stderr during long reasoning, and kills a run that is silent past the stall threshold. - Progress. Events are mapped from codex-cli 0.171's
exec --jsonshapes insrc/dobby_subagent_mcp/backends/codex/events.py. Sandbox denials are read from the same stream: a declined command, a denial in a failed command's output, and a patch that failed to apply, named by its paths (the stream does not say why a patch failed). A patch Codex's own path check rejects, and a shell command it reports as sandbox-denied the moment it starts, leave no item in the stream, so they are not listed. - Multi-agent review. The parent runs at
loweffort withmulti_agent_v2enabled and spawns one task per selected custom reviewer with the exact custom role, a canonical assignment bound to the requested repo, task, files and context, andfork_turns="none". Reviewers run atreasoning_effort, and spawned threads are capped at the number of selected lenses. Dobby pins the rest of the[features.multi_agent_v2]settings, so a table in your or the project's config cannot change them: the parent's collaboration tools are exactlyspawn_agent,list_agents,wait_agentandinterrupt_agent, called directly rather than from a code cell, with nosend_message, nofollowup_taskand no model override on spawn. codex-cli 0.174 can pick multi-agent v3 for a model from its catalog; Dobby does not verify v3 yet, so such a review fails and says to choose a model whose catalog entry uses v2. Codex persists themessagetool argument as opaque provider ciphertext (a Fernet token in codex-cli 0.171), so Dobby requires every other spawn field to remain exact, provisionally accepts a single message value with the Fernet token structure, and binds it to a SHA-256 assignment identity attested by the independently correlated child terminal result. From the private session rollouts, which it forces Codex to keep and reads before deleting the runtime, Dobby verifies root v2 mode; each child's task, thread, role and v2 mode, correlated through its start record (anitem_completedSubAgentActivityitem, or the legacysub_agent_activityevent) and its spawn output; no child collaboration calls; no parent collaboration calls beyond spawning, listing, waiting for and interrupting reviewers, so a parentsend_messageorfollowup_taskfails the lens it names (or the whole review, when it names no selected lens); one strict read-only terminal JSON result; and the identical completed payload the parent observed.execution_evidenceis thencodex_session_rollouts. If the parent times out after children delivered, their findings are salvaged from the rollouts. - Ghidra.
reverse_engineermounts as writable roots the helper repository your own Codexghidraserver config names in$CODEX_HOME/config.toml(itshelper_dir, or the directory ofbridge_mcp_ghidra.py) and any live Ghidra socket directory. The repository's.codex/config.tomlnever adds a writable root, trusted project or not. When a mounted root holdsbridge_mcp_ghidra.py, the prompt offers it as a fallback for missing dynamic Ghidra tools. A live socket also turns on the permission profile's network access, because connecting to a Unix socket is a network operation to Codex's sandbox and Codex has no narrower grant that works without its managed proxy.
Gemini workers
- Private runtime. Each run gets its own
HOME, soagysees only configuration Dobby wrote for the run. Your keychain folder is linked in soagystays signed in. Only the role's allowed MCP servers are copied from~/.gemini/config/mcp_config.json, and each one that starts a process gets your realHOMEin itsenvunless you set one, so it finds its own configuration. - Sandbox.
agy's terminal sandbox plus per-run permission rules; no auto-approval flag is ever passed. The repository is neveragy's working directory or an--add-dir, becauseagystarts MCP servers a workspace declares outside the sandbox even when the folder is untrusted, so repository instruction files are not loaded automatically and the prompt tells the worker to read them. Read-only tools cannot write the repository, and shell commands have no network. - Temp and git. Reads and writes in the system temp directories (the resolved
tempfile.gettempdir(),/private/tmpand/tmp) are denied unless one holds a granted root. Mutating runs cannot write the git directory, common git directory or.gitentry of the repository, or of any writable root that is a git worktree, nor.gitin any other writable root, where a planted.git/configwould run in your next git command there, nor.dobby/in the repository or any writable root, so they cannot touch run artifacts. Nor can they write.codex/,.agents/,.claude/,.gemini/or.mcp.jsonthere, whether or not they exist yet: a later Codex run would start MCP servers from a planted.codex/config.toml, and Claude Code or Gemini CLI would run a planted hook or MCP server, all outside any sandbox. The same goes for other worktrees'.gitentries and git's hooks directories, template directories and config files inside a writable root, and, sinceagyresolves symlinks before it matches a rule, for where any protected path leads through a symlink inside one.agy's file tools match permission rules case-sensitively while macOS volumes usually are not, so Gemini denies each protected path in every spelling below a writable root: each letter in either case, plus every other character APFS treats as ASCII text (ſfors, the Kelvin sign fork,ßandẞforss, the ligaturesff,fi,fl,ffi,ffl,ſtandst, and the Greek question mark and varia for;and a backtick), in every mix. That is 488 rules per root, plus 72 for husky's.husky/_. A run that would need more than 4096 such rules is refused before launch: that allows at most eight writable roots side by side, a root nested inside another multiplies its rules by every spelling of the path between them, and every letter of a protected path deep inside a root doubles its rules, so a nested worktree at.worktrees/feat(147,456 spellings of.worktrees/feat/.git) or a hooks path such astools/release-hooksrefuses every Gemini mutating run in that repository. So is a run that would have to respell another non-ASCII character, or whose hooks directory is a whole writable root.agyreads a private copy of the output schema, never the one in the repository. - Environment. Variables whose names look like credentials (containing
KEY,SECRET,TOKEN,PASSWORD,PASSWD,CREDENTIALorCOOKIE, startingAWS_,AZURE_,GCP_orGOOGLE_APPLICATION_CREDENTIALS, plusSSH_AUTH_SOCKandGPG_AGENT_INFO) are not passed toagy, and neither isVIRTUAL_ENV.TMPDIRand the uv, npm, Go, cargo and XDG caches are per run in scratch and start empty. - Toolchains. Builds may read your real uv Python installs, rustup toolchains and
~/.cargo/bin, but never write a real cache. With no network, builds rely on an environment that is already synced (an installed.venv,node_modules, vendored crates). Only uv and git have been verified. - Limits.
agy's web search needs no permission, even in read-only runs. Ghidra on this backend is untested.dangeris not supported. - Denials.
agycan report success with an empty answer after denying a permission; Dobby returns that asstop_reason: sandbox_violation. - No stall detection.
agyis silent while a tool runs, so a Gemini run is bounded by itstimeout_secondsalone. - Multi-lens review. One
agysubagent per lens, each defined in the private runtime with its assignment inlined and limited to reading files, running sandboxed commands and messaging the parent. Findings come only from each subagent's own transcript; there is no parent-observed copy to compare.review_detailsreportsorchestration_protocol: "agy_subagents"andexecution_evidence: "agy_transcripts". The parent and the reviewers share onereasoning_effort, becauseagytakes one effort per session. Everyinvoke_subagentcall and every announced subagent must name a selected lens, or every finding is discarded. A call may passPrompt,RoleandTypeName, plus aModelequal to the run's model (optionally with its effort suffix) or an emptyWorkspace; anything else, or starting a lens twice, fails that lens's integrity check. So does a parentsend_messageto a started lens's conversation; a parent message to any other recipient, including the@childrenbroadcast, discards every finding. When Dobby stops a run at its timeout, a subagent directory whose identity never reached the stream is only a warning if its transcript shows no message and no forbidden tool, and there are no more such directories than lenses that never reported one.
Development
uv sync
uv run pytest
uvx ruff check src tests scripts
uv run mcp dev src/dobby_subagent_mcp/server.py:app
uv run python -m dobby_subagent_mcp
The default suite covers the 0.164.0+ multi-agent v2 child-session shape with synthetic rollouts and a sanitized real codex-cli 0.171.0 review capture (tests/fixtures/codex-0.171-v2-review), and the codex exec --json event shapes with a fixture built from codex-cli 0.171's exec_events.rs. The live suites last passed against codex-cli 0.174.0 and agy 1.5.24 (2026-12-04).
Tests marked live run against a real worker CLI and skip when it is missing. CI's live-codex-flags lane runs those not marked live_auth against the latest published @openai/codex with DOBBY_REQUIRE_LIVE=1, which turns their skips into failures, so upstream flag drift is caught. Tests marked live_auth need a signed-in CLI and run only locally:
DOBBY_RUN_LIVE_V2=1 uv run pytest -m live tests/test_live_codex_v2.py tests/test_live_codex_build.py
DOBBY_RUN_LIVE_GEMINI=1 uv run pytest -m live tests/test_live_gemini.py
Mutation testing is described in AGENTS.md.
Release tags must exactly match project.version; for version 0.2.0, tag v0.2.0. The publish workflow checks this before testing and building. A release is ready only after the full suite, both authenticated live suites, uv build, and an MCP initialize check of the installed wheel over stdio, which must advertise Dobby's version, all pass. The source distribution includes AGENTS.md, CHANGELOG.md, scripts/ and tests/.
Metadata
Release files for dobby-subagent-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dobby_subagent_mcp-0.2.0.tar.gz | 590.4 kB | With provenance | Details for dobby_subagent_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dobby_subagent_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dobby_subagent_mcp-0.2.0-py3-none-any.whl |
Total release size: 825.1 kB
Release files / dobby_subagent_mcp-0.2.0.tar.gz
| Download URL | dobby_subagent_mcp-0.2.0.tar.gz |
|---|---|
| Size | 590.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dee1cb291dcc68ec498f225e88d2fcf0d4600b752fe3ebdfff2eccac8d27377
|
|
BLAKE2b-256 checksum How to use checksums |
9bdefb8358480742f22d92b4de8473fa68a0b5e063b456a01f05e633eb146fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / dobby_subagent_mcp-0.2.0-py3-none-any.whl
| Download URL | dobby_subagent_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 234.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4134a5fcdb4761f31db5697770404832c79ffeef6c8ce3c4f894802909862399
|
|
BLAKE2b-256 checksum How to use checksums |
b0ca91ffa76f3f25df0dc59ba7b8932e94c992b61b1ec2e844b753742ada61b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for dobby-subagent-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dobby_subagent_mcp-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.