fix(x): wrap-up call answers substantively, not with a status report

The budget notice now tells the model to answer the user's request with
the content it already gathered before noting what's unfinished, and
the fallback limit-failure bubble drops the 'work is saved' phrasing.
This commit is contained in:
Gagan 2026-07-21 16:32:18 +05:30
parent f270f39e35
commit 180ae10e2b
2 changed files with 5 additions and 4 deletions

View file

@ -336,8 +336,8 @@ export function buildTurnConversation(state: TurnState): ConversationItem[] {
// limit; if a hard limit failure still lands here, explain it and point
// at the setting instead of showing the raw runtime error.
const message = state.terminal.code === MODEL_CALL_LIMIT_ERROR_CODE
? `This turn stopped after reaching its model-call limit of ${state.definition.config.maxModelCalls}. ` +
'Work completed so far is saved above. You can raise the limit in Settings → Advanced.'
? `This turn hit its model-call limit of ${state.definition.config.maxModelCalls} before it could finish. ` +
'You can raise the limit in Settings → Advanced.'
: state.terminal.error
items.push({
id: `${turnId}:error`,

View file

@ -248,8 +248,9 @@ export function wrapUpNotice(
role: "user",
content:
`[system notice] You are on the final model call this turn's budget allows (model-call limit: ${maxModelCalls}); tools are no longer available. ` +
"Give your best final answer using only the work above: present what you completed, state clearly what remains unfinished, " +
"and let the user know the turn was cut short by the model-call limit, which they can raise in Settings → Advanced.",
"Now answer the user's request as fully and substantively as you can from the tool results and information already gathered above — " +
"give them the actual content, not a status report. Then briefly note which parts you didn't get to, " +
"and mention the turn was cut short by the model-call limit, which they can raise in Settings → Advanced.",
};
}