← Back to PRs

#12615: Add configurable resetPrompt option to config, customizing prompt after /new or /reset

by htahboub open 2026-02-09 11:33 View on GitHub →
stale
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