You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeMode is available through the Runtime's explicit per-run toolMode, but the standard Desktop product has no user-facing way to select it. Direct remains the only effective product default.
Decision
Add one persisted tool-mode preference to the existing chat defaults settings:
auto
direct
code_mode
auto is the default and currently resolves to direct for every model. direct and code_mode are explicit user overrides.
Resolve the preference once at the product boundary into the existing Runtime ToolMode. Do not add auto to Runtime execution, duplicate the tool surface, or create another CodeMode path.
Scope
Add the closed preference type and settings normalization.
Add the selector to Settings alongside the existing chat defaults.
Propagate the resolved mode when creating a new run.
Persist the effective direct or code_mode value in the existing AgentRun record.
Show a clear unavailable state if the selected backend cannot execute CodeMode.
Preserve older settings files by normalizing a missing value to auto.
Acceptance
Existing settings resolve to auto, which currently produces Direct behavior.
Selecting Direct never exposes exec.
Selecting CodeMode exposes the existing exec path without changing tool authority or settlement.
The setting survives restart and applies to new runs.
Unsupported backends do not silently ignore an explicit CodeMode selection.
No model is automatically enabled by this issue.
Non-goals
Choosing model-specific defaults.
Adding CodeModeOnly.
Changing the CodeMode executor or Runtime tool contract.
Adding another tool registry, permission path, or execution mode.
Shipped in #5219 (3cfcb09fd): chatDefaults now carries a persisted codeModeEnabled preference (packages/core/src/settings.ts:515) with a selector in General settings, and #5345 applies it per turn. The landed shape is a toggle rather than the three-value auto / direct / code_mode enum proposed here, since auto and direct resolve identically for every model today. Closing.
Activity
nagarwal-godaddy commentedon Aug 25, 2026
Picking this up — plan: closed auto|direct|code_mode preference resolved once at the product boundary into existing ToolMode.
Astro-Han commentedon Sep 17, 2026
Shipped in #5219 (
3cfcb09fd):chatDefaultsnow carries a persistedcodeModeEnabledpreference (packages/core/src/settings.ts:515) with a selector in General settings, and #5345 applies it per turn. The landed shape is a toggle rather than the three-valueauto/direct/code_modeenum proposed here, sinceautoanddirectresolve identically for every model today. Closing.