Skip to content

The chat's model list opened before a first message starts the agent - #289

Merged
endrix merged 2 commits into
mainfrom
fix/chat-models-before-first-use
Dec 4, 2026
Merged

endrix merged 2 commits into
mainfrom
fix/chat-models-before-first-use

Conversation

@endrix

@endrix endrix commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Since #268 the chat's agent starts at the chat's first use, and until then the host answered the panel's model list with nothing. The list held only "Default model" until a message was sent, so a model (and its provider) could not be chosen before the first message.

  • Opening the model list (a press or a key on it) is now a use of the chat: the panel asks for the models with start: true (once), the host starts the agent, the panels read "Connecting…", and the list fills with the agent's models.
  • chat.getProviders without start is answered as before: nothing is spawned for a panel's own request.
  • An editor whose chat is never touched still starts no agent.

Checked by unit tests (chat-runtime-agent-on-demand, chat-panel-connected-agent), the typechecks, the neutrality gate and the build, and live in wfpy-ide (headless harness): "Not started" with "Default model", one press on the list, then "Connected · opencode" and its 33 models.

Not changed here (as before #268): with no chat open the host sends no current model, so the list shows its first entry rather than the agent's default.

https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya

Since #268 the chat's agent starts at the chat's first use, and the host
answered the model list with nothing until then: the list held only
"Default model" until a message was sent, so a model (and its provider)
could not be chosen first.

Opening the list (a press or a key on it) is now a use: the panel asks
for the models with `start`, the host starts the agent ("Connecting…")
and answers its models. An editor whose chat is never touched still
starts nothing.

Checked live in wfpy-ide (headless harness): "Not started" and "Default
model", one press on the list, then "Connected · opencode" and its 33
models.

Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
…n after a failed start

What the review of #289 turned up:

- Only a primary press, or a key that opens a list (Enter, Space, the
  arrows), starts the agent: Tab through the list, or a right click on
  it, no longer does.
- After a start that failed ("Disconnected", no models), opening the list
  starts it again; not while the agent's CLI has the session.
- "Not started" says the model list is one of the uses that start it.

Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
@endrix
endrix merged commit b453c70 into main Dec 4, 2026
1 check 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