Repository navigation
Handoff tuning: route exploration to quick tasks, arm the quick grain, confirm quick fan-outs #1016
Copy link
Copy link
Closed
Description
Goal
Chat is the front desk: cheap to talk to, fast to answer words. Work ships off to tasks. Every decision about when work leaves the chat, what shape it leaves in, and how big a piece is cut should be made at the pareto of cost, wall time and quality — and confirmed where a wrong decision spends real money.
This issue is the tracker. Waves are ordered cheap-and-safe → structural. Wave D records what was considered and decided against so it does not come back.
Wave A — prompt and schema, no new machinery
- A1. Route broad read-only exploration to
quick_task. Today the judge text says "a quick task is a small thing: a few files, a few minutes", which steers medium exploration (10–30 files) back into the chat's own context where it costs window and turn time. Add one clause tohandoffFacts(internal/session/beltfacts.go): broad read-only sweeps — many files, many sources, "where/how does X work" — go toquick_taskwith an items list, not into the caller's own context. Add routing examples toquickTaskDescription(internal/session/task_quick.go).
Acceptance: a words-only broad exploration request produces a quick task with an items list, not a long inline read turn. - A2. Un-cap the quick grain. The 2026-09-10 measurement (task_quick.go header): a quick task sized at twenty files died at
taskNoProgress(6 read-only steps) after 500s and $0.62.propose_task's schema exposesno_progressfor exactly this;quick_task's does not. Expose it (same interpolated default), or derive the budget fromlen(items).
Acceptance: a 15-item exploration quick task is not stopped attaskNoProgresswhile still ticking items. - A3. Trust-the-landing clause. carryontasks_test.go's measured failure: a chat re-read a landed quick task's answer three times. Add one sentence to
handoffFacts: a landing note IS the answer — fold it, never re-open the work to check it.
Acceptance: no continuation is written into a turn waiting on or folding its own quick task's landing. - A4. Sharpen the quick report contract. prompts/quick.md: findings first, absolute paths, explicit "searched X, no Z" for negative results.
- A5. Prefix budget funding. New bytes in
handoffFacts, the quick schema and quick.md must be funded by compressing the same fragments — the lean prefix has ~5 bytes of headroom after the chat-loop-economy wave, and the budget only ratchets down (internal/session/prefixbudget_test.go).
Wave B — structural, one reused mechanism
- B1. Confirm quick fan-outs before admission.
propose_taskhas a human gate (the countdown card).quick_taskhas none: no card, no audit, starts instantly — and a batch of mis-shaped quick tasks spends money before anybody reads anything. Reuse the division-review shape (reviewDivision,RoleDivision, mastermind tier,callRoleCheckedbudget): a batch of ≥2 quick tasks, or one whose items read like a division, gets ONE review of all parts together before admission. Refusal is an ordinary tool result; nothing is cancelled, nothing spent.
Acceptance: a scripted chat emitting 3 overlapping quick tasks gets them merged or amended by one mastermind call; a single small quick task admits unreviewed. - B2.
consulttool. Model-initiated one-shot question to the mastermind tier (callRole), bounded per turn (~2), conversations only (task nodes already have the division-review door). For uncertainty the model can name itself.
Known limit, stated up front: the models that most need a second opinion ask for it least (the markreader measurement) — so B1, not B2, carries the reliability. B2 is the escape valve. - B3. Model-conditional worker pages — measured experiment only. Short imperative variant of prompts/worker.md and prompts/quick.md for small tiers. No prefix-cache cost (the prefix is per-model already); the cost is a second page to keep true. Bench before shipping; drop if it does not move outcomes.
Wave C — when plandb attaches natively
- C1. Chat-turn items replace the batch-sentence law and the held-note gate (mandated narration → structured plan rows).
- C2. Re-evaluate
RoleMarkReaderandRoleHandoffagainstSELECTfrom the plan table: both exist to synthesize state a database will then hold. Replace inputs with facts; delete calls only after a bench shows the structured state answers "what is left" as well.
Wave D — decided against (do not re-propose without new measurements)
- Runtime-generated worker personas in a KV store: unbounded prompt variance, cache misses, drift, no measured consumer.
build_harnessis the door for recurring work shapes. - Model-summarizing compaction: our mechanical stub+fold with the full record in the store is cheaper and lossless; prose summaries compound summary-of-summary drift.
- Best-of-N task attempts by default: a cost multiplier; maybe later as an option on hard changes, never the default.
- Persona prose on generic tasks: words without mechanism — the shapes-list ruling (beltfacts.go) already measured that a prose routing list teaches matching, not judgement.
Notes
- Every item touching prompt or tool surface carries its
internal/manual/chat/page updates and a change entry in the same PR (the manual law). - Branched off
fix/chat-loop-economy(session, provider: the chat loop's economy — read dedupe, slice folding, floor, billed arms, cache pin, shaped gate, stale-build sweep #1015) and stacked on it until that merges.
Drafted with CodeAF · reviewed and owned by the author
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
session: route wide reads to quick tasks, arm their no_progress dial
manual, session: document the quick no_progress dial and pin it
session: consult — a bounded second opinion to the tier that thinks (…
session: read quick fan-outs together before any of them starts (wave…
session: read quick fan-outs together before any of them starts (wave…
session: read quick fan-outs together before any of them starts (wave…
session: lean worker and quick pages (wave B3 experiment)
revert: quick fan-out read-as-a-group (wave B1) and its table row
session: the family gate — second-ever quick child is read before it …
session: the already-read pointer is self-limiting
cmd: a one-shot errand does not divide below three independent parts
provider: a slow-TTFT model never opens a hedge arm
cmd: fix the errand gate to fold unconditionally