What would you like?
The lifecycle should enforce a cap on how many read/search calls the model makes before it starts writing. If the model exceeds the budget without producing any edits, the host injects a nudge to start implementing or signal blocked.
Motivation
The model over-explores — a session made 28 searches and 18 file reads before writing a single line, burning the token budget on reconnaissance. The search tool caps help, but the model still has no pressure to stop gathering context and start working. The host already tracks tool calls by category in the session call log, so the data is there.
Proposed approach
Track consecutive read/search calls without an intervening write. When the count exceeds a threshold (e.g. 8–10 read-category calls), inject a system message into the conversation nudging the model to start implementing. Use the existing tool category metadata and SessionContext.callLog to count.
Scope
tool-session.ts or lifecycle-generate.ts — exploration budget tracking and nudge injection
agent-instructions.ts — reinforce in core instructions that exploration should be bounded
lifecycle-constants.ts — exploration budget threshold
What would you like?
The lifecycle should enforce a cap on how many read/search calls the model makes before it starts writing. If the model exceeds the budget without producing any edits, the host injects a nudge to start implementing or signal blocked.
Motivation
The model over-explores — a session made 28 searches and 18 file reads before writing a single line, burning the token budget on reconnaissance. The search tool caps help, but the model still has no pressure to stop gathering context and start working. The host already tracks tool calls by category in the session call log, so the data is there.
Proposed approach
Track consecutive read/search calls without an intervening write. When the count exceeds a threshold (e.g. 8–10 read-category calls), inject a system message into the conversation nudging the model to start implementing. Use the existing tool category metadata and
SessionContext.callLogto count.Scope
tool-session.tsorlifecycle-generate.ts— exploration budget tracking and nudge injectionagent-instructions.ts— reinforce in core instructions that exploration should be boundedlifecycle-constants.ts— exploration budget threshold