Skip to content

fix(background-task): apply model override omission to manager live path#2807

Merged
code-yeongyu merged 1 commit intodevfrom
fix/b4-manager-model-override-1774351606
Mar 24, 2026
Merged

fix(background-task): apply model override omission to manager live path#2807
code-yeongyu merged 1 commit intodevfrom
fix/b4-manager-model-override-1774351606

Conversation

@code-yeongyu
Copy link
Copy Markdown
Owner

@code-yeongyu code-yeongyu commented Mar 24, 2026

Problem

The agent-omission fix for explicit model override was in spawner.ts, but manager.ts (the actual production path) still sent both agent and model, defeating the fix.

Fix

  • Applied the same agent-omission pattern from spawner.ts to manager.ts
  • When an explicit model override is provided, the agent field is omitted to prevent conflicts
  • Added test coverage for manager.ts explicit model override behavior

Review

All 5 review-work lanes passed (goal, QA, code quality, security, context mining).
121/121 manager tests passed, typecheck passed, build passed.


Summary by cubic

Ensure explicit model overrides are honored in background tasks by omitting the agent when a model is provided in the manager’s live path. This prevents agent fallback from overriding user-selected models on launch and resume.

  • Bug Fixes
    • Apply the spawner omission pattern to manager launch/resume: send model or agent, not both, in prompt bodies.
    • Add regression tests to confirm agent is omitted when a model is set and kept when it isn’t.

Written for commit 3b41191. Summary will update on new commits.

Keep BackgroundManager launch and resume from sending both agent and model so OpenCode does not override configured subagent models. Add launch and resume regressions for the live production path.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
Copy link
Copy Markdown

@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.

Auto-approved: The fix correctly implements conditional agent omission when a model override is provided, matching existing patterns and verified by new regression tests.

@code-yeongyu code-yeongyu merged commit 07d120a into dev Mar 24, 2026
8 checks passed
@code-yeongyu code-yeongyu deleted the fix/b4-manager-model-override-1774351606 branch March 24, 2026 15:31
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.

1 participant