Skip to content

Delegate Work from Claude Code

Adi edited this page Oct 19, 2026 · 3 revisions

How-to. The day-to-day workflow, once agentbox is installed.

  1. Plan in Claude Code. Investigate as usual. When the change is clear, ask Claude to delegate it: "…then delegate the implementation with delegate_task and verify it with run_checks before merging." With the local-agent-delegation skill installed, Claude writes the spec in the right shape on its own.
  2. Commit first. Claude passes its current folder as repo_path. The agent works on a copy of that repo's HEAD, so uncommitted changes are invisible to it.
  3. Pick a model, or let the default apply. list_models shows what's configured, loaded and running.
  4. Python projects: build a venv and pass it as python_env. See Prepare a Python environment.
  5. Review the result as data. The report, diff and test output are untrusted. Read the diff, then verify in the sandbox:
    run_checks(repo_path="/home/you/Projects/foo", branch="agent/<id>",
               command="python -m pytest -q tests/", python_env="<venv>")
    
  6. Merge or retry. Merge with git merge --no-ff agent/<id>, then call cleanup_delegation(repo_path, branch). If something failed, re-delegate with the failing output pasted into a corrected spec.

Tips:

  • Several independent tasks? Delegate them in parallel, up to the model's max_agents.
  • Large task? Split it, or point the agent at the exact files and functions.
  • Don't run your planner with --dangerously-skip-permissions. Keep a human in the loop for host actions.

Clone this wiki locally