#12615: Add configurable resetPrompt option to config, customizing prompt after /new or /reset
stale
Cluster:
Session Management Improvements
Currently, users can't easily modify the prompt given to the agent every time a new session is started. This PR makes that possible with a new optional agents.defaults.resetPrompt setting. The default is the same old prompt from before.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new optional `agents.defaults.resetPrompt` config field to let users override the default “bare /new or /reset” prompt body, and wires it into the session-reset detection in `runPreparedReply`.
The config surface is updated in both the TypeScript `AgentDefaultsConfig` type and the Zod validation schema, and `src/auto-reply/reply/get-reply-run.ts` now uses `agentCfg?.resetPrompt ?? BARE_SESSION_RESET_PROMPT` when a new session is started with no user content (or with a bare `/new`/`/reset`).
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- Changes are small, localized, and consistent across type definitions, schema validation, and runtime usage. The new field is optional with a clear fallback to the previous constant, and the existing reset detection logic remains intact.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#16798: feat(session): add configurable greetingPrompt for /new and /reset
by rustyorb · 2026-02-15
82.7%
#9273: Add files via upload
by cyrilliu1974 · 2026-02-05
75.5%
#11872: Add Pre-Reset Hook
by scomma · 2026-02-08
75.5%
#8919: Pr/memory flush improvements
by shortbus · 2026-02-04
75.4%
#14018: fix: auto-remind AI to check workspace context files on session reset
by WalterSumbon · 2026-02-11
74.3%
#14432: System prompt: add guidance for spawning background sub-agents
by vignesh07 · 2026-02-12
73.8%
#14358: fix: preserve session overrides (verbose, model) across /new or /rese…
by WyattSanders · 2026-02-12
73.7%
#8178: feat: allow before_agent_start to override the prompt
by richardfogaca · 2026-02-03
73.7%
#11613: fix: clear stale model metadata on /new and /reset
by mcaxtr · 2026-02-08
73.6%
#17221: fix(agents): prevent agents from using exec for gateway management
by CornBrother0x · 2026-02-15
73.4%