From 5cc23266471423b60e6a793fc9f04f1197511c29 Mon Sep 17 00:00:00 2001 From: Abhi Date: Fri, 20 Mar 2026 18:12:38 -0400 Subject: [PATCH 1/2] fix(core): refine CliHelpAgent description for better delegation --- packages/core/src/agents/cli-help-agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/agents/cli-help-agent.ts b/packages/core/src/agents/cli-help-agent.ts index ad8d2bebde7..bd968781901 100644 --- a/packages/core/src/agents/cli-help-agent.ts +++ b/packages/core/src/agents/cli-help-agent.ts @@ -30,7 +30,7 @@ export const CliHelpAgent = ( kind: 'local', displayName: 'CLI Help Agent', description: - 'Specialized in answering questions about how users use you, (Gemini CLI): features, documentation, and current runtime configuration.', + 'Specialized agent for answering questions about the Gemini CLI application. Invoke this agent for questions regarding CLI features, configuration schemas (e.g., policies), or instructions on how to create custom subagents. It queries internal documentation to provide accurate usage guidance.', inputConfig: { inputSchema: { type: 'object', From 54ff63dd77c4f272ba4ec3b8ce1be63164691d5f Mon Sep 17 00:00:00 2001 From: Abhi Date: Sat, 21 Mar 2026 02:00:09 -0400 Subject: [PATCH 2/2] add behavioral eval for cli_help subagent --- evals/cli_help_delegation.eval.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 evals/cli_help_delegation.eval.ts diff --git a/evals/cli_help_delegation.eval.ts b/evals/cli_help_delegation.eval.ts new file mode 100644 index 00000000000..8be3bf1c51c --- /dev/null +++ b/evals/cli_help_delegation.eval.ts @@ -0,0 +1,25 @@ +import { describe, expect } from 'vitest'; +import { evalTest } from './test-helper.js'; + +describe('CliHelpAgent Delegation', () => { + evalTest('USUALLY_PASSES', { + name: 'should delegate to cli_help agent for subagent creation questions', + params: { + settings: { + experimental: { + enableAgents: true, + }, + }, + }, + prompt: 'Help me create a subagent in this project', + timeout: 60000, + assert: async (rig, _result) => { + const toolLogs = rig.readToolLogs(); + const toolCallIndex = toolLogs.findIndex( + (log) => log.toolRequest.name === 'cli_help', + ); + expect(toolCallIndex).toBeGreaterThan(-1); + expect(toolCallIndex).toBeLessThan(5); // Called within first 5 turns + }, + }); +});