refactor(core): remove memory tool instructions from Gemini 3 prompt (#18559)

This commit is contained in:
N. Taylor Mullen
2026-02-07 17:57:53 -08:00
committed by GitHub
parent e751e54e95
commit 9f4c8a8777
2 changed files with 1 additions and 20 deletions
+1 -13
View File
@@ -12,7 +12,6 @@ import {
EXIT_PLAN_MODE_TOOL_NAME,
GLOB_TOOL_NAME,
GREP_TOOL_NAME,
MEMORY_TOOL_NAME,
READ_FILE_TOOL_NAME,
SHELL_TOOL_NAME,
WRITE_FILE_TOOL_NAME,
@@ -248,7 +247,7 @@ ${shellEfficiencyGuidelines(options.enableShellEfficiency)}
## Tool Usage
- **Parallelism:** Execute multiple independent tool calls in parallel when feasible (i.e. searching the codebase).
- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool for running shell commands, remembering the safety rule to explain modifying commands first.${toolUsageInteractive(options.interactive)}${toolUsageRememberingFacts(options)}
- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool for running shell commands, remembering the safety rule to explain modifying commands first.${toolUsageInteractive(options.interactive)}
- **Confirmation Protocol:** If a tool call is declined or cancelled, respect the decision immediately. Do not re-attempt the action or "negotiate" for the same tool call unless the user explicitly directs you to. Offer an alternative technical path if possible.
## Interaction Details
@@ -519,17 +518,6 @@ function toolUsageInteractive(interactive: boolean): string {
- **Interactive Commands:** Always prefer non-interactive commands (e.g., using 'run once' or 'CI' flags for test runners to avoid persistent watch modes or 'git --no-pager') unless a persistent process is specifically required; however, some commands are only interactive and expect user input during their execution (e.g. ssh, vim).`;
}
function toolUsageRememberingFacts(
options: OperationalGuidelinesOptions,
): string {
const base = `
- **Memory Tool:** Use \`${MEMORY_TOOL_NAME}\` only for global user preferences, personal facts, or high-level information that applies across all sessions. Never save workspace-specific context, local file paths, or transient session state. Do not use memory to store summaries of code changes, bug fixes, or findings discovered during a task; this tool is for persistent user-related information only.`;
const suffix = options.interactive
? ' If unsure whether a fact is worth remembering globally, ask the user.'
: '';
return base + suffix;
}
function gitRepoKeepUserInformed(interactive: boolean): string {
return interactive
? `