← Back to PRs

#16798: feat(session): add configurable greetingPrompt for /new and /reset

by rustyorb open 2026-02-15 04:14 View on GitHub →
gateway stale size: XS
## Summary Adds `session.greetingPrompt` config option that overrides the built-in greeting prompt injected when a bare `/new` or `/reset` starts a new session. ## Motivation The hardcoded greeting prompt tells agents to "not mention internal steps, files, tools, or reasoning" — but agents with custom bootstrap procedures (reading workspace files, loading memory, etc.) can misinterpret this as "don't *do* internal steps" rather than "don't *narrate* them." Making this configurable lets users tailor the greeting instruction to their agent's workflow without modifying source code. ## Changes - **`src/config/types.base.ts`**: Added `greetingPrompt?: string` to `SessionConfig` - **`src/config/zod-schema.session.ts`**: Added zod validation for the new field - **`src/auto-reply/reply/get-reply-run.ts`**: Reads `sessionCfg.greetingPrompt` with fallback to the existing default ## Usage ```json5 { session: { greetingPrompt: "A new session was started. Run your bootstrap silently, then greet the user in 1-3 sentences." } } ``` When not configured, behavior is identical to current — zero breaking changes. <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds `session.greetingPrompt` config option to override the built-in greeting prompt injected when `/new` or `/reset` starts a session. The implementation is clean and maintains backward compatibility by keeping the original constant as a deprecated export. The change addresses a valid use case where custom bootstrap workflows need different greeting instructions. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The implementation is straightforward, maintains full backward compatibility through a deprecated export, uses proper TypeScript typing with Zod validation, and follows the codebase patterns. The fallback to `DEFAULT_GREETING_PROMPT` ensures existing behavior is preserved when the config option is not set. The change is isolated to configuration and auto-reply logic without affecting core functionality. - No files require special attention <sub>Last reviewed commit: 2f1d043</sub> <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs