feat(lilith): episode tool-result budget for sibling teachers (dojo Broker) #551
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lilith-sibling-result-budget"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Run 3 (RESULT:
training/results/lilith-program-r3-20261005-RESULT.md, PR #550, hypothesis 1) lost 20 of 21 Green teacher siblings and 5 of 10 Brown ones as unfit: the sealed teachers read 29k–59k-character replay results (oneget_work_item_detail, tenlist_work_itemspages) and the rendered records were 29k–118k tokens. Per-callmax_result_charsbounds one result; nothing bounded the episode.This adds an episode-level tool-result budget to the dojo
Broker, enforced where the teacher's calls flow (the client-pushed HTTP MCP inacp_teacher, and the in-process runner), so a sibling record is exactly what the teacher saw:Broker(..., episode_result_chars): the straddling call is cut with the existing truncation encoding; later calls get a well-formedresult_budget_exhaustedmarker (isError: false, receipt kept, the replay call still served and recorded).RunnerConfig.episode_result_chars(default None = today's behaviour);RunTrace.result_budgetaccounting (budget, used, calls, truncated, exhausted) lands inepisodes.jsonland on each sibling row asteacher.result_budget.dojo.siblings --max-result-chars(60000) and--episode-result-chars(None).Run 4 (plan
docs/ai/plans/2026-10-06-lilith-program-r4-siblings-in-context.md) runs the teachers with--max-result-chars 16000 --episode-result-chars 40000against a 32k training context.Tests:
uv run --with pytest python -m pytest dojo/tests -q→ 505 passed (10 new intest_result_budget.py).