Skip to content

thread store interface#17659

Merged
wiltzius-openai merged 1 commit into
mainfrom
wiltzius/codex/thread-store-abstraction
Apr 14, 2026
Merged

thread store interface#17659
wiltzius-openai merged 1 commit into
mainfrom
wiltzius/codex/thread-store-abstraction

Conversation

@wiltzius-openai
Copy link
Copy Markdown
Contributor

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

Introduce a ThreadStore interface for mediating access to the filesystem (rollout jsonl files + sqlite db) based thread storage.

In later PRs we'll move the existing fs code behind a "local" implementation of this ThreadStore interface.

This PR should be a no-op behaviorally, it only introduces the interface.

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-abstraction branch 4 times, most recently from 921c3a3 to 7adf7ef Compare April 13, 2026 23:17
Comment thread codex-rs/tui/src/app.rs Outdated
fn is_terminal_thread_read_error(err: &color_eyre::Report) -> bool {
err.chain()
.any(|cause| cause.to_string().contains("thread not loaded:"))
err.chain().any(|cause| {
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.

unintentional during unit test fixing, will remove

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-abstraction branch from 7adf7ef to 51a470a Compare April 14, 2026 04:03
Comment thread codex-rs/thread-store/src/types.rs Outdated
Comment on lines +54 to +56
pub originator: String,
/// CLI/app version creating the thread.
pub cli_version: String,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should originator and cli_version be on params? or should thread store already know about them?

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.

Already know about them by virtue of it knowing its own version (for cli_version) and operating context (for originator)? I think that's doable yes, assuming the originator is baked in somehow.

Comment thread codex-rs/thread-store/src/types.rs Outdated

/// Describes who owns a thread for multi-tenant storage backends.
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct ThreadOwner {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let's include only existing features for now. we can add new features in followup PRs

Comment thread codex-rs/thread-store/src/types.rs Outdated
/// Items to append in order.
pub items: Vec<RolloutItem>,
/// Optional idempotency key supplied by callers that may retry the same append.
pub idempotency_key: Option<String>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this actually used?

Comment thread codex-rs/thread-store/src/local/mod.rs Outdated
dynamic_tools,
memory_mode,
event_persistence_mode,
..
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

surprised we are discarding a bunch of these fields

Comment thread codex-rs/thread-store/src/local/mod.rs Outdated
})
}

async fn find_thread_by_name(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no callsites?

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-abstraction branch 6 times, most recently from c9acf36 to 645e9e5 Compare April 14, 2026 17:32
Comment thread codex-rs/thread-store/src/types.rs Outdated
/// Working directory captured for the thread.
pub cwd: PathBuf,
/// Version of the CLI/app that created the thread.
pub cli_version: String,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this won't change in the scope of cli build

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.

removed!

@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-abstraction branch from 645e9e5 to 4edef55 Compare April 14, 2026 20:29
@wiltzius-openai wiltzius-openai force-pushed the wiltzius/codex/thread-store-abstraction branch from 4edef55 to 0c6fd51 Compare April 14, 2026 20:32
@wiltzius-openai wiltzius-openai merged commit dae5699 into main Apr 14, 2026
24 of 25 checks passed
@wiltzius-openai wiltzius-openai deleted the wiltzius/codex/thread-store-abstraction branch April 14, 2026 20:51
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants