Skip to content

Conversation

@LTS2
Copy link
Contributor

@LTS2 LTS2 commented Jan 16, 2026

Summary

  • Fix model override not persisting when background tasks are resumed via sisyphus_task

Changes

  • src/features/background-agent/manager.ts: Add model to prompt body in resume method, matching the launch method pattern
  • src/features/background-agent/manager.test.ts: Add tests for model persistence on resume

The resume path was missing the model parameter that launch() correctly passes. When a task with a category-configured model was resumed, it would revert to the default model instead of using the stored override.

Testing

bun run typecheck
bun test src/features/background-agent/

Related Issues

Closes #826

Note

CI may fail due to a pre-existing flaky test issue on dev branch. See #848 for details.

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 2 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 2 times, most recently from 7169b14 to 50c6790 Compare January 16, 2026 09:12
The resume method was not passing the stored model from the task,
causing Sisyphus-Junior to revert to the default model when resumed.

This fix adds the model to the prompt body in resume(), matching
the existing behavior in launch().

Fixes code-yeongyu#826
@LTS2 LTS2 force-pushed the fix/826-sisyphus-junior-model-override branch from 50c6790 to 8402b55 Compare January 16, 2026 09:21
@kdcokenny
Copy link
Collaborator

@LTS2 not passing the model seems to have been the intended behavior. Have you manually tested that your change works as intended without side effects?

Also, I need @KNN-07 to give a second opinion on this.

@KNN-07
Copy link
Collaborator

KNN-07 commented Jan 16, 2026

@LTS2 not passing the model seems to have been the intended behavior. Have you manually tested that your change works as intended without side effects?

Also, I need @KNN-07 to give a second opinion on this.

I don't think not passing is intended tho. Assuming no config change after the init, this should work. Still need some manual testing

Edit: btw I noticed the CI failing one test? Is it related? If yes maybe fix it

@kdcokenny
Copy link
Collaborator

@LTS2 not passing the model seems to have been the intended behavior. Have you manually tested that your change works as intended without side effects?
Also, I need @KNN-07 to give a second opinion on this.

I don't think not passing is intended tho. Assuming no config change after the init, this should work. Still need some manual testing

the reason is say that is that this pr removes the comment // Note: Don't pass model in body - use agent's configured model instead

@KNN-07
Copy link
Collaborator

KNN-07 commented Jan 16, 2026

@LTS2 not passing the model seems to have been the intended behavior. Have you manually tested that your change works as intended without side effects?

Also, I need @KNN-07 to give a second opinion on this.

I don't think not passing is intended tho. Assuming no config change after the init, this should work. Still need some manual testing

the reason is say that is that this pr removes the comment // Note: Don't pass model in body - use agent's configured model instead

Yea, but in resuming context, should it keep using prev model? Think about it, I think just keep the previous approach: Honor the configuration instead of override

@GollyJer
Copy link
Collaborator

This looks like a good update to me. I traced this by talking with the codebase. I wanted to understand all the reasons for resuming a task and whether or not it makes sense to pass in the model.

Reasons for Task Resuming:

  1. User Choice: People explicitly resume completed tasks to continue/extend work or retry with new instructions
  2. Auto-Completion: Tasks stop automatically when the agent finishes (session goes idle + has valid output + no pending todos)
  3. External Coordination: Tasks created by other tools get tracked for notifications
  4. Recovery: Tasks interrupted by crashes, restarts, or timeouts can be restarted

Why This Change Makes Sense:

Background tasks launched with specific models (from category configs like "visual-engineering" → "google/gemini-3-pro-preview") should resume with the same model they started with. Currently:

  • Launch: ✅ Passes model from category config
  • Resume: ❌ Doesn't pass model, uses agent's default

This inconsistency means resumed tasks could switch models unexpectedly. The proposed change adds ...(existingTask.model ? { model: existingTask.model } : {}) to resume, ensuring model consistency and maintaining the original task's intended behavior.

Impact: Prevents model drift during task continuation, especially important for category-specific model requirements. 🎯

@GollyJer GollyJer merged commit e37493a into code-yeongyu:dev Jan 17, 2026
5 of 6 checks passed
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]: Unable to override model via config for Sisyphus-Junior background task

4 participants