Commit d16a296
committed
v0.8.11: kode subagent — OS-level task decomposition with process isolation
New features:
- 'kode subagent' command: runs a focused sub-task and outputs
JSON on stdout. Used by delegate_tasks tool for decomposition.
- 'delegate_tasks' tool registered as a built-in tool alongside
shell. Spawns sub-agent OS processes in parallel up to max 3.
- Task decomposition paragraph in default system prompt teaches
the parent agent when and how to delegate.
Architecture:
cmd/kode/subagent.go — subagent command: flag parsing,
agent creation, silent renderer, JSON stdout contract
cmd/kode/subagent_tool.go — delegate_tasks built-in tool:
JSON schema, process spawning, semaphore concurrency limit,
per-subagent timeout, result collation
Interface:
Stdout: {status:success,summary:...,files_changed:[...],
tokens_used:N,iterations:N}
Stderr: emoji-prefixed progress (suppressed with --quiet)
Exit codes: 0=success, 1=error, 2=timeout, 3=setup failure
Config (kode.json):
"subagent": {
"max_concurrency": 3,
"timeout_seconds": 120,
"max_iterations": 15
}
30 contract tests verify all flags, stdout format, exit codes,
tool schema, concurrency, timeout, and config parsing.
Zero new dependencies. Full OS process isolation per subagent.1 parent 17d6bfc commit d16a296
4 files changed
Lines changed: 1229 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
126 | 145 | | |
127 | 146 | | |
128 | 147 | | |
| |||
324 | 343 | | |
325 | 344 | | |
326 | 345 | | |
| 346 | + | |
327 | 347 | | |
328 | 348 | | |
329 | 349 | | |
| |||
340 | 360 | | |
341 | 361 | | |
342 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
343 | 366 | | |
344 | 367 | | |
345 | 368 | | |
| |||
452 | 475 | | |
453 | 476 | | |
454 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
455 | 483 | | |
456 | 484 | | |
457 | 485 | | |
| |||
916 | 944 | | |
917 | 945 | | |
918 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
919 | 952 | | |
920 | 953 | | |
921 | 954 | | |
| |||
0 commit comments