[codex] route thread reads through thread store#18009
[codex] route thread reads through thread store#18009wiltzius-openai wants to merge 1 commit intomainfrom
Conversation
efc5847 to
a32128b
Compare
a32128b to
21c0708
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21c0708f90
ℹ️ 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".
| if include_turns { | ||
| let message = if config_snapshot.ephemeral && loaded_rollout_path.is_none() { | ||
| "ephemeral threads do not support includeTurns".to_string() | ||
| } else { | ||
| format!( | ||
| "thread {thread_uuid} is not materialized yet; includeTurns is unavailable before first user message" | ||
| ) | ||
| }; | ||
| self.send_invalid_request_error(request_id, message).await; | ||
| return; |
There was a problem hiding this comment.
Preserve includeTurns for loaded threads missing from store
This fallback rejects includeTurns unconditionally whenever thread_store.read_thread misses but a live thread exists. That branch is reachable for valid loaded threads whose rollout path is outside codex_home (local store lookup is id-based under codex_home only), so materialized threads resumed by explicit path now return INVALID_REQUEST instead of turns.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| let mut thread = if let Some(summary) = db_summary { | ||
| summary_to_thread(summary, &self.config.cwd) |
There was a problem hiding this comment.
are we losing the ability to return thread summary directly from sqlite? read_thread.rs seems to use sqlite to extend but not as a fallback
Uh oh!
There was an error while loading. Please reload this page.