#16798: feat(session): add configurable greetingPrompt for /new and /reset
gateway
stale
size: XS
Cluster:
Session Management Improvements
## 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
#12615: Add configurable resetPrompt option to config, customizing prompt a...
by htahboub · 2026-02-09
82.7%
#23048: feat(session): add `announceDeliver` option to suppress auto-delive...
by nszhsl · 2026-02-21
74.7%
#8134: feat(session): add per-group session reset configuration
by tylerliu612 · 2026-02-03
74.2%
#14018: fix: auto-remind AI to check workspace context files on session reset
by WalterSumbon · 2026-02-11
73.6%
#14358: fix: preserve session overrides (verbose, model) across /new or /rese…
by WyattSanders · 2026-02-12
72.2%
#8774: Fix/frontend session key normalization
by zhaodageng · 2026-02-04
71.6%
#6653: fix: persist archived session entry on /new or /reset
by leicao-me · 2026-02-01
70.9%
#14432: System prompt: add guidance for spawning background sub-agents
by vignesh07 · 2026-02-12
70.6%
#20078: feat(session): Add channelGroups config(optional config) for shared...
by demarlik01 · 2026-02-18
70.5%
#10836: feat(session_status): include ISO-8601 and Unix timestamps for sche...
by jeanlucthumm · 2026-02-07
70.5%