Skip to content

[codex] Inject agent graph store into ThreadManager - #29736

Merged
wiltzius-openai merged 7 commits into
mainfrom
wiltzius/codex/agent-graph-store-injection
Jun 24, 2026
Merged

[codex] Inject agent graph store into ThreadManager#29736
wiltzius-openai merged 7 commits into
mainfrom
wiltzius/codex/agent-graph-store-injection

Conversation

@wiltzius-openai

@wiltzius-openai wiltzius-openai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Pick up the AgentGraphStore migration.

  • Inject an explicit optional agent graph store into ThreadManager
  • Move all calls to spawn, close, recursive resume, and subtree/archive/delete/feedback traversal through it
  • Keep using LocalAgentGraphStore when SQLite is available

This required some changes to the interface to deal with futures:

  • The interface now matches ThreadStore's object-safe pattern by returning a boxed AgentGraphStoreFuture directly, allowing ThreadManager to hold Arc<dyn AgentGraphStore>

Slight behavior change! Unfiltered subtree enumeration now performs a single all-status breadth-first traversal, so a closed grandchild beneath an open edge is included; the previous Open-then-Closed traversals could not cross mixed-status paths and silently omitted it.

@wiltzius-openai
wiltzius-openai force-pushed the wiltzius/codex/agent-graph-store-injection branch from bdd89e8 to cd3e0fc Compare June 23, 2026 22:54
@wiltzius-openai
wiltzius-openai marked this pull request as ready for review June 23, 2026 23:27
@wiltzius-openai
wiltzius-openai requested a review from a team as a code owner June 23, 2026 23:27

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

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16a3d504ab

ℹ️ 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/core/Cargo.toml
Comment thread codex-rs/app-server/src/message_processor.rs Outdated
Comment thread codex-rs/core/src/agent/control.rs

@rasmusrygaard rasmusrygaard left a comment

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.

Comments about interop with in memory and ephemeral threads seem plausible to me but the rest looks good

Copy link
Copy Markdown
Contributor Author

@codex review

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

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a73b2493e9

ℹ️ 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/core/Cargo.toml
Comment thread codex-rs/core/src/agent/control/legacy.rs Outdated
Comment thread codex-rs/agent-graph-store/src/in_memory.rs Outdated
Comment thread codex-rs/app-server/src/request_processors/thread_processor.rs
return Ok(resumed_thread_id);
};
let Some(state_db_ctx) = resumed_thread.state_db() else {
let Some(agent_graph_store) = state.agent_graph_store() else {

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.

We don't store nicknames role etc. Find by me but this means this is only MAv2

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.

Discussed live but: the nicknames / role / etc are stored in thread metadata rather than in the agent graph store. This PR doesn't change that. I did add a change to load those values through ThreadStore interface rather than directly from Sqlite, however.

@wiltzius-openai
wiltzius-openai force-pushed the wiltzius/codex/agent-graph-store-injection branch from 56a537b to e38f36b Compare June 24, 2026 20:03
@wiltzius-openai
wiltzius-openai merged commit ece1dfe into main Jun 24, 2026
60 of 61 checks passed
@wiltzius-openai
wiltzius-openai deleted the wiltzius/codex/agent-graph-store-injection branch June 24, 2026 20:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 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.

3 participants