Skip to content

core: capture request-stable connector runtime tools - #31476

Draft
mzeng-openai wants to merge 1 commit into
dev/mzeng/apps-runtime-state-refreshfrom
dev/mzeng/apps-runtime-state-request-stable
Draft

core: capture request-stable connector runtime tools#31476
mzeng-openai wants to merge 1 commit into
dev/mzeng/apps-runtime-state-refreshfrom
dev/mzeng/apps-runtime-state-request-stable

Conversation

@mzeng-openai

Copy link
Copy Markdown
Contributor

What

  • Add the disabled-by-default apps_runtime_state_refactor feature.
  • Capture connector runtime state once per model sampling step as one of:
    • legacy live reads when the feature is off;
    • one committed snapshot when available; or
    • an explicitly empty Apps snapshot when no state was committed.
  • Substitute captured tools only for the host-owned codex_apps client. Custom MCP clients remain live.
  • Preserve the existing read-time tool filter, plugin provenance, server metadata, file-schema shaping, and model-name normalization pipeline.
  • Use the same captured tool set for tool exposure, Apps guidance/world state, approval metadata, and app-use analytics.
  • Keep full request-stable metadata for delegated Apps approvals in an internal child-session handoff, without adding descriptions or connected-account data to public events.
  • Treat account/workspace context discard as stronger than request stability: a captured snapshot is hidden after its owning context is discarded, while same-context refreshes do not rewrite an in-flight step.

Why

This is stack PR 3 of 4, based on #31472. It makes each model request internally consistent while leaving all behavior on the legacy live path unless the feature is explicitly enabled.

Boundaries

  • No app-server API change yet.
  • No connector-directory metadata fetch during runtime reads.
  • No _meta.installedApps dependency.
  • Generic filtering, approval, elicitation, and execution stay in McpConnectionManager.
  • No separate turn-start availability telemetry is added in this slice.

Checks

  • just test -p codex-mcp (118 passed)
  • just test -p codex-core delegated_mcp_metadata_handoff_preserves_full_snapshot_metadata
  • just test -p codex-core connector_runtime_snapshot_updates_between_sampling_steps
  • just test -p codex-core apps_guidance_appears_after_background_recovery_within_a_turn
  • just fix -p codex-mcp
  • just fix -p codex-core
  • just fmt

@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-refresh branch from 85cc749 to d05c7cc Compare July 8, 2026 00:00
@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-request-stable branch from 59a9dac to 4f515b5 Compare July 8, 2026 00:00
@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-refresh branch from d05c7cc to 9713df4 Compare July 8, 2026 00:34
@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-request-stable branch from 4f515b5 to 7a93f9a Compare July 8, 2026 00:34
@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-refresh branch from 9713df4 to adefe74 Compare July 8, 2026 22:20
@mzeng-openai
mzeng-openai force-pushed the dev/mzeng/apps-runtime-state-request-stable branch from 7a93f9a to b2fb980 Compare July 8, 2026 22:20
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