Commit Graph

487 Commits

Author SHA1 Message Date
jif
130c7c93a9 Resolve skill package aliases in skills.read (#38261)
## Why

Skill catalogs can present shortened package locators, but callers previously had
to expand those aliases before reading a skill.

## What changed

- Resolve catalog aliases automatically when `skills.read` looks up a
  model-visible executor or orchestrator skill package.
- Update skill prompts and tool documentation to tell models to pass the listed
  package locator directly.

## Testing

- Exercise reading an executor skill through its shortened package locator when
  the skills catalog exceeds its context budget.

GitOrigin-RevId: d1cdfd64002510b616146929deb5b7077850b951
2026-08-12 22:10:55 +00:00
xl-openai
379cb68444 Add dynamic HTTP header helpers for MCP servers (#38245)
## What changed

- Add `http_headers_helper` configuration for local streamable HTTP MCP servers. The configured shell command runs once per connection and returns a JSON object of headers that is cached across requests.
- Apply helper headers to MCP startup and OAuth flows while restricting them to the server origin, stopping redirects, rejecting reserved or duplicate headers, and enforcing output and execution limits.
- Reject helpers for remote or managed-disabled servers, use the local environment working directory, and redact helper commands from `codex mcp list` and `codex mcp get` output.

## Testing

- Cover configuration validation, helper lifecycle and output parsing, origin isolation, OAuth discovery and token refresh, managed requirements, environment selection, and CLI redaction.

GitOrigin-RevId: 84e0e26ce75520b0869d37c72b1678e033bd6818
2026-08-12 20:36:32 +00:00
rka-oai
0e0ef5d818 Track client-authored developer messages in rollout history (#38243)
## What changed

- Mark developer messages received from clients with `client_authored` harness
  metadata when `retain_client_developer_messages` is enabled.
- Carry that provenance through pending input and persist it alongside rollout
  response items without adding it to provider requests or the serialized
  `TurnInput` payload.
- Preserve existing behavior for unannotated response items and when the
  feature is disabled.

## Testing

- Cover client item injection before and during turns, additional application
  context, rollout replay, image resize notices, and serialization boundaries.

GitOrigin-RevId: f385c177732becde732272e4b8440eb91f5c1039
2026-08-12 20:05:49 +00:00
jif
3d7f9b4637 Fuse recent and lexical skills in shadow selection (#38204)
## What changed

- Add the `lru_plus_lexical_v1` selector, combining the 50 most recent skills
  with weighted lexical matches through reciprocal rank fusion.
- Include the combined selector in the shadow-selection experiment and propagate
  query and candidate truncation metadata from both inputs.
- Generalize the existing reciprocal-rank fusion helper to accept a rank
  constant while preserving the existing lexical/character selector behavior.

## Testing

- Cover lexical-only selection, merging recent and matching skills, promotion
  from agreement between both rankings, and weak overlaps.
- Extend the skills extension test to verify invocation metrics for the new
  selector alongside `lru_v1`.

GitOrigin-RevId: 1b7b82bc97ea919c719cd05a009351b701019306
2026-08-12 15:17:54 +00:00
jif
9dd22890f5 Add an LRU baseline to skill shadow selection (#38197)
## What changed

- Track the 50 most recently invoked skills for each thread and evaluate them
  as the `lru_v1` shadow-selection method.
- Filter stale and duplicate entries while preserving recency order.
- Increase the shadow result limit to 50 and add a `21_50` rank bucket.

## Testing

- Add unit coverage for recency refresh, eviction, filtering, limits, and rank
  buckets.
- Add an extension test showing that `lru_v1` recovers a skill invoked on an
  earlier turn.

GitOrigin-RevId: 7aa56514db57cf180cc3f57b4d493dee3304e766
2026-08-12 14:09:44 +00:00
rphilizaire-openai
69ae78291d Read executor skill packages directly (#38167)
## Why

Executor skills required a `skills.list` lookup before their contents could be
read, even when the catalog already identified the skill.

## What changed

- Render executor skill catalog entries as package locators, including shortened
  locators when skill roots are aliased.
- Tell the model to pass those packages directly to `skills.read`, while keeping
  `skills.list` as the fallback when no package is available.
- Use the shorter package locators when applying the skills context budget.

## Testing

Update catalog, aliasing, budget-pressure, and selected-skill coverage, including
an executor package ID containing a literal backslash.

GitOrigin-RevId: 2ace5e527dc4f29651a8f3214475ccc90d52c73f
2026-08-12 10:34:25 +00:00
Owen Lin
da2803c73c Simplify queued user message admission (#38092)
## What changed

- Resolve user message admission when Core accepts the input as a new turn or a steer, without waiting for rollout persistence.
- Remove persistence- and hook-specific admission errors and task bookkeeping.
- Delete queued messages after Core accepts them for turn processing, including messages subsequently stopped by a prompt hook.

## Testing

- Update concurrent admission and queue service tests for acceptance-based admission.

GitOrigin-RevId: 7dcc311cfecd3d710733b420f2add546edb86153
2026-08-12 00:41:53 +00:00
rphilizaire-openai
a817d9424d Track implicit executor skill invocations (#38074)
## What changed

- Detect executor-owned skill document reads and script executions across native and URI-based working directories.
- Match skills only within the active execution environment while preserving host skill detection for local commands.
- Emit resource-backed implicit invocation events and deduplicate repeated accesses within a turn.

## Testing

- Add unit coverage for document reads, script executions, and environment-scoped matching.
- Add an integration test for environment selection, resource-backed analytics, and repeated-access deduplication.

GitOrigin-RevId: f78a48c3a4766fe8775bd88926b45a76761f6af8
2026-08-11 21:09:29 +00:00
rphilizaire-openai
c8f673fddc Track resource-backed skill invocations (#38066)
## What changed

- Emit skill invocation analytics when a resource-backed skill is explicitly selected or its main resource is successfully read from the first page.
- Preserve provider-supplied skill IDs and user scope when available, and derive a stable ID from the main resource otherwise.
- Deduplicate repeated implicit reads of the same main resource within a turn.

## Testing

- Extend the orchestrator skill integration test to cover explicit and implicit invocation events, stable fallback IDs, failed reads, and repeated-read deduplication.

GitOrigin-RevId: 7d8453b31b5a2205847e65cda2c46183d6c97b45
2026-08-11 19:52:54 +00:00
arun eswara
edcec13372 Expose image generation usage-limit failures (#38024)
## What changed

- Add structured `usageLimitExceeded` metadata to failed image-generation
  items, including the image limit ID and optional reset timestamp.
- Preserve the failure metadata in completion events, app-server thread
  history, thread reads and resumes, and migrated legacy rollouts.
- Export the new failure type in the generated JSON and TypeScript schemas.

## Testing

- Cover usage-limit responses through item completion, persistence, and thread
  resume.
- Verify legacy rollout migration retains image-generation failure metadata.

GitOrigin-RevId: 91c31a2a47456b6b916ee03002ff314b05946dd4
2026-08-11 15:40:52 +00:00
felixxia-oai
7d486ffa94 Honor per-directory bundled skill settings in skills/list (#37979)
## Why

`skills/list` can load multiple working directories in one request, but bundled
skill discovery did not account for different effective configurations across
those directories.

## What changed

- Resolve `skills.bundled.enabled` from each load input's effective config layer
  stack inside the host skills service.
- Include or exclude system-scoped skills for each working directory based on
  that resolved setting.
- Keep bundled skills enabled by default when the setting is absent or invalid.

## Testing

- Add a multi-directory `skills/list` test with bundled skills disabled in one
  project and enabled in another.
- Add config-layer tests for defaults, overrides, and malformed bundled-skill
  configuration.

GitOrigin-RevId: e4e97dc7d0a374ac71d0aa11e55a9e337f661717
2026-08-11 10:20:54 +00:00
Eric Traut
a9dee37f9c Add configurable goal token budget limits (#37878)
## What changed

- Add `goals.max_goal_token_budget` as a positive-integer configuration setting.
- Use the configured maximum as the default budget for new goals and when `tokenBudget` is reset to `null`.
- Reject goal creation and updates whose token budget exceeds the configured maximum, including requests through goal tools and `thread/goal/set`.
- Respect managed configuration precedence and per-thread configuration overrides.

## Testing

- Cover configuration parsing and managed overrides.
- Cover defaulting, resetting, and rejecting oversized budgets through the goal service, goal tools, and app-server API.

GitOrigin-RevId: f8d7e6418cdc237d454c8cf47bb32ba0d44a60cf
2026-08-10 21:00:00 +00:00
Adam Perry @ OpenAI
63002bdb26 Extract persisted history types into a dedicated crate (#37871)
## What changed

- Add `codex-history` for model-history and persisted-rollout domain types, including `RolloutItem`, `RolloutLine`, `CompactedItem`, and initial/resumed history state.
- Re-export the persisted types from `codex-rollout` and update consumers to use the new crate boundary instead of `codex-protocol`.
- Preserve existing rollout serialization, including legacy numeric compacted-window IDs.

## Testing

- Add `codex-history` tests for rollout JSON round trips, compacted-history compatibility, persisted history modes, and multi-agent version selection.

GitOrigin-RevId: 944daa9297ddd231d3aebbdcb05fff4adf8b4e1b
2026-08-10 19:26:52 +00:00
felixxia-oai
3c60d4da64 Tighten the skills extension API surface (#37838)
## What changed

- Restrict host loading, snapshot, and outcome implementation details to the
  skills extension crate.
- Require `HostSkillsLoadInput` construction through its public constructor
  instead of exposing its fields.
- Remove redundant implicit-invocation helpers from `SkillLoadOutcome`; use the
  `ImplicitSkillLookup` interface for enabled-skill lookup instead.

GitOrigin-RevId: e79c77fc3e69ecc0231b0c87e5f9f24a5487f9e4
2026-08-10 15:03:03 +00:00
felixxia-oai
3b67b03a3f Run plugin and skill tests on Windows (#37836)
## Why

The plugin and skill test suites were excluded wholesale on Windows, even though
most cases do not depend on POSIX behavior.

## What changed

- Make generated TOML and JSON fixtures escape Windows paths correctly.
- Use Windows-safe path canonicalization and normalize advertised skill paths.
- Select test environments through the environment-aware builders.
- Run the suites on Windows while narrowly skipping cases that execute POSIX
  commands or require matching host and executor path conventions.

GitOrigin-RevId: aadf31013c2bf9bac728adc4dd96f572d4a3bf3f
2026-08-10 14:45:55 +00:00
felixxia-oai
680934adc4 Encapsulate watchable skill root selection (#37833)
## Why

The app server should not need access to host skill root internals to decide
which paths require filesystem watching.

## What changed

- Add `HostSkillsService::watchable_skill_root_paths` to return non-plugin,
  non-system skill roots for the watcher.
- Make `HostSkillRoot` and root resolution private to the skills extension.
- Update the app-server watcher to consume the filtered paths directly.

## Testing

Add a host service test confirming that user skill roots remain watchable while
plugin and generated system roots are excluded.

GitOrigin-RevId: b3e3b576e4ffe96230af71d9bf7c6c315b1705d3
2026-08-10 14:30:30 +00:00
Charlie Marsh
1c042dd4d8 Keep multi-workspace skill listings consistent (#37812)
## Why

A single `skills/list` request should use one view of shared skill roots across
all requested workspaces while still applying each workspace's skill rules.

## What changed

- Add a request-scoped host skills view that reuses non-plugin root snapshots
  across `cwd` entries without persisting them across requests.
- Resolve user-scoped plugin skill roots once per request, then apply workspace
  skill configuration separately for each `cwd`.
- Make `forceReload` refresh plugin roots before building the request-scoped
  view so subsequent entries see the refreshed skills.

## Testing

Expanded `skills/list` and host skills service tests to cover multiple ordered
workspaces, per-workspace skill rules, request-local snapshots, cached results,
and forced plugin-root refreshes.

GitOrigin-RevId: eedd3a4c3e213b7f30df6cacd3adf23ba2967437
2026-08-10 11:27:22 +00:00
jif
34ecac1f2b Support packaged defaults in config layering (#37810)
## What changed

- Load an optional package-supplied config file as the lowest-precedence
  configuration layer, so every existing layer can override its values.
- Report the layer as `packagedDefaults`, including its source path, through
  config diagnostics and the app-server protocol.
- Return an error when a configured packaged defaults file is missing.

## Testing

- Cover precedence across packaged, system, user, and session layers.
- Cover the missing-file error path.

GitOrigin-RevId: 52406890f4d580eedabc90bf2a9ee3affa36fee1
2026-08-10 11:22:55 +00:00
jif
09f47c8785 Simplify package-based skill reads (#37808)
## What changed

- Make `package` the only required argument to `skills.read`, resolving the
  owning orchestrator or executor catalog automatically.
- Default omitted `resource` values to the package's main `SKILL.md`.
- Render orchestrator skills as package locators and instruct the model to read
  them directly without first calling `skills.list`.
- Update skill extension and app-server coverage for direct main-resource
  reads, referenced resources, aliases, and the revised tool schema.

GitOrigin-RevId: 9faf57a8d0935566a15094931eaabaa8f0613e9e
2026-08-10 11:10:01 +00:00
felixxia-oai
45f8cafa4e Remove the codex-core-skills crate (#37505)
## What changed

- Move `SkillLoadOutcome` and its implicit-path indexing into
  `codex-skills-extension`.
- Import shared skill types directly from `codex-skills` and keep the skill
  prompt size limit with the extension renderer that uses it.
- Remove `codex-core-skills` from the Cargo workspace and dependent crates.

GitOrigin-RevId: 4e9e84909fa2f692bcc94af990bb4671affd776f
2026-08-07 21:36:33 +00:00
felixxia-oai
beac16cccd Move host skill prompt injection into the skills extension (#37503)
## What changed

- Add `HostSkillsSnapshot::load_skill_prompts` so the skills extension owns reading and rendering selected host skills.
- Keep explicit invocation telemetry, unreadable-skill warnings, plugin prompt ordering, and suppression of host prompts superseded by provider prompts.
- Remove the legacy prompt injection and fragment implementation from `codex-core-skills`.

## Testing

- Cover prompt truncation without an installed skills extension, skill/plugin ordering, selective provider supersession, unreadable skills, and contextual fragment detection.

GitOrigin-RevId: 9c8b84ad54b90d174abc287ab49cc5a231e9e1aa
2026-08-07 21:04:16 +00:00
rphilizaire-openai
ba94150c2a Alias resource-backed skill locators under context pressure (#37489)
## Why

Long executor and orchestrator resource identifiers can consume enough of the
skills context budget to omit otherwise available skills.

## What changed

- Add source-aware root aliases for executor, orchestrator, and host skill
  catalogs, including catalogs with a single shared root.
- Select the best combination of aliased catalogs under the shared metadata
  budget while accounting for root tables and alias usage instructions.
- Explain how to expand shortened `skill://` locators and accept the resulting
  description-shortening warning in app-server coverage.

## Testing

- Add rendering and production-turn coverage for singleton, executor,
  orchestrator, host, and combined catalog aliases.

GitOrigin-RevId: c1bc1f3d371eae9526232674060235272cc28f16
2026-08-07 19:09:46 +00:00
rphilizaire-openai
ce22ea9712 Generalize skill locator aliases across providers (#37488)
## What changed

- Compact executor and orchestrator skill locators under metadata pressure, using provider-specific `e` and `o` aliases alongside host `r` aliases.
- Derive alias roots from executor discovery paths and orchestrator namespaces while preserving host plugin root handling.
- Centralize alias ordering, deduplication, and longest-prefix matching across skill providers.

## Testing

- Cover alias planning, cross-platform executor roots, and host plugin discovery.

GitOrigin-RevId: e7d15bd3891c08ae20170e96c4ad45c76d353707
2026-08-07 19:04:39 +00:00
felixxia-oai
b3278e96cb Move skill config rule resolution into codex-config (#37466)
## What changed

- Define skill config selectors, ordered rules, and layer-stack parsing in `codex-config`.
- Resolve disabled skill paths from generic skill name/path pairs, so configuration logic no longer depends on `SkillMetadata`.
- Update plugin and host skill consumers to use the `codex-config` API and consolidate the rule tests with the skill config tests.

GitOrigin-RevId: 3fe67869708df2652befe28d58cdeba933256f84
2026-08-07 16:20:38 +00:00
felixxia-oai
33e365b19e Remove the legacy core skill loader (#37457)
## What changed

- Use `HostSkillRoot` throughout host root resolution and loading, including plugin roots.
- Remove the duplicate loader, root snapshot, and product-filtering implementation from `core-skills` now that loading is owned by the skills extension.
- Move and expand loader coverage for discovery, namespaces, filesystem routing, root merging, symlinks, and frontmatter parsing.

## Testing

- Added focused unit and integration tests under `ext/skills` and `skills` for the consolidated loader behavior.

GitOrigin-RevId: 214d06d59bf3033ee0f220ea5959ee4feff66782
2026-08-07 15:16:06 +00:00
felixxia-oai
e58d9ef447 Unify plugin skill loading with the host skill service (#37444)
## What changed

- Inject the host skill loader into `PluginsManager` so plugin discovery and agent turns use the same loading and product-policy behavior.
- Share plugin skill snapshots across those paths, preserving a consistent view of skills across workspaces.
- Apply migrated-command precedence after product filtering, allowing an eligible migrated command to replace a filtered native skill with the same name.

## Testing

- Add coverage for product-restricted plugin skills, native-versus-migrated command precedence, and the skills exposed to agent turns.

GitOrigin-RevId: f5ef0d0766ebeeb30d73ffaf044d003c2906ea4d
2026-08-07 13:54:24 +00:00
felixxia-oai
e75a1888d7 Load plugin skill roots through the host skills service (#37440)
## What changed

- Implement `SkillRootLoader<PluginSkillRoot>` for `HostSkillsService`.
- Load roots concurrently while preserving request order, product restrictions, cached snapshots, skill errors, and per-skill filesystem metadata.
- Deduplicate overlapping roots and prefer native plugin skills over migrated commands with the same plugin ID and skill name.

## Testing

- Cover native and migrated skill precedence, nested and overlapping roots, product filtering, snapshot reuse, error propagation, and symlinked migration roots.

GitOrigin-RevId: 2270d10616b3a0463852c563ee071c524cd11e6b
2026-08-07 13:23:23 +00:00
jif
bcea6447ee Preserve foreign cwd URIs for turn-input contributors (#37342)
## Why

Converting each environment's working directory to a host-native path caused
turn-input contributors to omit environments with foreign path formats.

## What changed

- Expose `TurnInputEnvironment.cwd` as a `PathUri`.
- Pass every turn environment to contributors without host-path conversion.

## Testing

Added an integration test that submits a foreign working-directory URI and
verifies the contributor receives the environment unchanged.

GitOrigin-RevId: a122526be47f5331614381e9c6e4b85087a96bed
2026-08-07 00:42:06 +00:00
felixxia-oai
bfb6a6ea22 Support plugin roots in the host skill loader (#37267)
## What changed

- Carry plugin identity, namespace, root, and discovery mode through host skill loading.
- Apply the owning plugin namespace and IDs to loaded skill metadata.
- Respect direct-child discovery for Agent Plugins and reject skills that resolve outside the plugin root or are not regular files.
- Preserve recursive discovery and symlink behavior for legacy plugin roots, and allow the full 64-character namespace plus 64-character skill name.

## Testing

Add host-loader coverage for plugin metadata, namespace ownership, direct-child filtering, path containment, recursive symlinks, shared assets, and maximum-length qualified names.

GitOrigin-RevId: cdde821643ce39bd030d0c3753b3304b75161690
2026-08-06 12:44:36 +00:00
efrazer-oai
bc8b25ea02 Add durable user-message queue dispatch (#37204)
## What changed

- Add a storage-neutral queue extension for listing, adding, editing, reordering, deleting, and explicitly starting queued user messages.
- Dispatch queued messages in FIFO order when a thread becomes idle after a completed turn, while leaving them queued after interruptions or failures.
- Wait for user input to be persisted before removing its queue item, and report hook rejection, task termination, and persistence failures distinctly.
- Snapshot local image and audio attachments into validated data URLs before storing them, enforce input limits, and emit `ThreadQueueChanged` events after mutations.

## Testing

- Cover queue mutations, automatic and explicit dispatch, interruption and failure behavior, hook rejection, invalid records, input limits, and local attachment snapshotting.

GitOrigin-RevId: 14f39d7c8cbaccb767a6da84b82cced0edfcb4b9
2026-08-06 03:11:42 +00:00
jimxie-oai
928bda82cf Preserve image transparency metadata in app-server items (#37178)
## What changed

- Add `transparentBackground` to image-generation items and legacy completion events.
- Map Images API backgrounds to `true` for transparent, `false` for opaque, and `null` for automatic or unavailable values.
- Preserve the metadata in live notifications and persisted or resumed thread history while continuing to deserialize older items that omit it.

## Testing

- Cover transparent, opaque, and automatic backgrounds, including image edits and thread read/resume flows.
- Verify the stable JSON shape and optional TypeScript field.

GitOrigin-RevId: 08527f37f23431df45fab1ed34eb82b2139b49d7
2026-08-05 23:42:29 +00:00
felixxia-oai
f380b48733 Move plugin skill snapshot integration tests into core (#37169)
## What changed

- Move the integration test for reusing plugin-manager skill snapshots into
  `codex-core`, which owns both the plugin manager and host skills service
  integration.
- Keep the `codex-core-plugins` test focused on resolving local and remote
  plugin identities on effective skill roots, and remove its skills-extension
  dev dependency.
- Use the skills extension's `HostSkillsSnapshot` type in its world-state
  catalog implementation.

## Testing

- Verify the host skills service reuses the plugin manager's parsed snapshot
  after the underlying skill file changes, while preserving plugin identity
  metadata.

GitOrigin-RevId: afc8a0ebccb629360c59a4546bdb9a134c74da4f
2026-08-05 21:56:25 +00:00
Rasmus Rygaard
15ea598c6e Expose session sources to MCP contributors (#37167)
## What changed

- Add `session_source()` to `McpServerContributionContext` for thread-scoped MCP resolution.
- Propagate each thread's `SessionSource` through initial setup, per-step resolution, and runtime refreshes.

## Testing

- Verify global contexts omit the source while thread-scoped contexts retain it.
- Verify MCP contributors observe distinct sources for a root thread and its spawned subagent.

GitOrigin-RevId: 23da1509858e023fbd9e2d179034ddc83553f17b
2026-08-05 21:45:33 +00:00
felixxia-oai
bd36d69aae Load host skill roots through the skills extension (#37162)
## What changed

- Load ordinary recursive host skill roots with the skills extension's host loader.
- Keep plugin-specific roots on the existing loader so plugin snapshot caching and namespacing continue to work.
- Merge both kinds of root snapshots through the existing precedence and deduplication logic, including discovery paths and source filesystem mappings.
- Move `HostSkillsSnapshot` into the skills extension as the owner of host skill loading.

## Testing

- Cover merged host and plugin catalogs, precedence for symlinked roots, discovery paths, and end-to-end rendering and invocation of host, repository, and plugin skills.

GitOrigin-RevId: c18080afb917c33c57bc17e36b40dd0f3c72d1d7
2026-08-05 21:17:54 +00:00
rphilizaire-openai
a1890b6998 Project orchestrator skills through world state (#37149)
## What changed

- Move the orchestrator skill catalog from thread context into its own
  `orchestrator_skills` world-state section so unchanged catalogs remain
  incremental across turns.
- Discover executor, orchestrator, and host catalogs together and render them
  against one context-window-aware metadata budget, preserving executor entries
  before orchestrator and host entries under pressure.
- Emit catalog metrics and budget warnings when each world-state section is
  rendered.

## Testing

- Cover incremental orchestrator catalogs across production turns, combined
  catalog budgeting, disabled and unavailable providers, caching, warnings, and
  metrics.

GitOrigin-RevId: a0fb25d39dcaf43c978aff9da7972a1206f736e4
2026-08-05 20:14:31 +00:00
xl-openai
72d937ed4d Preserve discovery paths for symlinked skills (#37144)
## Why

Symlinked skills have a canonical `SKILL.md` path that can differ from the path
under the configured skill root. A catalog entry that advertises the discovery
path must still select the canonical skill.

## What changed

- Track each loaded skill's discovery path alongside its canonical identity.
- Render discovery paths in the skill catalog and accept either form for
  structured selections and linked skill mentions.
- Preserve enabled-state checks, deduplication, and product filtering when
  resolving discovery paths.

## Testing

Added loader, catalog, mention-resolution, and end-to-end turn coverage for
skills discovered through directory symlinks.

GitOrigin-RevId: bae539b766cc3782c7c121a4276c337699cbb509
2026-08-05 19:51:51 +00:00
jacobzhou-oai
56b82e676c Enforce Agent Plugin runtime boundaries (#37027)
## What changed

- Track Agent Plugin manifests through plugin, skill, and MCP loading so their capabilities use format-specific behavior without changing legacy plugins.
- Discover only direct-child skills, exclude app and hook capabilities, isolate MCP data, and reject MCP configuration files that are non-regular or resolve outside the plugin root.
- Bound model-visible skill instructions, plugin instructions, MCP descriptions, schemas, individual tools, and the aggregate Agent Plugin MCP tool set.
- Stop MCP and OAuth redirects when Agent Plugins send configured or authorization headers, while retaining existing redirect behavior for legacy MCP servers.

## Testing

- Add coverage for capability filtering, skill discovery, isolated MCP data and reserved-path expansion, unsafe MCP configuration files, context limits, and redirect handling.

GitOrigin-RevId: c9af66b051269f3226628ca280a58d32c808c38f
2026-08-05 04:54:33 +00:00
rka-oai
f21dc46388 Canonicalize default tools under the functions namespace (#37022)
## What changed

- Group top-level function and custom tool definitions into a single `functions` namespace for Responses Lite providers that support namespaced tools.
- Normalize missing, empty, and explicit `functions` namespaces to the same tool identity across registration, routing, lifecycle hooks, configuration, and tool search.
- Keep default tool names unprefixed in code mode, display output, and dispatch traces while preserving explicit non-default namespaces.

## Testing

- Add coverage for Responses Lite serialization, tool search results, namespace normalization and collision handling, routing, lifecycle events, and code-mode namespace policies.

GitOrigin-RevId: d48414005b5d22d39b11a198e19c47814d3a19f2
2026-08-05 04:07:59 +00:00
chess
5d89ab65dc Keep shared skill caches fresh across plugin loads (#37000)
## What changed

- Key cached skill snapshots by filesystem and plugin snapshot identity so compatible config and working-directory loads can share results without reusing stale plugin data.
- Coalesce concurrent loads for the same cache key and replace the cached entry on forced reload.
- Clear both plugin and skill caches when `skills/list` forces a reload, and bypass working-directory caching when effective plugin roots are present.

## Testing

- Cover concurrent cache sharing, filesystem isolation, forced reloads, and refreshed plugin skill metadata in host service and app server tests.

GitOrigin-RevId: 03fed3b40d45bb29206d5a3c3e78f06df04dbb1e
2026-08-05 01:24:35 +00:00
andrewgu-oai
bae8d8f5b6 Preserve shared bundled skill caches (#36989)
## Why

The bundled system-skill cache is shared by every process using the same
`CODEX_HOME`. A service with bundled skills disabled must not remove cache
files that another service still uses.

## What changed

- Filter system skill roots from disabled services without deleting the shared
  cache.
- Ensure bundled system skills are installed during loads when they are
  enabled, including after a runtime configuration change.

## Testing

Add app-server coverage for preserving the cache across enabled and disabled
services and refreshing stale cached skills after runtime enablement.

GitOrigin-RevId: 1eca999b33b7be69873a40a91767fd26f0c2b457
2026-08-04 22:48:34 +00:00
rphilizaire-openai
1b90b1d16b Honor explicit-only orchestrator skills (#36976)
## Why

Orchestrator skills with `allow_implicit_invocation: false` were still exposed in the model-visible skill catalog.

## What changed

- Hide explicit-only orchestrator skills from the prompt catalog while keeping them available for direct invocation.
- Include orchestrator resource-access metadata with injected instructions so `skills.read` can load referenced resources.
- Track visible and hidden discovery limits separately, and record discovery duration and resource-count metrics.

## Testing

Add an integration test that verifies an explicit-only orchestrator skill stays out of the prompt catalog, can be selected explicitly, and can read a referenced resource.

GitOrigin-RevId: 9cab5a61eb27c96bec9d1346c7dcdbc97376f7dc
2026-08-04 21:42:03 +00:00
jay
40d226e398 Link Codex attribution in pull request bodies (#36963)
## What changed

- Update the required pull request attribution to `Generated with [Codex](https://openai.com/codex/).`.
- Recognize the previous unlinked attribution when restoring saved context so it can be replaced without duplicating the attribution instructions.

## Testing

- Cover cold resume with both commit-only legacy instructions and the previous unlinked pull request attribution.
- Update app-server and MCP server assertions for the linked attribution.

GitOrigin-RevId: 8773546a6a59dab146905e50cf4434d53b9335cf
2026-08-04 19:52:09 +00:00
efrazer-oai
989a0b053e Accept user input when starting idle turns (#36947)
## What changed

- Generalize `CodexThread::try_start_turn_if_idle` to accept exported
  `TurnInput` values, preserving user content and client IDs in the first model
  request.
- Allow non-empty user input to start an idle turn in Plan mode while retaining
  the Plan-mode rejection for automatic response items and empty user input.
- Process idle user input through the normal user-turn path so connector
  selections are cleared, prompt telemetry is recorded, and referenced skill
  instructions are included.

## Testing

- Cover idle user input in Default and Plan modes, response-item mailbox
  merging, empty-input rejection, and skill instruction injection.

GitOrigin-RevId: 116667d160d4464b525d9e4c7e8cc05d23a94008
2026-08-04 18:52:41 +00:00
felixxia-oai
1a7519fa07 Move host skill root resolution into the skills extension (#36943)
## What changed

- Move config-layer, user, system, plugin, extra, and repository skill-root
  resolution from `core-skills` into the host skills extension.
- Keep the core loader focused on loading explicit `SkillRoot` values.
- Relocate and expand tests for root precedence, deduplication, repository
  ancestry, plugin metadata, and concurrent probing.

GitOrigin-RevId: 3b95cf28101b8b4d64d54079d202154dad560aab
2026-08-04 18:41:55 +00:00
felixxia-oai
02bc1dd796 Move the host skills service into the skills extension (#36921)
## What changed

- Move host skill discovery, snapshot caching, and configuration handling from
  `codex-core-skills` to `codex-skills-extension`.
- Rename `SkillsService` and `SkillsLoadInput` to `HostSkillsService` and
  `HostSkillsLoadInput` to distinguish the host implementation from other skill
  providers.
- Keep shared loading primitives and skill outcome modeling in
  `codex-core-skills`.

GitOrigin-RevId: d81a21791d2ef8c066e157e7e538b8cb7ee4c24b
2026-08-04 16:28:46 +00:00
felixxia-oai
49b0aebd6f Load skill interface metadata in the host loader (#36903)
## What changed

- Move skill interface validation and asset-path resolution into `codex-skills` so both skill loaders share the same behavior.
- Populate host-loaded skills with validated display metadata, prompts, brand colors, and local icons from `agents/openai.yaml`.
- Allow plugin skills to reference icons under the plugin's shared `assets` directory while rejecting absolute paths and paths that escape permitted asset roots.

## Testing

- Add resolver tests for valid, invalid, local, and plugin-shared interface assets.
- Add host loader coverage for interface fields and asset-path restrictions.

GitOrigin-RevId: 3f316191752eeebd15d11ac0bee82201574320ec
2026-08-04 14:51:08 +00:00
Charlie Marsh
40e5de94e9 Avoid redundant filesystem metadata probes (#36898)
## What changed

- Reuse directory-entry file types in local memory listing while continuing to
  exclude symlinks, and reuse rollout metadata when reading modification times.
- Avoid following non-symlinks twice in direct filesystem metadata and directory
  listing operations while preserving target classification for valid symlinks.

## Testing

- Cover symlink handling in local memory listing and search.
- Extend Unix filesystem tests for followed file and directory symlinks and
  dangling metadata links.

GitOrigin-RevId: e4e24576e2e9db704f9da54727928e121f81dc86
2026-08-04 13:56:52 +00:00
felixxia-oai
1669c2403f Add host skill root loading (#36884)
## What changed

- Add a loader that discovers skills from canonical host roots and preserves their `SkillScope`.
- Skip hidden directories, follow directory symlinks for user, repo, and admin scopes, and ignore them for system skills.
- Load dependencies and policy from optional `agents/openai.yaml` metadata without rejecting a skill when that metadata is missing or invalid.
- Resolve plugin and symlink namespaces while retaining host paths and reporting per-skill errors outside system scope.

## Testing

Add coverage for frontmatter and metadata loading, invalid optional metadata, hidden directories, plugin namespaces, and scope-specific symlink discovery.

GitOrigin-RevId: ac436d93b5943b7eaae32143e43367921dd1c350
2026-08-04 11:19:27 +00:00
felixxia-oai
77ce1d10aa Move direct executor skill discovery into the skills extension (#36880)
## What changed

- Add extension-owned discovery and namespace resolution for skills loaded directly through an `ExecutorFileSystem`.
- Preserve hidden and symlinked skills, nested plugin namespaces, optional `agents/openai.yaml` metadata, product restrictions, and deterministic ordering.
- Reuse the filesystem walk inventory and bound concurrent skill, metadata, and manifest reads.
- Route direct executor catalog loading through the new extension loader.

## Testing

- Cover namespace lookup, metadata probing, walk reuse, concurrent reads, and parity with the existing environment loader.

GitOrigin-RevId: 4e0b821eb84d03f0dc1c2dee7b2b9a072ee3fd44
2026-08-04 11:04:45 +00:00
felixxia-oai
4c25d6cc5c Move executor skill bundle loading into the skills extension (#36877)
## What changed

- Move parsing of pre-discovered executor skill bundles from `core-skills` to
  the skills extension.
- Expose shared `SKILL.md` frontmatter parsing from `codex-skills` so direct
  and pre-discovered loading use the same validation and repair behavior.

## Testing

- Add parity coverage for direct and pre-discovered executor skill catalogs,
  including plugin namespaces, metadata, product policy, and warnings.
- Add a snapshot for the resulting pre-discovered executor catalog.

GitOrigin-RevId: c5f888226fa5600bd8b90f5682400da39a5db5ff
2026-08-04 10:41:01 +00:00