codex: reject in-process external auth refresh (#15106)

This commit is contained in:
Eric Traut
2026-03-21 15:14:45 -06:00
parent 9855a2269f
commit 36ba70c2bc
6 changed files with 24 additions and 249 deletions
+9 -11
View File
@@ -451,7 +451,6 @@ pub async fn run_main(cli: Cli, arg0_paths: Arg0DispatchPaths) -> anyhow::Result
experimental_api: true,
opt_out_notification_methods: Vec::new(),
channel_capacity: DEFAULT_IN_PROCESS_CHANNEL_CAPACITY,
auto_handle_chatgpt_auth_refresh: true,
};
run_exec_session(ExecRunArgs {
in_process_start_args,
@@ -1287,6 +1286,15 @@ async fn handle_server_request(
)
.await
}
ServerRequest::ChatgptAuthTokensRefresh { request_id, .. } => {
reject_server_request(
client,
request_id,
&method,
"chatgpt auth token refresh is not supported in exec mode".to_string(),
)
.await
}
ServerRequest::ApplyPatchApproval { request_id, params } => {
reject_server_request(
client,
@@ -1323,16 +1331,6 @@ async fn handle_server_request(
)
.await
}
ServerRequest::ChatgptAuthTokensRefresh { request_id, .. } => {
reject_server_request(
client,
request_id,
&method,
"chatgpt auth refresh should be handled by the in-process app-server client"
.to_string(),
)
.await
}
};
if let Err(err) = handle_result {