Skip to content

[feat] persist thread_dynamic_tools in db#10252

Merged
celia-oai merged 2 commits intomainfrom
dev/cc/dynamic-tools-db
Feb 3, 2026
Merged

[feat] persist thread_dynamic_tools in db#10252
celia-oai merged 2 commits intomainfrom
dev/cc/dynamic-tools-db

Conversation

@celia-oai
Copy link
Collaborator

@celia-oai celia-oai commented Jan 30, 2026

Persist thread_dynamic_tools in sqlite and read first from it. Fall back to rollout files if it's not found. Persist dynamic tools to both sqlite and rollout files.

Saw that new sessions get populated to db correctly & old sessions get backfilled correctly at startup:

celia@com-92114 codex-rs % sqlite3 ~/.codex/state.sqlite \      "select thread_id, position,name,description,input_schema from thread_dynamic_tools;"
019c0cad-ec0d-74b2-a787-e8b33a349117|0|geo_lookup|lookup a city|{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"}
....
019c10ca-aa4b-7620-ae40-c0919fbd7ea7|0|geo_lookup|lookup a city|{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"}

@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch 2 times, most recently from b89a534 to a45395a Compare January 30, 2026 21:27
@celia-oai celia-oai changed the title changes [feat] persist thread_dynamic_tools in db Jan 30, 2026
@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch 3 times, most recently from fab93bf to 4758215 Compare January 30, 2026 22:25
@celia-oai celia-oai marked this pull request as ready for review January 30, 2026 22:26
@celia-oai celia-oai requested review from jif-oai and owenlin0 January 30, 2026 22:26
@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch from 4758215 to 4176ec4 Compare January 30, 2026 22:35
Copy link
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

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

I'm not sure the replace semantic makes sense as we don't want people to replace them after thread start but good for me

@celia-oai
Copy link
Collaborator Author

I'm not sure the replace semantic makes sense as we don't want people to replace them after thread start but good for me

will change the name to persist_dynamic_tools and gate it to only write tools when there's no dynamic tools for a thread

@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch from 33dc305 to b7eea5e Compare February 2, 2026 21:36
@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch from b7eea5e to 57caba3 Compare February 2, 2026 22:08
@celia-oai celia-oai force-pushed the dev/cc/dynamic-tools-db branch from 57caba3 to 44f9569 Compare February 2, 2026 23:20
@celia-oai celia-oai enabled auto-merge (squash) February 2, 2026 23:24
@celia-oai celia-oai merged commit fb2df99 into main Feb 3, 2026
71 of 95 checks passed
@celia-oai celia-oai deleted the dev/cc/dynamic-tools-db branch February 3, 2026 00:06
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 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