Skip to content

[codex] persist thread artifacts in app-server runtime#22722

Draft
nornagon-openai wants to merge 3 commits into
mainfrom
nornagon/codex/thread-artifacts-runtime
Draft

[codex] persist thread artifacts in app-server runtime#22722
nornagon-openai wants to merge 3 commits into
mainfrom
nornagon/codex/thread-artifacts-runtime

Conversation

@nornagon-openai
Copy link
Copy Markdown
Collaborator

Summary

  • add generic thread artifact storage to the runtime/app-server stack
  • persist artifact patches in rollout session metadata while caching materialized artifacts in SQLite
  • include artifacts in thread responses and emit artifact-updated notifications for clients
  • narrow the public app-server artifact surface to create-only for the current client-driven design

Why

The desktop app now needs thread-associated artifacts that can survive reloads and cross-process handoff. The runtime should own durable thread artifact persistence without knowing client-specific payload semantics.

Notes

  • artifacts remain generic { id, artifactType, payload } runtime data
  • rollout storage uses keyed add/update/remove patches; SQLite keeps the materialized latest artifact list for normal reads and list decoration
  • rollout fallback reads still hydrate artifacts from persisted rollout state when SQLite metadata is unavailable or stale

Validation

  • cargo check -p codex-thread-store -p codex-state -p codex-rollout --tests
  • cargo check -p codex-core -p codex-tui -p codex-app-server --tests
  • cargo test -p codex-thread-store thread_artifact
  • cargo test -p codex-state thread_artifacts_restore_from_session_meta_in_creation_order
  • cargo test -p codex-app-server thread_artifacts

…-artifacts-runtime

# Conflicts:
#	codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts
#	codex-rs/core/src/tools/spec_plan.rs
#	codex-rs/thread-store/src/in_memory.rs
#	codex-rs/thread-store/src/lib.rs
#	codex-rs/thread-store/src/local/update_thread_metadata.rs
#	codex-rs/thread-store/src/types.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant