village-builder

VB-1616: Agent workflow: adaptive context resets at task boundaries, beside the 120-call ceiling

Status: done (2026-11-24) Priority: 3 Size: M Design ref: .claude/agents/vb-task.md, step 8 (the ceiling and the handover); docs/agents/worker.md, section 1.3 (a task that reports continue); docs/review-agent-workflow.md, sections 2 and 8, and VB-1615’s section 10 (the estimate); tools/inbox.js (CEILING, result, calls); AGENTS.md, Taking a task, step 5 and Spending turns Goal: An agent whose context has grown past a threshold T hands the rest of its task to a fresh context at a cognitive boundary (the investigation done, or a coherent phase committed with tests green), or when it is stuck. It does so through the existing continuation, with a structured handover that carries what the next context needs and nothing else: verified facts, hypotheses, rejected hypotheses, decisions and their reasons, invariants, the criteria left, commands and source locations. The 120-call ceiling stays as the safety net, unchanged. The reset is enabled as a logged change, which starts a period that VB-1615’s tools compare with the period before. It is then kept, adjusted or abandoned by the rules under Evaluation. A smaller context is not, by itself, evidence of better work. Acceptance criteria: