-
Notifications
You must be signed in to change notification settings - Fork 3
prompt.context / prompt.section: pay the ops roster on first use instead of injecting it at session start #2295
Copy link
Copy link
Open
Labels
cohort-29Open at the v0.60.0 tag, 2026-09-11. Frozen: nothing joins a cohort.Open at the v0.60.0 tag, 2026-09-11. Frozen: nothing joins a cohort.cohort-30Open at the v0.61.0 tag, 2026-09-12. Frozen: nothing joins a cohort.Open at the v0.61.0 tag, 2026-09-12. Frozen: nothing joins a cohort.cohort-31Open at the v0.63.0 tag, 2026-09-19. Frozen: nothing joins a cohort.Open at the v0.63.0 tag, 2026-09-19. Frozen: nothing joins a cohort.cohort-32Open at the v0.64.0 tag, 2026-09-23. Frozen: nothing joins a cohort.Open at the v0.64.0 tag, 2026-09-23. Frozen: nothing joins a cohort.enhancementNew feature or requestNew feature or requestlane-containmentpayload gate and trust model — reaches into other lanes, wants their reviewpayload gate and trust model — reaches into other lanes, wants their reviewpriority-mediumRecurring cost; compounds if unfixedRecurring cost; compounds if unfixed
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
cohort-29Open at the v0.60.0 tag, 2026-09-11. Frozen: nothing joins a cohort.Open at the v0.60.0 tag, 2026-09-11. Frozen: nothing joins a cohort.cohort-30Open at the v0.61.0 tag, 2026-09-12. Frozen: nothing joins a cohort.Open at the v0.61.0 tag, 2026-09-12. Frozen: nothing joins a cohort.cohort-31Open at the v0.63.0 tag, 2026-09-19. Frozen: nothing joins a cohort.Open at the v0.63.0 tag, 2026-09-19. Frozen: nothing joins a cohort.cohort-32Open at the v0.64.0 tag, 2026-09-23. Frozen: nothing joins a cohort.Open at the v0.64.0 tag, 2026-09-23. Frozen: nothing joins a cohort.enhancementNew feature or requestNew feature or requestlane-containmentpayload gate and trust model — reaches into other lanes, wants their reviewpayload gate and trust model — reaches into other lanes, wants their reviewpriority-mediumRecurring cost; compounds if unfixedRecurring cost; compounds if unfixed
Follows #2293. Two of the function-hook events are context sites, and they are the direct answer to "bytes charged to every session to serve some sessions are a cost, not a feature".
From
@anthropic-ai/claude-code-darwin-arm64@2.1.260(verified 2026-09-04):prompt.contextreceives{ blocks }and returns{ blocks }— the whole computed context, last stop before the model. Core is identity, so an empty chain changes nothing. It fails open, and the log line says exactly that:prompt.context: the dispatch failed, the context stands as core computed it: <err>.prompt.sectionis the same site one level down:{ name, text }in,{ text }out,text: nulldrops the section, and per the binary's own check message "the engine caches the section by it" (the name). There is arefreshContext()to invalidate, and each site carries abudgetMs.What this costs today. From a real session preamble, 2026-09-04:
and beside it a 13.2KB handoff that could not be printed and was spilled to a file for the agent to go read. All of it injected at session start, before anything knows whether the session touches supertool at all.
Three things this buys, in the order worth trying:
null, and on the first supertooltool.call,refreshContext()and return the real text. A session that never calls supertool never pays for its signature table. Today it always does.turn.completeis recomputed rather than stale — and a stale block that reads as current is this repo's own defect class (CLAUDE.md, "an absence produced by the tool, read as an absence in the world").The fail-open is what makes (1) safe to try first: if the module throws, the context is what core computed, which is today's behaviour exactly.
Open questions:
budgetMsis enough to compute a block that shells out. The roster is cheap; the board is not..claude/jit-context/. The jit rules already solve "cost nothing until the match fires" for path- and tool-matched rules. This is the same idea for the always-on block, and the two should not end up as two mechanisms answering one question.Blocked on the same flag as #2293:
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, flagtengu_plugin_hooks_modules, GrowthBook-gated.