mirror of
https://github.com/openai/codex.git
synced 2026-04-30 09:26:44 +00:00
Finish moving codex exec to app-server (#15424)
This PR completes the conversion of non-interactive `codex exec` to use app server rather than directly using core events and methods. ### Summary - move `codex-exec` off exec-owned `AuthManager` and `ThreadManager` state - route exec bootstrap, resume, and auth refresh through existing app-server paths - replace legacy `codex/event/*` decoding in exec with typed app-server notification handling - update human and JSONL exec output adapters to translate existing app-server notifications only - clean up "app server client" layer by eliminating support for legacy notifications; this is no longer needed - remove exposure of `authManager` and `threadManager` from "app server client" layer ### Testing - `exec` has pretty extensive unit and integration tests already, and these all pass - In addition, I asked Codex to put together a comprehensive manual set of tests to cover all of the `codex exec` functionality (including command-line options), and it successfully generated and ran these tests
This commit is contained in:
@@ -178,10 +178,11 @@ trust_level = "trusted"
|
||||
anyhow::bail!("timed out waiting for codex resume to exit");
|
||||
}
|
||||
};
|
||||
let output_text = String::from_utf8_lossy(&output);
|
||||
let interrupted_startup = exit_code == 1 && output_text.trim() == "^C";
|
||||
anyhow::ensure!(
|
||||
exit_code == 0 || exit_code == 130,
|
||||
"unexpected exit code from codex resume: {exit_code}; output: {}",
|
||||
String::from_utf8_lossy(&output)
|
||||
exit_code == 0 || exit_code == 130 || interrupted_startup,
|
||||
"unexpected exit code from codex resume: {exit_code}; output: {output_text}",
|
||||
);
|
||||
|
||||
let config_contents = std::fs::read_to_string(codex_home.path().join("config.toml"))?;
|
||||
|
||||
Reference in New Issue
Block a user