Skip to content

Conversation

@LTS2
Copy link
Contributor

@LTS2 LTS2 commented Jan 24, 2026

Summary

  • Fix Sisyphus to use the model selected via UI before the first message is sent
  • Add session model storage to capture model info in chat.message hook
  • Use stored session model as fallback in delegate_task when prevMessage is unavailable

Changes

  • state.ts: Add SessionModel interface and storage functions (setSessionModel, getSessionModel, clearSessionModel, updateSessionModel)
  • index.ts: Store UI-selected model in chat.message hook, cleanup in session.deleted event
  • tools.ts: Use stored session model as fallback for first message scenario

Test plan

  • Added 7 unit tests (67 pass, 1 skip, 0 fail)
  • Manual test: Select model in new session, trigger Sisyphus on first message, verify selected model is used

Fixes #1024


Summary by cubic

Fixes model inheritance at session start so the UI-selected model is used on the first message, preventing Sisyphus from defaulting to the wrong model.

  • Bug Fixes
    • Persist the session’s selected model (first-write wins) with set/get/update/clear helpers.
    • Save the UI-selected model in the chat.message hook and clear it on session.deleted.
    • Use the stored session model as fallback in delegate_task when prevMessage is not available.
    • Added unit tests covering model storage and the first-message fallback scenario.

Written for commit 4f84007. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@LTS2 LTS2 force-pushed the fix/826-sisyphus-junior-model-override branch from 6c48e7a to fb75147 Compare January 26, 2026 01:12
- Add session model storage in claude-code-session-state
- Store model in chat.message hook before first message
- Use stored model as fallback in delegate_task when prevMessage unavailable
- Add cleanup on session.deleted event

Fixes code-yeongyu#1024
@LTS2 LTS2 force-pushed the fix/826-sisyphus-junior-model-override branch from fb75147 to 4f84007 Compare January 26, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Switching Sisyphus model before session starts does not take effect

1 participant