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
{{ message }}
Repository navigation
[Bug] Multiple conflicting default mode settings between agents.config.json, package.json manifest, and ACP backend #1722
There are multiple conflicting sources of truth for default session mode:
SettingsManager.updateSetting('defaultMode', ...) writes to agents.config.json under nanocoder.defaultMode.
The extension manifest (plugins/vscode/package.json) defines "nanocoder.mode" with default "auto-accept".
acpClient._createSession() reads vscode.workspace.getConfiguration('nanocoder').get('mode') || 'auto-accept'. Because the manifest defines a default value, config.get('mode') is always populated, completely masking any defaultMode set in agents.config.json.
The backend ACP agent (source/acp/acp-agent.ts:821) hardcodes initialMode: 'auto-accept'.
Editing the default mode in the extension's Settings panel writes to agents.config.json, which has zero effect on new sessions.
Environment
OS: Linux (reviewed); macOS / Windows potentially affected
Node version: >= 22.0.0
Nanocoder version: 1.31.0
Steps to Reproduce
Open the Nanocoder Settings panel in VS Code.
Change the default mode to normal or plan.
Start a new session.
Check the mode assigned to the newly created session.
Expected Behavior
Settings configured in the UI should control new session defaults with a documented precedence hierarchy respecting Nanocoder's project and global configuration resolution:
Explicit session selection > VS Code explicit setting (nanocoder.mode) > Project/global configuration (defaultMode) > Fallback default (auto-accept).
Actual Behavior
Changes made in the Settings panel update agents.config.json, but acpClient always applies the manifest default of nanocoder.mode.
Additional Context
No matching open issue found in issue search performed on 2026-10-12
Relevant code paths inspected at commit d5ff9c37
Implementation Notes (optional)
Files:
plugins/vscode/src/settings-manager.ts:167
plugins/vscode/src/acp-client.ts:228-250
source/acp/acp-agent.ts:815-825
In _createSession(), check whether nanocoder.mode was explicitly configured by the user (using inspect('mode')). If not explicitly configured, resolve defaultMode from project/global Nanocoder configuration before falling back to auto-accept.
I'd like to pick this up. Proposed resolution order:
nanocoder.defaultMode in agents.config.json is the source of truth.
The VS Code nanocoder.mode setting only overrides it when the user set it explicitly. Use config.inspect('mode') instead of get('mode'), since get always returns the manifest default.
The ACP agent reads the configured default instead of hardcoding initialMode: 'auto-accept', and falls back to auto-accept only when nothing is set.
Values get validated against the allowed modes, with unit tests for the resolution order. Could you assign it to me?
Hi @Mahdi-Hasan, thanks for your interest! @Dhirenderchoudhary asked to be assigned to this issue first, so I've assigned it to them.
Please have a look at our other open issues, and I'd be happy to assign you one of those.
I'd be glad to take #1930 (string_replace on CRLF files) or #1932 (MCP results keep only the first content block). Neither has a claim yet. Could you assign one of them to me?
Thanks @Mahdi-Hasan for closing #1928. Both #1930 and #1932 are good picks. Which one would you like to take? Please comment on that issue saying you're picking it up, and I'll assign it to you.
Activity
Dhirenderchoudhary commentedon Oct 12, 2026
@addyCooks can i go for it
Mahdi-Hasan commentedon Nov 2, 2026
I'd like to pick this up. Proposed resolution order:
nanocoder.defaultModeinagents.config.jsonis the source of truth.nanocoder.modesetting only overrides it when the user set it explicitly. Useconfig.inspect('mode')instead ofget('mode'), sincegetalways returns the manifest default.initialMode: 'auto-accept', and falls back toauto-acceptonly when nothing is set.Values get validated against the allowed modes, with unit tests for the resolution order. Could you assign it to me?
fix(vscode): start new sessions in the configured defaultMode
addyCooks commentedon Nov 3, 2026
Hi @Mahdi-Hasan, thanks for your interest!
@Dhirenderchoudhary asked to be assigned to this issue first, so I've assigned it to them.
Please have a look at our other open issues, and I'd be happy to assign you one of those.
Mahdi-Hasan commentedon Nov 3, 2026
Thanks @addyCooks, no problem. I've closed #1928.
I'd be glad to take #1930 (string_replace on CRLF files) or #1932 (MCP results keep only the first content block). Neither has a claim yet. Could you assign one of them to me?
addyCooks commentedon Nov 4, 2026
Thanks @Mahdi-Hasan for closing #1928. Both #1930 and #1932 are good picks. Which one would you like to take? Please comment on that issue saying you're picking it up, and I'll assign it to you.
Mahdi-Hasan commentedon Nov 4, 2026
Thanks @addyCooks. I've commented on #1932 saying I'm picking it up.