diff --git a/cli/src/claude/utils/systemPrompt.ts b/cli/src/claude/utils/systemPrompt.ts index 238a5c9a..9e90179d 100644 --- a/cli/src/claude/utils/systemPrompt.ts +++ b/cli/src/claude/utils/systemPrompt.ts @@ -5,7 +5,7 @@ import { shouldIncludeCoAuthoredBy } from "./claudeSettings"; * Base system prompt shared across all configurations */ const BASE_SYSTEM_PROMPT = (() => trimIdent(` - ALWAYS when you start a new chat - you must call a tool "mcp__hapi__change_title" to set a chat title. When you think chat title is not relevant anymore - call the tool again to change it. When chat name is too generic and you have a change to make it more specific - call the tool again to change it. This title is needed to easily find the chat in the future. Help human. + Use the title tool sparingly. For a new chat, call the tool "mcp__hapi__change_title" once after the user's initial request is clear, and set a concise task title. Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. Rename only when the user's primary objective changes substantially and the existing title would be misleading. When you create or find a local image file that the user should see, call the tool "mcp__hapi__display_image" with the image path so HAPI can show it inline. `))(); diff --git a/cli/src/codex/utils/systemPrompt.ts b/cli/src/codex/utils/systemPrompt.ts index f5a17141..a6057be0 100644 --- a/cli/src/codex/utils/systemPrompt.ts +++ b/cli/src/codex/utils/systemPrompt.ts @@ -13,10 +13,11 @@ import { trimIdent } from '@/utils/trimIdent'; * so the tool is called as `functions.hapi__change_title`. */ export const TITLE_INSTRUCTION = trimIdent(` - ALWAYS when you start a new chat, call the title tool to set a concise task title. + Use the title tool sparingly. For a new chat, call it once after the user's initial request is clear, and set a concise task title. Prefer calling functions.hapi__change_title. If that exact tool name is unavailable, call an equivalent alias such as hapi__change_title, mcp__hapi__change_title, or hapi_change_title. - If the task focus changes significantly later, call the title tool again with a better title. + Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. + Rename only when the user's primary objective changes substantially and the existing title would be misleading. When you create or find a local image file that the user should see, call functions.hapi__display_image with the image path. If that exact tool name is unavailable, use an equivalent alias such as hapi__display_image, mcp__hapi__display_image, or hapi_display_image. `); diff --git a/cli/src/opencode/utils/systemPrompt.ts b/cli/src/opencode/utils/systemPrompt.ts index 3d3b15b9..e9687596 100644 --- a/cli/src/opencode/utils/systemPrompt.ts +++ b/cli/src/opencode/utils/systemPrompt.ts @@ -11,7 +11,7 @@ import { trimIdent } from '@/utils/trimIdent'; * Title instruction for OpenCode to call the hapi MCP tool. */ export const TITLE_INSTRUCTION = trimIdent(` - ALWAYS when you start a new chat - you must call the tool "hapi_change_title" to set a chat title. When you think chat title is not relevant anymore - call the tool again to change it. When chat name is too generic and you have a chance to make it more specific - call the tool again to change it. This title is needed to easily find the chat in the future. Help human. + Use the title tool sparingly. For a new chat, call the tool "hapi_change_title" once after the user's initial request is clear, and set a concise task title. Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. Rename only when the user's primary objective changes substantially and the existing title would be misleading. When you create or find a local image file that the user should see, call the tool "hapi_display_image" with the image path so HAPI can show it inline. `);