fix(service,desktop): only Settings changes the coding agents' default model

Merged
CH
12d ago
+105-81

The developer's default coding model kept changing on its own. That happened because any Start that named a model saved that model as the account's default. Now only Settings → Coding agents → Default model changes it.

What changed the default before

  • Picking from Start's chevron menu.
  • Choosing a model on a new-agent draft, a fork or a continue.
  • Luke's own start_agent call naming a model. Only coding agents starting agents, and automation runs, opted out.

What changes

  • Service: startCodingAgent no longer writes the account preferences. The rememberChoice flag and its opt-outs in coding-agent-tools.ts and automation-runs.ts are gone. A model a Start names runs that one agent and nothing more.
  • Desktop: a pick in Start's chevron menu now applies only to that task's Start button, which is drawn fresh for each task. The main button starts on the pick. With no pick, it sends no choice, so the service runs the default. writeDefault is gone from CodingAgentsControl. Settings keeps its own codingAgents.defaultWrite path.
  • Docs: docs/TASKS.md, packages/service/README.md and the comments now say this.

Tests

  • Service: a Start naming a model runs on it and leaves the account's default unset.
  • Desktop: Start with nothing picked names no choice. After turning Fast on in the menu, Start starts on the pick.
  • pnpm check:affected ran out of memory in the sandbox when it ran everything at once. I ran its parts one at a time and all passed:
    • lint, knip, and discarded-effect (with a larger heap)
    • desktop and service typecheck
    • the touched service tests (228 tests)
    • the desktop tasks/, Settings and Start button tests (868 tests)

Made with Luke


Devin Review