Skip to content

Fix broadcast model switching: skip /model when model names are empty#3

Open
jsell-rh wants to merge 1 commit intomarkturansky:mainfrom
jsell-rh:fix/broadcast-model-skip
Open

Fix broadcast model switching: skip /model when model names are empty#3
jsell-rh wants to merge 1 commit intomarkturansky:mainfrom
jsell-rh:fix/broadcast-model-skip

Conversation

@jsell-rh
Copy link

@jsell-rh jsell-rh commented Mar 6, 2026

Summary

  • Fix broken model switching during broadcast check-ins where /model was sent with an empty model name, causing timeouts
  • When checkModel/workModel are empty strings (which is always the case currently), the /model commands are now skipped entirely
  • Model economy still works if actual model names are passed in the future

Changes

  • internal/coordinator/tmux.go: Wrap model switch and restore steps in if checkModel != "" / if workModel != "" guards in runAgentCheckIn()

Testing

  • All existing tests pass with -race
  • The model switching logic requires live tmux sessions and is not unit-testable, but the conditional is straightforward

…are empty

The callers of BroadcastCheckIn and SingleAgentCheckIn always pass empty
strings for checkModel and workModel, causing '/model ' (with no model
name) to be sent to agents. This resulted in broken model switch attempts
that would time out or fail.

Now when checkModel/workModel are empty, the model switch steps are
skipped entirely and the check-in runs on whatever model the agent is
already using. Model economy still works if actual model names are 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.

1 participant