fix: persist user model preference across sessions (#284)#491
Merged
bradygaster merged 1 commit intodevfrom Mar 22, 2026
Merged
fix: persist user model preference across sessions (#284)#491bradygaster merged 1 commit intodevfrom
bradygaster merged 1 commit intodevfrom
Conversation
Add Layer 0 (Persistent Config) to the model selection hierarchy. When a user says 'always use opus', the preference is now written to .squad/config.json as 'defaultModel' and persists across sessions. Per-agent overrides are stored under 'agentModelOverrides'. Changes: - SDK: Add readModelPreference, writeModelPreference, readAgentModelOverrides, writeAgentModelOverrides, and resolveModel functions to config/models.ts - Coordinator: Update squad.agent.md with Layer 0 instructions for reading config.json on session start and persisting user model directives - Skill: Create .squad/skills/model-selection/SKILL.md documenting the 5-layer hierarchy (Persistent Config > Session Directive > Charter > Task-Aware Auto > Default) - Docs: Update model-selection.md with persistent preference documentation - Tests: Add 32 tests covering read/write/resolve round-trips Closes #284 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
Session: 2026-02-24-wave-d-kickoff Requested by: Brady Changes: - Logged orchestration for Hockney (PR bradygaster#487), Keaton (issues bradygaster#488–bradygaster#493), Fenster (timeout fix) - Created session log for Wave D kickoff with summary and next steps - Merged Wave D readiness assessment from inbox into decisions.md - Notified Cheritto, Kovash, Fortier of Wave D Batch 1 assignments via history.md updates - Cross-agent updates: Cheritto assigned P1 UX items (bradygaster#488–bradygaster#490), Kovash P2 hardening (bradygaster#491–bradygaster#492), Fortier streamBuffer cleanup (bradygaster#493) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
Implements configurable message history cap (default: 200) to prevent unbounded memory growth in long REPL sessions. - Lower DEFAULT_LIMITS.maxMessages from 1000 to 200 - Add MemoryManager.trimWithArchival() returning kept + archived arrays - Wire trimming into App.tsx via appendMessages() helper - All message append paths route through cap enforcement - Archived messages preserved in React state (not deleted) - Optional maxMessages prop on AppProps for configuration - Update stress test assertion for new default Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
Session: 2026-02-24T07-30-00Z-wave-d-batch1-impl Requested by: Coordinator Changes: - Logged orchestration for Cheritto (bradygaster#488, PR bradygaster#495): Unified Status Display - Logged orchestration for Fortier (bradygaster#493, PR bradygaster#494): StreamBuffer Cleanup on Error - Logged orchestration for Kovash (bradygaster#491, PR bradygaster#496): Message History Cap - Session log: Wave D batch 1 implementation summary - Decision inbox: empty (no new decisions to merge) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #284
Problem
Users reported that Squad forgets their model preference. Saying 'always use opus' would only apply within a session — the next session would revert to the default 4-layer hierarchy, spawning haiku/sonnet instead of the requested model.
Root Cause
The model selection hierarchy had no persistent storage layer. User directives were session-only (Layer 1), so they were lost on session end.
Fix
Added Layer 0 — Persistent Config to the model selection hierarchy. When a user says 'always use X', the preference is written to '.squad/config.json' as 'defaultModel' and persists across sessions.
5-Layer Hierarchy (new)
Changes
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com