Skip to content

[codex] Use background agent task auth for backend calls#18094

Open
adrian-openai wants to merge 6 commits intodev/adrian/codex/agent-identity-use-assertion-splitfrom
dev/adrian/codex/agent-identity-background-task
Open

[codex] Use background agent task auth for backend calls#18094
adrian-openai wants to merge 6 commits intodev/adrian/codex/agent-identity-use-assertion-splitfrom
dev/adrian/codex/agent-identity-background-task

Conversation

@adrian-openai
Copy link
Copy Markdown
Contributor

@adrian-openai adrian-openai commented Apr 16, 2026

Summary

Introduces a single user-level/background agent task for backend and control-plane requests that do not have a thread-scoped task. The background task id is stored separately from per-session task state in auth storage and reused for these calls.

This PR is stacked on PR4 and now focuses on the shared background task auth plumbing plus the first tranche of backend/control-plane consumers. The remaining callsite wiring is split into PR4.2 to keep review size down.

Stack

What Changed

  • add background task registration and assertion minting in codex-login
  • persist agent_identity.background_task_id separately from session task state
  • expose explicit background task auth mode so config-aware callers respect features.use_agent_identity
  • wire background agent assertions through app listing, connector directory listing, remote plugins, MCP status/listing, analytics, and core-skills remote calls
  • preserve bearer fallback when the feature is disabled or background task registration is not available

Validation

  • just fmt
  • cargo check -p codex-login -p codex-analytics -p codex-mcp -p codex-core -p codex-app-server -p codex-chatgpt -p codex-cloud-tasks -p codex-cloud-requirements -p codex-models-manager
  • git diff --check

@adrian-openai adrian-openai marked this pull request as ready for review April 16, 2026 17:36
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