Skip to main content

MCP server for orchestrating multi-subagent code runs with minimized context and patch-only outputs.

Project description

agent-code-squad

Python MCP server that queues code-writing subagents with minimal context packs, isolated git worktrees, and patch-first collection. Heavy work (git worktree add + codex exec start) runs in a background worker to avoid tool-call timeouts.

Quickstart

cd mcp-tools/agent-code-squad
poetry env use python3
poetry install
poetry run agent-code-squad --transport stdio

MCP client config (example)

[mcp_servers.agent-code-squad]
command = "poetry"
args = ["run", "agent-code-squad", "--transport", "stdio"]
cwd = "/Volumes/workspace/dzrlab/k3s-test/mcp-tools/agent-code-squad"

Recommended flow

  1. code_squad_run: enqueue tasks (no worktree/git/codex start yet).
  2. code_squad_tick: start a few queued tasks via the background worker and refresh running statuses.
  3. code_squad_status / code_squad_events: poll light status or stream JSONL events.
  4. code_squad_collect: grab git diffs from task worktrees (works even while jobs run).
  5. code_squad_verify: run compileall and optional pytest inside a worktree.
  6. code_squad_cancel (optional): cancel a job or all tasks in a run.
  7. code_squad_cleanup: drop worktrees and optionally delete run artifacts.

Tools

  • code_squad_capabilities_get: defaults and dispatch paths.
  • code_squad_context_pack: ripgrep-based context pack with snippet/char caps.
  • code_squad_run: queue tasks with per-task model/sandbox/approval/extra_config.
  • code_squad_tick: bounded worker pump (start queued tasks, refresh a few running).
  • code_squad_status: summarize task states with compact last messages.
  • code_squad_events: stream compacted JSONL events per job using cursors.
  • code_squad_collect: emit git diffs + touched files per worktree.
  • code_squad_verify: run compileall and optional pytest using sys.executable.
  • code_squad_cancel: cancel a job or whole run (sets state to cancelled).
  • code_squad_cleanup: remove worktrees and (optional) run artifacts under .codex/code-squad/.

Debug output

All tools accept options.debug=true to return a debug block (paths, timings, raw stdout/stderr/events). Default responses stay minimal and omit worktree/run/dispatch paths, trace IDs, PIDs, and full prompts.

Paths and defaults

  • Run metadata: <dispatch_base>/runs/<run_id>/run.json.
  • Job artifacts: <dispatch_base>/runs/<run_id>/jobs/<job_id>/{meta.json,stdout.jsonl,stderr.log,last_message.txt}.
  • Worktrees: <repo>/.codex/code-squad/worktrees/<run_id>/<task_slug>.
  • Dispatch base (default): <repo>/.codex/code-squad.
  • Defaults: model gpt-5.1-codex-max, sandbox workspace-write, approval policy never. Override via CLI flags or AGENT_CODE_SQUAD_* env vars.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_code_squad-0.1.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_code_squad-0.1.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_code_squad-0.1.1.tar.gz.

File metadata

  • Download URL: agent_code_squad-0.1.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/24.6.0

File hashes

Hashes for agent_code_squad-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c699615660f9ee65f5a8d0bc0bd1fb4c39f7ae9834e71df77f862fd5c7a4fbe
MD5 e32fb2118967c754092e159af73aee5f
BLAKE2b-256 6804164b541d422ab1b3d6d8637ed0bdd1dd52c4293c94a3d6eb8cdb6f1ffa9a

See more details on using hashes here.

File details

Details for the file agent_code_squad-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: agent_code_squad-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/24.6.0

File hashes

Hashes for agent_code_squad-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be28fb5da26f6ce57d08c917e5da7a7f0863738f0983ea2e7e837f2752041578
MD5 c5b7e79a0589788a9bfb71acffa0c1ea
BLAKE2b-256 2f40b9eaa428827d316444fc0c966210cbcf58d9eb4e09651b28964592adcced

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page