Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2490fb2
Add stdio exec-server client transport
starr-openai May 1, 2026
8626d27
Make exec-server RPC client Send-safe
starr-openai May 1, 2026
3d75227
Remove duplicate stdio client test import
starr-openai May 1, 2026
7834efe
Clarify exec-server transport lifetime ownership
starr-openai May 4, 2026
881e7b5
Clean up stdio client process groups
starr-openai May 4, 2026
55bcc97
Simplify exec-server transport internals
starr-openai May 4, 2026
52ca8fa
Address stdio exec-server review feedback
starr-openai May 5, 2026
21faf08
Simplify stdio exec-server transport ownership
starr-openai May 5, 2026
bedee6e
Clarify exec-server transport connect naming
starr-openai May 5, 2026
0390110
Order exec-server transport teardown before RPC teardown
starr-openai May 5, 2026
1870847
Name retained exec-server connection field
starr-openai May 5, 2026
f3ba2aa
Model retained JSON-RPC transport generically
starr-openai May 5, 2026
9f771fb
Split JSON-RPC transport variants
starr-openai May 5, 2026
0190927
Rename exec-server transport input params
starr-openai May 5, 2026
fb93315
Fix exec-server transport CI failures
starr-openai May 5, 2026
bc34e37
Simplify exec-server disconnect plumbing
starr-openai May 5, 2026
39634ad
Remove server disconnect race test
starr-openai May 5, 2026
2a1200e
Simplify exec-server transport ownership
starr-openai May 5, 2026
94956cd
Restore exec-server processor ownership boundary
starr-openai May 5, 2026
579f473
Simplify exec-server connection ownership
starr-openai May 5, 2026
c0f9daf
Flatten JSON-RPC connection state
starr-openai May 5, 2026
d42a1e0
Narrow stdio client lifetime handling
starr-openai May 6, 2026
40ea3b7
Fix stdio transport clippy issues
starr-openai May 6, 2026
f5d9014
Box retained stdio transport guard
starr-openai May 6, 2026
9d93322
Apply rustfmt to stdio transport guard
starr-openai May 6, 2026
6e3d294
Fix Windows stdio test JSON quoting
starr-openai May 6, 2026
f023486
Use PowerShell for Windows stdio test helper
starr-openai May 6, 2026
9012dec
Make environment providers own default selection
starr-openai May 1, 2026
941da79
Fix environment manager clippy lints
starr-openai May 1, 2026
0422ede
Simplify provider default environment selection
starr-openai May 4, 2026
6e03a7c
Return provider environment snapshots
starr-openai May 4, 2026
4b9dadd
Split provider environments from default id
starr-openai May 4, 2026
ac065c3
Inline provider manager construction
starr-openai May 4, 2026
16ae047
Simplify environment provider defaults
starr-openai May 5, 2026
bc0677d
Represent provider defaults with snapshots
starr-openai May 6, 2026
2a5b5ab
Add CODEX_HOME environments TOML provider
starr-openai May 1, 2026
1607c0b
Fix environments TOML lint coverage
starr-openai May 5, 2026
5e019e4
Limit TOML provider test constructor to tests
starr-openai May 5, 2026
551d46a
Narrow exec server URL accessor
starr-openai May 6, 2026
9878ced
Align TOML provider with snapshot trait
starr-openai May 6, 2026
fc52ee6
Expose CODEX_HOME environment manager constructor
starr-openai May 6, 2026
8c4cb37
Load configured environments from CODEX_HOME
starr-openai May 1, 2026
807d88d
Use active environment manager for TUI connectors
starr-openai May 5, 2026
1a3ee72
Use test environment manager in chat widget helper
starr-openai May 5, 2026
3036c93
Fix prompt debug formatting
starr-openai May 6, 2026
2675f1f
Drop duplicate environment manager constructors
starr-openai May 6, 2026
dcfe0cb
Tighten exec-server review followups
starr-openai May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion codex-rs/app-server-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ use codex_config::ThreadConfigLoader;
pub use codex_core::StateDbHandle;
use codex_core::config::Config;
pub use codex_exec_server::EnvironmentManager;
pub use codex_exec_server::EnvironmentManagerArgs;
pub use codex_exec_server::ExecServerRuntimePaths;
use codex_feedback::CodexFeedback;
use codex_protocol::protocol::SessionSource;
Expand Down
21 changes: 11 additions & 10 deletions codex-rs/app-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use codex_config::NoopThreadConfigLoader;
use codex_config::RemoteThreadConfigLoader;
use codex_config::ThreadConfigLoader;
use codex_core::config::Config;
use codex_exec_server::EnvironmentManagerArgs;
use codex_features::Feature;
use codex_login::AuthManager;
use codex_utils_cli::CliConfigOverrides;
Expand Down Expand Up @@ -417,15 +416,6 @@ pub async fn run_main_with_transport_options(
auth: AppServerWebsocketAuthSettings,
runtime_options: AppServerRuntimeOptions,
) -> IoResult<()> {
let environment_manager = Arc::new(
EnvironmentManager::new(EnvironmentManagerArgs::new(
ExecServerRuntimePaths::from_optional_paths(
arg0_paths.codex_self_exe.clone(),
arg0_paths.codex_linux_sandbox_exe.clone(),
)?,
))
.await,
);
let (transport_event_tx, mut transport_event_rx) =
mpsc::channel::<TransportEvent>(CHANNEL_CAPACITY);
let (outgoing_tx, mut outgoing_rx) = mpsc::channel::<OutgoingEnvelope>(CHANNEL_CAPACITY);
Expand All @@ -441,6 +431,17 @@ pub async fn run_main_with_transport_options(
)
})?;
let codex_home = find_codex_home()?;
let local_runtime_paths = ExecServerRuntimePaths::from_optional_paths(
arg0_paths.codex_self_exe.clone(),
arg0_paths.codex_linux_sandbox_exe.clone(),
)?;
let environment_manager = if loader_overrides.ignore_user_config {
EnvironmentManager::from_env(local_runtime_paths).await
} else {
EnvironmentManager::from_codex_home(codex_home.clone(), local_runtime_paths).await
}
.map(Arc::new)
.map_err(std::io::Error::other)?;
let config_manager = ConfigManager::new(
codex_home.to_path_buf(),
cli_kv_overrides.clone(),
Expand Down
1 change: 0 additions & 1 deletion codex-rs/core-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub use codex_core::init_state_db_from_config;
pub use codex_core::skills::SkillsManager;
pub use codex_core::thread_store_from_config;
pub use codex_exec_server::EnvironmentManager;
pub use codex_exec_server::EnvironmentManagerArgs;
pub use codex_exec_server::ExecServerRuntimePaths;
pub use codex_features::Feature;
pub use codex_features::Features;
Expand Down
3 changes: 1 addition & 2 deletions codex-rs/core/src/connectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub use codex_app_server_protocol::AppMetadata;
use codex_connectors::AllConnectorsCacheKey;
use codex_connectors::DirectoryListResponse;
use codex_exec_server::EnvironmentManager;
use codex_exec_server::EnvironmentManagerArgs;
use codex_exec_server::ExecServerRuntimePaths;
use codex_protocol::models::PermissionProfile;
use codex_tools::DiscoverableTool;
Expand Down Expand Up @@ -201,7 +200,7 @@ pub async fn list_accessible_connectors_from_mcp_tools_with_options_and_status(
config.codex_linux_sandbox_exe.clone(),
)?;
let environment_manager =
EnvironmentManager::new(EnvironmentManagerArgs::new(local_runtime_paths)).await;
EnvironmentManager::from_codex_home(config.codex_home.clone(), local_runtime_paths).await?;
list_accessible_connectors_from_mcp_tools_with_environment_manager(
config,
force_refetch,
Expand Down
8 changes: 6 additions & 2 deletions codex-rs/core/src/prompt_debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::collections::HashSet;
use std::sync::Arc;

use codex_exec_server::EnvironmentManager;
use codex_exec_server::EnvironmentManagerArgs;
use codex_exec_server::ExecServerRuntimePaths;
use codex_login::AuthManager;
use codex_protocol::error::CodexErr;
use codex_protocol::error::Result as CodexResult;
use codex_protocol::models::ResponseInputItem;
use codex_protocol::models::ResponseItem;
Expand Down Expand Up @@ -46,7 +46,11 @@ pub async fn build_prompt_input(
&config,
Arc::clone(&auth_manager),
SessionSource::Exec,
Arc::new(EnvironmentManager::new(EnvironmentManagerArgs::new(local_runtime_paths)).await),
Arc::new(
EnvironmentManager::from_codex_home(config.codex_home.clone(), local_runtime_paths)
.await
.map_err(|err| CodexErr::Fatal(err.to_string()))?,
),
/*analytics_events_client*/ None,
state_db,
thread_store,
Expand Down
11 changes: 5 additions & 6 deletions codex-rs/core/tests/common/test_codex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const SUBMIT_TURN_COMPLETE_TIMEOUT: Duration = Duration::from_secs(30);
#[derive(Debug)]
pub struct TestEnv {
environment: codex_exec_server::Environment,
exec_server_url: Option<String>,
cwd: AbsolutePathBuf,
local_cwd_temp_dir: Option<Arc<TempDir>>,
remote_container_name: Option<String>,
Expand All @@ -86,6 +87,7 @@ impl TestEnv {
codex_exec_server::Environment::create_for_tests(/*exec_server_url*/ None)?;
Ok(Self {
environment,
exec_server_url: None,
cwd,
local_cwd_temp_dir: Some(local_cwd_temp_dir),
remote_container_name: None,
Expand All @@ -100,10 +102,6 @@ impl TestEnv {
&self.environment
}

pub fn exec_server_url(&self) -> Option<&str> {
self.environment.exec_server_url()
}

fn local_cwd_temp_dir(&self) -> Option<Arc<TempDir>> {
self.local_cwd_temp_dir.clone()
}
Expand All @@ -123,7 +121,7 @@ pub async fn test_env() -> Result<TestEnv> {
Some(remote_env) => {
let websocket_url = remote_exec_server_url()?;
let environment =
codex_exec_server::Environment::create_for_tests(Some(websocket_url))?;
codex_exec_server::Environment::create_for_tests(Some(websocket_url.clone()))?;
let cwd = remote_aware_cwd_path();
environment
.get_filesystem()
Expand All @@ -135,6 +133,7 @@ pub async fn test_env() -> Result<TestEnv> {
.await?;
Ok(TestEnv {
environment,
exec_server_url: Some(websocket_url),
cwd,
local_cwd_temp_dir: None,
remote_container_name: Some(remote_env.container_name),
Expand Down Expand Up @@ -385,7 +384,7 @@ impl TestCodexBuilder {
let exec_server_url = self
.exec_server_url
.clone()
.or_else(|| test_env.exec_server_url().map(str::to_owned));
.or_else(|| test_env.exec_server_url.clone());
let local_runtime_paths = codex_exec_server::ExecServerRuntimePaths::new(
std::env::current_exe()?,
/*codex_linux_sandbox_exe*/ None,
Expand Down
3 changes: 3 additions & 0 deletions codex-rs/exec-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ load("//:defs.bzl", "codex_rust_crate")
codex_rust_crate(
name = "exec-server",
crate_name = "codex_exec_server",
deps_extra = [
"@crates//:toml",
],
# Keep the crate's integration tests single-threaded under Bazel because
# they install process-global test-binary dispatch state, and the remote
# exec-server cases already rely on serialization around the full CLI path.
Expand Down
1 change: 1 addition & 0 deletions codex-rs/exec-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
thiserror = { workspace = true }
toml = { workspace = true }
tokio = { workspace = true, features = [
"fs",
"io-std",
Expand Down
Loading
Loading