Retire Friendly and Pragmatic personality selection (#44946)

## What changed

- Use literal model instruction templates and the standard fallback prompt, ignoring legacy personality variables. Retain catalog decoding compatibility and report `supports_personality` as `false` for generated model presets.
- Stop emitting `<personality_spec>` developer messages and assigning an implicit Pragmatic configuration default.
- Filter Friendly/Pragmatic overrides from TUI requests while preserving explicit `personality = "none"`. With `features.personality` enabled, this opt-out still strips the model's personality section.
- Refresh inherited model instructions for agent roles only when the personality opt-out changes, preserving custom instructions.

## Testing

Update coverage for literal legacy templates, deprecated overrides on turn start and resume, role instruction refresh, and forwarding the explicit opt-out through thread start, resume, and fork requests.

GitOrigin-RevId: 1391db4e565e010569f0885f80013d1f86b45825
This commit is contained in:
rhan-oai authored and copyberry committed 2026-09-12 00:22:04 +00:00
1 parent cebdb732ea
commit 132c739171
23 files changed
+213 -1117

No files matched your search

+4 -3
View File
@@ -8708,6 +8708,7 @@ async fn override_turn_context_sends_thread_settings_update() {
let thread_id = started.session.thread_id;
let initial_model = started.session.model.clone();
let initial_effort = started.session.reasoning_effort.clone();
let initial_personality = started.session.personality;
app.enqueue_primary_thread_session(started.session, started.turns)
.await
.expect("primary thread should be registered");
@@ -8781,8 +8782,8 @@ async fn override_turn_context_sends_thread_settings_update() {
collaboration_mode.settings.reasoning_effort
);
assert_eq!(
notification.thread_settings.personality,
Some(Personality::Pragmatic)
notification.thread_settings.personality, initial_personality,
"the Pragmatic turn override should not change personality"
);
app.handle_app_server_event(
@@ -8811,7 +8812,7 @@ async fn override_turn_context_sends_thread_settings_update() {
updated_mode.settings.reasoning_effort,
collaboration_mode.settings.reasoning_effort
);
assert_eq!(updated_session.personality, Some(Personality::Pragmatic));
assert_eq!(updated_session.personality, initial_personality);
assert_eq!(updated_session.service_tier, Some(service_tier));
assert_eq!(updated_session.approval_policy, AskForApproval::OnRequest);
assert_eq!(
+3 -1
View File
@@ -5,6 +5,7 @@ use crate::app_command::AppCommand;
use crate::app_event::AppEvent;
use crate::app_event::PermissionProfileSelection;
use crate::app_server_session::AppServerSession;
use crate::app_server_session::personality_opt_out_only;
use crate::chatwidget::cyber_model_approval_reviewer;
use crate::session_state::ThreadSessionState;
use codex_app_server_protocol::ApprovalsReviewer as AppServerApprovalsReviewer;
@@ -211,8 +212,9 @@ impl App {
pub(super) async fn send_thread_settings_update(
&mut self,
app_server: &mut AppServerSession,
params: ThreadSettingsUpdateParams,
mut params: ThreadSettingsUpdateParams,
) -> bool {
params.personality = personality_opt_out_only(params.personality);
if !thread_settings_update_has_changes(&params) {
return false;
}