Skip to content

Commit abb4d57

Browse files
jnjpngletta-code
andcommitted
fix(tui): don't clear conversation model override on transient retrieve errors
The sync effect's catch block was calling applyAgentModelLocally() on any conversations.retrieve failure, which cleared the hasConversationModelOverride flag and reset the model display to agent defaults — even though the override was still persisted in the DB. This caused intermittent model snap-back that didn't require a recent /model command to trigger: any transient network error during the sync cycle would discard the local override knowledge, and without another agentState change to re-trigger the effect, the reset persisted for the remainder of the turn. The fix simply preserves current local state on error. The next sync cycle will retry the retrieve and self-correct if needed. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
1 parent 603e594 commit abb4d57

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/cli/App.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,13 @@ export default function App({
33763376
"Failed to sync conversation model override: %O",
33773377
error,
33783378
);
3379-
applyAgentModelLocally();
3379+
// Preserve current local state on transient errors — the override flag
3380+
// was set by a successful /model write and should not be cleared by a
3381+
// failed read. The next sync cycle will retry and self-correct.
3382+
debugLog(
3383+
"conversation-model",
3384+
"Keeping current model state after sync error (override in DB is authoritative)",
3385+
);
33803386
}
33813387
};
33823388

0 commit comments

Comments
 (0)