From 180ae10e2b7814c521b544de6492cc662a7ddc6b Mon Sep 17 00:00:00 2001 From: Gagan Date: Tue, 21 Jul 2026 16:32:18 +0530 Subject: [PATCH] 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. --- apps/x/apps/renderer/src/lib/session-chat/turn-view.ts | 4 ++-- apps/x/packages/shared/src/turns.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/x/apps/renderer/src/lib/session-chat/turn-view.ts b/apps/x/apps/renderer/src/lib/session-chat/turn-view.ts index 707f3be7..e12e47c3 100644 --- a/apps/x/apps/renderer/src/lib/session-chat/turn-view.ts +++ b/apps/x/apps/renderer/src/lib/session-chat/turn-view.ts @@ -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`, diff --git a/apps/x/packages/shared/src/turns.ts b/apps/x/packages/shared/src/turns.ts index 1626b367..7c9cf914 100644 --- a/apps/x/packages/shared/src/turns.ts +++ b/apps/x/packages/shared/src/turns.ts @@ -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.", }; }