Repository navigation
refactor(harness)!: retire the subagent tool - #190
Merged
Merged
Conversation
A conversation now does delegated work itself. Measured on real tasks, parallel subagents shared one small sandbox and were slower, dearer, and less correct than direct work, and Pi already runs a turn's tool calls in parallel. start_task stays for direct messages. ADR 0028 supersedes 0020. BREAKING CHANGE: ConversationResponder drops replaceSubagentProgress and respondAsRole; Workspace drops agentsDir; <workspace>/agents profiles are ignored.
Production subagents read a median 56k tokens and returned about 190, so isolation keeps large investigations out of the parent's context. The tool now takes one task, gives the child the parent's model and tools, and has no profiles, batches, DAG, dashboard, budget, or timeout. ADR 0028 records the measurements.
…olation" This reverts commit a0c494a.
Deploying m
9EEF
ikan with
|
| Latest commit: |
e5ab5dd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5ff7cda0.mikan-1wv.pages.dev |
| Branch Preview URL: | https://refactor-retire-subagent.mikan-1wv.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Retire the
subagenttool. A conversation now does the work itself; Pi already runs one turn's tool calls in parallel, and Slack direct messages keepstart_taskfor long work. ADR 0028 supersedes ADR 0020.Removed: the tool, built-in and
<workspace>/agents/*.mdprofiles, the slot pool, the progress dashboard, the Slack persona posting for a profile's answer, and the subagent telemetry. 53 files, +115 / −4,434 lines.Why
docs/research/delegation-cost-2026-10.md: on measured tasks, parallel subagents shared one small sandbox (1 CPU, 512 MB), ran CPU work slower than in sequence and OOM-killed
npm install, missed the provider cache with every new child, and cost 2–3× more than direct work.Context isolation, checked before deciding
The one remaining reason to keep a subagent was keeping a large investigation out of the parent's context. A single-task variant was built and measured on this branch (commit a0c494a, reverted in 88547d4):
So the PR removes the tool entirely, as Pi keeps subagents out of its core. Details: experiment 7 in the research doc.
Acceptance eval
Local daemon, real Slack, cliproxyapi
gpt-6-luna, same harness and fixtures (complex.mjs). Baseline ismainfrom the research runs. Median seconds to the final reply (range) | score per rep | median cost (assumed prices, for comparison only).main)Accepted regressions, both measured:
main(1 of 3 in the research runs).npm installs at once through codemode and the 512 MB sandbox killed one (exit 137), so one or two test counts were missing. Parallel subagents hit the same OOM onmain(2 of 3). The cause is the sandbox size under parallel work, not delegation; it is a separate follow-up.Compatibility
ConversationResponderdrops the optionalreplaceSubagentProgressandrespondAsRole;WorkspacedropsagentsDir. An embedder that set or read them must drop them.<workspace>/agents/*.mdis ignored.chat:write.customizestays in the manifest so installed apps need no scope change; docs say it is unused.Verification
the model is offered no subagent toolfails onmainand passes here.lint,fmt:check,knip,typecheck,build, full test suite (2,063 passed), duplication guard.event-thread-fork), and it mistyped an attachment path (multi-file-upload, ENOENT on a path missing two characters).