Skip to content

[codex] Implement remote thread store methods#19008

Merged
wiltzius-openai merged 1 commit intomainfrom
wiltzius/codex/thread-store-remote-impls
Apr 23, 2026
Merged

[codex] Implement remote thread store methods#19008
wiltzius-openai merged 1 commit intomainfrom
wiltzius/codex/thread-store-remote-impls

Conversation

@wiltzius-openai
Copy link
Copy Markdown
Contributor

@wiltzius-openai wiltzius-openai commented Apr 22, 2026

No description provided.

@wiltzius-openai wiltzius-openai requested a review from a team as a code owner April 22, 2026 17:29
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d663af75e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/thread-store/src/remote/mod.rs Outdated
Comment on lines +149 to +152
async fn state_db(&self, _thread_id: ThreadId) -> ThreadStoreResult<Option<StateDbHandle>> {
Err(not_implemented("state_db"))
Err(ThreadStoreError::Internal {
message: "remote thread store does not expose local state databases".to_string(),
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Return Ok(None) for remote local-only thread fields

When experimental_thread_store_endpoint is set, core now uses RemoteThreadStore, but state_db/rollout_path return ThreadStoreError::Internal. Session init calls these with ? (core/src/session/session.rs lines 300 and 376), so non-ephemeral thread startup fails immediately under remote thread store configuration.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, it doesn't fully work yet with remote

Comment on lines +35 to +37
message: status.message().to_string(),
},
tonic::Code::NotFound => ThreadStoreError::InvalidRequest {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Map gRPC NotFound to ThreadNotFound

remote_status_to_error converts tonic::Code::NotFound into InvalidRequest. thread/read uses ThreadNotFound as the non-error “missing persisted thread” path before falling back to live thread state (app-server/src/codex_message_processor.rs lines 3901-3911 and 3969-3973). This mapping turns missing persisted records into hard errors.

Useful? React with 👍 / 👎.

Comment on lines 246 to +247
if let Some(endpoint) = config.experimental_thread_store_endpoint.as_deref() {
warn!(
"experimental_thread_store_endpoint `{endpoint}` is configured, but remote thread write APIs are not implemented yet; using local thread store"
);
return Arc::new(RemoteThreadStore::new(endpoint));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate remote store until resume stops requiring local rollouts

ThreadManager now always selects RemoteThreadStore when the endpoint is set, but app-server resume logic still reconstructs history from local files (resume_thread_from_rollout uses find_thread_path_by_id_str + RolloutRecorder::get_rollout_history). In remote-only deployments, unloaded thread resume-by-id returns “no rollout found” and cannot recover persisted threads.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, it doesn't fully work yet with remote

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-remote-impls branch from d663af7 to b9ee3bd Compare April 22, 2026 18:05
@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-remote-impls branch from b9ee3bd to 2067566 Compare April 23, 2026 17:23
@wiltzius-openai wiltzius-openai changed the base branch from wiltzius/codex/thread-store-remote-base-9938 to main April 23, 2026 17:23
@wiltzius-openai wiltzius-openai enabled auto-merge (squash) April 23, 2026 17:23
@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-remote-impls branch from 2067566 to 88f927a Compare April 23, 2026 17:25
@wiltzius-openai wiltzius-openai merged commit f1061d9 into main Apr 23, 2026
25 checks passed
@wiltzius-openai wiltzius-openai deleted the wiltzius/codex/thread-store-remote-impls branch April 23, 2026 17:49
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants