[codex] Remove remote thread store implementation (#21596)

Remove the remote thread-store backend and checked-in protobuf
artifacts. We've moved these into another crate that link against this
one.

Also remove the config settings for thread store backend selection,
since we'll instead pass an instantiated thread store into the core-api
crate's main entrypoint.
This commit is contained in:
Tom
2026-05-08 00:02:46 +00:00
committed by GitHub
parent a3de5bde6e
commit 79ad209ce6
22 changed files with 42 additions and 2901 deletions
+4 -2
View File
@@ -717,11 +717,13 @@ impl AgentControl {
let result = if let Ok(thread) = state.get_thread(agent_id).await {
thread.codex.session.ensure_rollout_materialized().await;
thread.codex.session.flush_rollout().await?;
if matches!(thread.agent_status().await, AgentStatus::Shutdown) {
let result = if matches!(thread.agent_status().await, AgentStatus::Shutdown) {
Ok(String::new())
} else {
state.send_op(agent_id, Op::Shutdown {}).await
}
};
thread.wait_until_terminated().await;
result
} else {
state.send_op(agent_id, Op::Shutdown {}).await
};
+21
View File
@@ -2278,6 +2278,27 @@ async fn runtime_config_resolves_terminal_resize_reflow_defaults_and_overrides()
);
}
#[tokio::test]
async fn legacy_remote_thread_store_endpoint_is_rejected() {
let cfg: ConfigToml =
toml::from_str(r#"experimental_thread_store_endpoint = "https://example.com""#)
.expect("legacy remote thread-store endpoint should still deserialize");
let err = Config::load_from_base_config_with_overrides(
cfg,
ConfigOverrides::default(),
tempdir().expect("tempdir").abs(),
)
.await
.expect_err("legacy remote thread-store endpoint should be rejected at load time");
assert!(
err.to_string()
.contains("experimental_thread_store_endpoint")
);
assert!(err.to_string().contains("no longer supported"));
}
#[test]
fn profile_tui_rejects_unsupported_settings() {
let err = toml::from_str::<ConfigToml>(
+10 -14
View File
@@ -380,8 +380,6 @@ pub enum ThreadStoreConfig {
/// Persist threads locally using rollout JSONL files and sqlite metadata.
#[default]
Local,
/// Persist threads through the remote thread-store service.
Remote { endpoint: String },
/// In-memory thread store for test and debug configurations.
InMemory { id: String },
}
@@ -1733,17 +1731,11 @@ fn resolve_tool_suggest_config_from_config(
}
}
fn thread_store_config(
thread_store: Option<ThreadStoreToml>,
legacy_remote_endpoint: Option<String>,
) -> ThreadStoreConfig {
fn thread_store_config(thread_store: Option<ThreadStoreToml>) -> ThreadStoreConfig {
match thread_store {
Some(ThreadStoreToml::Local {}) => ThreadStoreConfig::Local,
Some(ThreadStoreToml::Remote { endpoint }) => ThreadStoreConfig::Remote { endpoint },
Some(ThreadStoreToml::InMemory { id }) => ThreadStoreConfig::InMemory { id },
None => legacy_remote_endpoint.map_or(ThreadStoreConfig::Local, |endpoint| {
ThreadStoreConfig::Remote { endpoint }
}),
None => ThreadStoreConfig::Local,
}
}
@@ -2097,6 +2089,13 @@ impl Config {
) -> std::io::Result<Self> {
// Keep the large config-construction future off small test thread stacks.
Box::pin(async move {
if cfg.experimental_thread_store_endpoint.is_some() {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
"`experimental_thread_store_endpoint` is no longer supported; remove it from config.toml",
));
}
validate_model_providers(&cfg.model_providers)
.map_err(|message| std::io::Error::new(std::io::ErrorKind::InvalidInput, message))?;
// Ensure that every field of ConfigRequirements is applied to the final
@@ -3122,10 +3121,7 @@ impl Config {
experimental_realtime_ws_startup_context: cfg.experimental_realtime_ws_startup_context,
experimental_realtime_start_instructions: cfg.experimental_realtime_start_instructions,
experimental_thread_config_endpoint: cfg.experimental_thread_config_endpoint,
experimental_thread_store: thread_store_config(
cfg.experimental_thread_store,
cfg.experimental_thread_store_endpoint,
),
experimental_thread_store: thread_store_config(cfg.experimental_thread_store),
forced_chatgpt_workspace_id,
forced_login_method,
include_apply_patch_tool: include_apply_patch_tool_flag,
-2
View File
@@ -57,7 +57,6 @@ use codex_thread_store::LocalThreadStore;
use codex_thread_store::LocalThreadStoreConfig;
use codex_thread_store::ReadThreadByRolloutPathParams;
use codex_thread_store::ReadThreadParams;
use codex_thread_store::RemoteThreadStore;
use codex_thread_store::StoredThread;
use codex_thread_store::ThreadStore;
use codex_thread_store::ThreadStoreError;
@@ -277,7 +276,6 @@ pub fn thread_store_from_config(
LocalThreadStoreConfig::from_config(config),
state_db,
)),
ThreadStoreConfig::Remote { endpoint } => Arc::new(RemoteThreadStore::new(endpoint)),
ThreadStoreConfig::InMemory { id } => InMemoryThreadStore::for_id(id),
}
}