Keep session defaults static during config batch writes (#34940)

## What changed

- Treat batch writes containing only `model`, `model_reasoning_effort`,
  `plan_mode_reasoning_effort`, `service_tier`, or `personality` as defaults for
  future sessions, even when `reloadUserConfig` is requested.
- Keep runtime config reloads and skill/plugin cache invalidation for other
  config changes, and document which settings remain session-static.
- Preserve cached skill listings after session-default writes until a forced
  reload, with test coverage for each supported default.

GitOrigin-RevId: 6d988014cf4758ceb9422a11f7c2bd5fc6b9f90a
This commit is contained in:
jif
2026-07-23 13:11:16 +00:00
committed by copyberry
parent 48ebbf5334
commit 808d3c2702
10 changed files with 83 additions and 18 deletions
@@ -864,7 +864,9 @@ pub struct ConfigBatchWriteParams {
pub file_path: Option<String>,
#[ts(optional = nullable)]
pub expected_version: Option<String>,
/// When true, hot-reload the updated user config into all loaded threads after writing.
/// When true, hot-reload updated runtime settings into loaded threads after writing.
/// Session-static model, reasoning-effort, Plan-mode reasoning-effort, service-tier, and
/// personality defaults are not reloaded.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub reload_user_config: bool,
}