revert: chore(config): disable agents by default (#23672)

This commit is contained in:
Abhi
2026-03-24 16:14:48 -04:00
committed by GitHub
parent 84f40768a1
commit 055ff92276
9 changed files with 15 additions and 16 deletions
+1 -1
View File
@@ -1540,7 +1540,7 @@ their corresponding top-level category object in your `settings.json` file.
- **`experimental.enableAgents`** (boolean): - **`experimental.enableAgents`** (boolean):
- **Description:** Enable local and remote subagents. - **Description:** Enable local and remote subagents.
- **Default:** `false` - **Default:** `true`
- **Requires restart:** Yes - **Requires restart:** Yes
- **`experimental.worktrees`** (boolean): - **`experimental.worktrees`** (boolean):
-6
View File
@@ -63,9 +63,6 @@ describe.skipIf(!chromeAvailable)('browser-policy', () => {
rig.setup('browser-policy-skip-confirmation', { rig.setup('browser-policy-skip-confirmation', {
fakeResponsesPath: join(__dirname, 'browser-policy.responses'), fakeResponsesPath: join(__dirname, 'browser-policy.responses'),
settings: { settings: {
experimental: {
enableAgents: true,
},
agents: { agents: {
overrides: { overrides: {
browser_agent: { browser_agent: {
@@ -183,9 +180,6 @@ priority = 200
rig.setup('browser-session-warning', { rig.setup('browser-session-warning', {
fakeResponsesPath: join(__dirname, 'browser-agent.cleanup.responses'), fakeResponsesPath: join(__dirname, 'browser-agent.cleanup.responses'),
settings: { settings: {
experimental: {
enableAgents: true,
},
general: { general: {
enableAutoUpdateNotification: false, enableAutoUpdateNotification: false,
}, },
@@ -29,6 +29,7 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
await importOriginal<typeof import('@google/gemini-cli-core')>(); await importOriginal<typeof import('@google/gemini-cli-core')>();
return { return {
...actual, ...actual,
PRIORITY_YOLO_ALLOW_ALL: 998,
Config: vi.fn().mockImplementation((params) => { Config: vi.fn().mockImplementation((params) => {
const mockConfig = { const mockConfig = {
...params, ...params,
@@ -341,11 +342,11 @@ describe('loadConfig', () => {
); );
}); });
it('should default enableAgents to false when not provided', async () => { it('should default enableAgents to true when not provided', async () => {
await loadConfig(mockSettings, mockExtensionLoader, taskId); await loadConfig(mockSettings, mockExtensionLoader, taskId);
expect(Config).toHaveBeenCalledWith( expect(Config).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
enableAgents: false, enableAgents: true,
}), }),
); );
}); });
+1 -1
View File
@@ -128,7 +128,7 @@ export async function loadConfig(
interactive: !isHeadlessMode(), interactive: !isHeadlessMode(),
enableInteractiveShell: !isHeadlessMode(), enableInteractiveShell: !isHeadlessMode(),
ptyInfo: 'auto', ptyInfo: 'auto',
enableAgents: settings.experimental?.enableAgents ?? false, enableAgents: settings.experimental?.enableAgents ?? true,
}; };
const fileService = new FileDiscoveryService(workspaceDir, { const fileService = new FileDiscoveryService(workspaceDir, {
@@ -400,7 +400,7 @@ describe('SettingsSchema', () => {
expect(setting).toBeDefined(); expect(setting).toBeDefined();
expect(setting.type).toBe('boolean'); expect(setting.type).toBe('boolean');
expect(setting.category).toBe('Experimental'); expect(setting.category).toBe('Experimental');
expect(setting.default).toBe(false); expect(setting.default).toBe(true);
expect(setting.requiresRestart).toBe(true); expect(setting.requiresRestart).toBe(true);
expect(setting.showInDialog).toBe(false); expect(setting.showInDialog).toBe(false);
expect(setting.description).toBe('Enable local and remote subagents.'); expect(setting.description).toBe('Enable local and remote subagents.');
+1 -1
View File
@@ -1932,7 +1932,7 @@ const SETTINGS_SCHEMA = {
label: 'Enable Agents', label: 'Enable Agents',
category: 'Experimental', category: 'Experimental',
requiresRestart: true, requiresRestart: true,
default: false, default: true,
description: 'Enable local and remote subagents.', description: 'Enable local and remote subagents.',
showInDialog: false, showInDialog: false,
}, },
+1 -1
View File
@@ -1027,7 +1027,7 @@ export class Config implements McpContext, AgentLoopContext {
this.model = params.model; this.model = params.model;
this.disableLoopDetection = params.disableLoopDetection ?? false; this.disableLoopDetection = params.disableLoopDetection ?? false;
this._activeModel = params.model; this._activeModel = params.model;
this.enableAgents = params.enableAgents ?? false; this.enableAgents = params.enableAgents ?? true;
this.agents = params.agents ?? {}; this.agents = params.agents ?? {};
this.disableLLMCorrection = params.disableLLMCorrection ?? true; this.disableLLMCorrection = params.disableLLMCorrection ?? true;
this.planEnabled = params.plan ?? true; this.planEnabled = params.plan ?? true;
+5 -1
View File
@@ -88,7 +88,11 @@ export * from './utils/approvalModeUtils.js';
export * from './utils/fileDiffUtils.js'; export * from './utils/fileDiffUtils.js';
export * from './utils/retry.js'; export * from './utils/retry.js';
export * from './utils/shell-utils.js'; export * from './utils/shell-utils.js';
export { PolicyDecision, ApprovalMode } from './policy/types.js'; export {
PolicyDecision,
ApprovalMode,
PRIORITY_YOLO_ALLOW_ALL,
} from './policy/types.js';
export * from './utils/tool-utils.js'; export * from './utils/tool-utils.js';
export * from './utils/terminalSerializer.js'; export * from './utils/terminalSerializer.js';
export * from './utils/systemEncoding.js'; export * from './utils/systemEncoding.js';
+2 -2
View File
@@ -2680,8 +2680,8 @@
"enableAgents": { "enableAgents": {
"title": "Enable Agents", "title": "Enable Agents",
"description": "Enable local and remote subagents.", "description": "Enable local and remote subagents.",
"markdownDescription": "Enable local and remote subagents.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`", "markdownDescription": "Enable local and remote subagents.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `true`",
"default": false, "default": true,
"type": "boolean" "type": "boolean"
}, },
"worktrees": { "worktrees": {