Add a `task` tool for isolated subagents with typed results
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- git, rust
- Ambito
- ai-infra-agents
Direzione di ricerca
Start with src/agent/run.rs to see how the single Core runs one session and turn loop, then src/context/mod.rs to see how tool results join the conversation path. The design needs a nested turn loop with its own context, a tool allowlist intersected with the parent's, and a typed result returned to the parent. Done means the acceptance criteria in the issue hold: children return schema-valid JSON, denied tools and nested spawning are refused, and cancel leaves no worktree or process behind.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Every investigation shares the main context. A broad search, a log dump, or a 40-file review pollutes the parent conversation and pushes it toward compaction. omp and Claude Code isolate this with subagents that return a schema-validated result; Cline's spawn approval, by contrast, lets a child inherit far more than the parent intended.
LocalHarness runs on one GPU, so subagents cannot run in parallel for speed. They are still valuable for context isolation and for enforcing a narrower tool set.
Evidence
src/context/mod.rs: all tool results live on one conversation path.src/agent/run.rs: oneCore, one session, one model per turn.- oh-my-pi:
taskfans out into worktrees and returns schema-validated objects. - Claude Code subagents: separate context, tool allowlist, no nested spawning.
Proposal
Add a task tool (off by default) that runs a nested turn loop:
- Input:
objective,output_schema,tools(allowlist),max_turns,isolation(readonlyorworktree). - Child runs with a fresh context, the intersection of parent and requested tools, and no ability to spawn.
- Result: one JSON object matching
output_schema, plus an optional patch; prose is not parsed. - Serialize children on one GPU;
max_concurrent = 1by default. - Parent context receives only the typed result and a one-line summary, not the child transcript.
- Clean up worktrees and processes on cancel.
Acceptance criteria
- Three research children return valid JSON without adding their transcripts to the parent context.
- A child requesting a tool outside the parent's set gets
DENIEDand continues. - A child cannot spawn another child.
- Worktree patches apply cleanly or return a typed conflict.
- Cancel leaves no worktree or process behind.
- With one GPU, children run one at a time and the setting is documented.
References
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GotinhaAzul/LocalHarness
-
area: ux bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
GotinhaAzul/LocalHarness#198 ·
-
area: tools area: ux enhancement priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
GotinhaAzul/LocalHarness#201 ·
-
area: ux bug priority: P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
GotinhaAzul/LocalHarness#200 ·
-
area: ux bug priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GotinhaAzul/LocalHarness#199 ·
-
area: ux enhancement priority: P2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
GotinhaAzul/LocalHarness#197 ·
Tutte le issue di GotinhaAzul/LocalHarness
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
zed-industries/zed#67561 ·
I maintainer di solito rispondono entro 1 giorno
-
bug has: workaround PR welcome! T: CI/CD
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
chore priority:low ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jdrouet/catapulte#882 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100