Import external agent sessions in background (#20284)

Summary:
- Return from external agent import before session history import
finishes
- Run session import work in the background and emit the existing
completion notification when it is done
- Serialize session imports so duplicate requests do not create
duplicate imported threads

Verification:
- cargo test -p codex-app-server external_agent_config_
- cargo test -p codex-external-agent-sessions
- just fix -p codex-app-server
- just fix -p codex-external-agent-sessions
- git diff --check
This commit is contained in:
stefanstokic-oai authored and GitHub committed 2026-04-30 00:00:41 +00:00
1 parent 7bcd4626c4
commit c8abcbf925
8 files changed
+465 -57

No files matched your search

@@ -518,6 +518,7 @@ impl Drop for ActiveLogin {
}
/// Handles JSON-RPC messages for Codex threads (and legacy conversation APIs).
#[derive(Clone)]
pub(crate) struct CodexMessageProcessor {
auth_manager: Arc<AuthManager>,
thread_manager: Arc<ThreadManager>,