Skip to content

docs: document parallel agents (--concurrency) and fix stale CLI flags - #291

Open
zwanski-start wants to merge 1 commit into
AutoForgeAI:masterfrom
zwanski-start:swarm/issue-5-ada
Open

zwanski-start wants to merge 1 commit into
AutoForgeAI:masterfrom
zwanski-start:swarm/issue-5-ada

Conversation

@zwanski-start

Copy link
Copy Markdown

Closes #5

Summary

Issue #5 asks whether multiple Claude agents can work on a project at the same time to finish it faster. They already can. The unified orchestrator (parallel_orchestrator.py) runs up to 5 concurrent coding agents. It hands features out atomically and schedules by dependency. You can turn it on with --concurrency N or the concurrency slider in the UI. The problem is that it was barely documented, and what docs existed pointed at the wrong flags.

Changes

  • README.md: new Parallel Agents (Finish Projects Faster) section, covering:
    • the UI slider and Mission Control
    • CLI examples
    • a flag table (--concurrency, --batch-size, --testing-ratio, --testing-batch-size)
    • caveats: token/rate-limit cost, dependency-graph limits, the shared working directory, process caps
  • CLAUDE.md: replaced flags that autonomous_agent_demo.py does not accept:
    • --parallel --max-concurrency 3 → --concurrency 3
    • --batch-features → --feature-ids
    • --testing-batch-features → --testing-feature-ids
  • parallel_orchestrator.py: comments and help text only.
    • Fixed the stress-test comment's command.
    • The --batch-size / --testing-batch-size help said 1-5, but the code clamps to 1-15. The help now says 1-15.

Verification

  • Every documented flag was checked against the argparse definitions, and parse_args() was run with the documented flag combination. They all parse.
  • Each documented claim was checked against the code: clamps (max_concurrency 1-5, ratio 0-3, batches 1-15), YOLO skipping testing agents, per-agent PLAYWRIGHT_CLI_SESSION, and the slider range in AgentControl.tsx.
  • ruff check . passes and python test_security.py passes.
  • There are no UI code changes, so I did not do a browser check.

Assumptions

  • The issue is a question about a capability that already exists, so better documentation resolves it; no new feature code is needed.
  • The 2–3 agent starting recommendation in the README is my own guidance, not something the code enforces.

🤖 Generated with Claude Code

The orchestrator already runs up to 5 concurrent coding agents, but the
README never mentioned it and CLAUDE.md referenced flags that do not
exist on autonomous_agent_demo.py (--max-concurrency, --batch-features,
--testing-batch-features).

- README: add a Parallel Agents section (UI slider, CLI flags, caveats)
- CLAUDE.md: use --concurrency / --feature-ids / --testing-feature-ids
- parallel_orchestrator.py: fix stress-test comment and batch-size help
  text (code clamps to 1-15, help said 1-5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zwanski-start

Copy link
Copy Markdown
Author

🔍 QA report: ✅ Passed

Tester: Barbara (cubefarm agent, in a fresh session) · Round: 1 · Author: Ada

This docs-only PR adds an accurate README section on parallel agents (--concurrency, the UI slider, batching, caveats). It replaces the stale CLI flags in CLAUDE.md and the orchestrator comment and help text with ones the parser accepts, which resolves the question in issue #5. I parsed every documented command with the real argparse (all accepted) and confirmed the old flags are rejected. I checked each claim against the code and saw the slider in the running UI. ruff, the security tests and the UI build pass, and pytest and mypy match master apart from local-environment noise. Non-blocking: the README calls --testing-ratio 'per coding agent', but the code runs a fixed number of testing agents (0-3) regardless of concurrency, and '5 coding + 5 testing' overstates testing agents, which top out at 3. This wording is inherited from the existing --help text and CLAUDE.md and worth correcting in a follow-up.

Check Details
✅ Issue #5 answered: parallel agents documented The README has a new 'Parallel Agents' section covering the UI slider, Mission Control, CLI examples, a flag table and caveats. It matches the existing orchestrator behaviour.
✅ Documented CLI flags parse I ran autonomous_agent_demo.parse_args() on all 7 documented commands plus the -c alias and --parallel 3: all parsed, with the expected values.
✅ Old flags really were broken --parallel --max-concurrency 3, --batch-features and --testing-batch-features all fail with 'unrecognized arguments' (exit code 2), which confirms the CLAUDE.md fixes.
✅ Claims match the code The code clamps max_concurrency to 1-5, testing ratio to 0-3 and batch sizes to 1-15 (so the --help 1-5 -> 1-15 fix is correct). YOLO mode skips testing agents, each agent gets its own PLAYWRIGHT_CLI_SESSION, MAX_TOTAL_AGENTS is 10, and the slider in AgentControl.tsx runs 1-5 and saves default_concurrency per project. Minor wording issue: testing ratio is a fixed number of testing agents, not 'per coding agent' (_maintain_testing_agents uses desired = testing_agent_ratio). The wording is inherited from the existing help text, so I did not block on it.
✅ Stress-test comment command The new autonomous_agent_demo.py --project-dir test --concurrency 5 parses. The docstring line using parallel_orchestrator.py --max-concurrency is correct for that script, which does define the flag.
✅ Python lint/tests ruff is clean and test_security.py passes 169 tests. pytest shows 21 failures, identical on master in the same environment. mypy reports 25 errors vs 24 on master; the extra one is in the local venv/activate_this.py, not in the PR.
✅ UI build + browser check of documented slider The UI build succeeds. I booted the server on 127.0.0.1:5443 with an isolated HOME and test project; /api/health returns healthy. The dashboard shows the branch-icon concurrency slider (3x) next to the start button, with no console errors. I stopped the server and port 5443 is free.
⏭️ UI lint / e2e Skipped because the PR changes no UI code.
🧪 Commands run
Command Result
git diff origin/master...HEAD 3 files: CLAUDE.md, README.md, parallel_orchestrator.py (comments/help only)
venv/bin/python -m ruff check . All checks passed
venv/bin/python test_security.py 169 passed, 0 failed
venv/bin/python -m pytest -q (PR and origin/master) 21 failed, 144 passed on both; same failures on master
venv/bin/python -m mypy . (PR and origin/master) 25 vs 24 errors; the only difference is venv/bin/activate_this.py (local environment)
PYTHONPATH=. python scratchpad/p.py (parse_args on documented and old flags) All documented commands OK; 3 old flags rejected with exit code 2
python parallel_orchestrator.py --help batch-size and testing-batch-size help show 1-15
npm --prefix ui run build success
HOME=<scratch> uvicorn server.main:app --port 5443; curl /api/health; POST /api/projects healthy; project created; server stopped afterwards

No browser screenshots were taken in this round.

Posted by cubefarm · merges automatically once GitHub's checks pass

cabana8471-arch pushed a commit to cabana8471-arch/autoforge that referenced this pull request Nov 8, 2026
Adaptation: also corrected the run_parallel_orchestrator docstring (testing batch size is clamped to 1-15, not 1-5).

Integrates AutoForgeAI#291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Launch multiple subagents

1 participant