CodingOpen SourceFreeActiveMachine-verified· intermediate · ~10 min setup

Kilo Code: ship a big feature as isolated subtasks with Orchestrator

Define the orchestrator's delegate modes (architect, code, debug) so a large task runs as isolated subtasks, each in its own clean context.

by Shilpa Mitra· verified today· v1.0.0

Run this workflow

CI-verified, 2/2 fixtures passing.

Build this with your agent

One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.

Intended Use

Anyone shipping genuinely multi-step features who wants context hygiene. CI validates that .kilocodemodes parses and the three modes the orchestrator delegates to (architect, code, debug) are present and enabled (each carries tool groups). No key, no model call. The actual decomposition and coding are fenced.

Not for

  • Small edits like renaming a variable, the orchestrator adds overhead there
  • Expecting CI to grade the decomposition or the summary handoff, those are fenced model steps

The Stack

Tested Against

kilocode@7.3.45kilo.ai/docs (2026-06)ruby@3.x (YAML stdlib)

Side effects & data flow

Network
none, local only
Writes
./.kilocodemodes
Credentials
none required

Prerequisites

  • Kilo Code extension installed
  • A provider/API key to actually run the modes

Steps

  1. 1

    Define the orchestrator's delegate modes and validate

    In .kilocodemodes, define the architect, code, and debug modes the orchestrator hands work to (defining a built-in slug here pins/overrides it for the project). Then switch to Orchestrator and give it the whole feature. Use 'Edit Project Modes' in the app to write valid config. CI parses the file and asserts all three delegate modes are present and enabled.

    cat > .kilocodemodes <<'YAML'
    customModes:
      - slug: architect
        name: Architect
        roleDefinition: You plan the work and produce a clear implementation plan.
        groups:
          - read
      - slug: code
        name: Code
        roleDefinition: You implement the planned changes.
        groups:
          - read
          - edit
      - slug: debug
        name: Debug
        roleDefinition: You diagnose and fix failing tests.
        groups:
          - read
          - edit
          - command
    YAML
    ruby -ryaml -e '
    c = YAML.load_file(".kilocodemodes")
    modes = c["customModes"] || []
    %w[architect code debug].each do |slug|
      m = modes.find { |x| x["slug"] == slug }
      abort "BAD: missing delegate mode #{slug}" unless m
      abort "BAD: #{slug} has no tool groups (not enabled)" if (m["groups"] || []).empty?
    end
    puts "config OK: orchestrator delegates to architect+code+debug, all present and enabled"
    '
  2. 2

    Run the feature through Orchestrator (the model step, not checked by CI)

    Switch to Orchestrator and give it the whole feature, e.g. 'add OAuth login: plan it, implement it, then debug the failing tests.' Each subtask runs in isolation and hands back a summary via attempt_completion. Write subtask goals that ask for the specifics you'll need downstream, since the handoff is lossy by design. The decomposition is fenced.

Eval, 2 fixtures

Last passed: verified today
  • delegates-presentcontainstimeout 30s · max $0

    Expected: config OK: orchestrator delegates to architect+code+debug, all present and enabled

  • clean-exitexit_codetimeout 30s · max $0

    Expected: 0

Results

Kilo's signature: the parent task stays lean while each subtask runs on a fresh history and hands back only a summary, so a long feature doesn't drown the main thread in context.

Did this work for you?

Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.

Liked this workflow?

Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).