Skip to content

Bug: YOLO resets after model change mid-session #322

@idofrizler

Description

@idofrizler

Problem

When changing models mid-session, the YOLO (auto-approve) setting resets unexpectedly.

Priority

🔴 P1 - HIGH | State management fix | ~1 hour

Root Cause

Model change triggers resumeSession which likely resets the YOLO state.

Implementation Details

  1. In src/renderer/App.tsx, find where model change triggers resumeSession
  2. The YOLO state is stored in yoloMode state
  3. When calling resumeSession with new model, session restarts but YOLO state should persist

Fix Options:

Option A: Store YOLO state in a ref that survives re-renders

const yoloModeRef = useRef(yoloMode);
// After resumeSession, restore: setYoloMode(yoloModeRef.current);

Option B: Store YOLO state in localStorage keyed by session ID

localStorage.setItem(`yolo-${sessionId}`, String(yoloMode));

Files to Modify

  • src/renderer/App.tsx (look for setYoloMode and model change handlers)

Testing

  1. Start a session
  2. Enable YOLO mode
  3. Change model mid-session
  4. Verify YOLO remains enabled

Acceptance Criteria

  • YOLO setting persists through model changes
  • YOLO setting persists through session resume

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-highHigh prioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions