Skip to content

Support Claude-style context: fork and inline command execution in Codex skills #22943

@EricDeng1001

Description

@EricDeng1001

What variant of Codex are you using?

App

What feature would you like to see?

Feature Request

Please add first-class support for Claude-style skill execution semantics in Codex skills, specifically:

  • context: fork
  • inline command execution inside the skill body

Motivation

Some existing Claude skills rely heavily on context: fork plus inline commands. This pattern is very useful for command-heavy workflows where the command output is large and noisy, but the main agent only needs the final useful result.

A concrete example is Unreal Engine tooling. UE build, test, functional test, editor Python, and asset inspection commands often produce thousands of lines of logs. In Claude skills, the skill can fork context, run the inline command, parse the output inside that forked context, and return a compact result to the main agent.

When migrating these skills to Codex, this behavior is difficult to reproduce cleanly. Codex currently requires the main agent to either:

  • know and run the underlying command itself,
  • parse command arguments itself,
  • manually spawn a subagent,
  • or maintain a custom runner protocol per skill.

That changes the skill model substantially.

Desired Behavior

Codex skills should be able to express the same pattern directly in SKILL.md metadata/body.

For example, a skill could include metadata similar to:

context: fork

And inline executable blocks such as:

.\.codex\skills\ue-test\scripts\run.ps1 -TestFilter "{{test_filter}}"

The expected behavior would be:

  1. The main agent activates the skill.
  2. Codex executes the inline command in a forked context.
  3. The skill/fork receives and parses the full command output.
  4. The main agent receives only the final useful result from the skill.
  5. The main agent does not need to know the command-line details or parse the raw logs.

Why This Matters

This is important for migrating existing Claude skills to Codex without changing their architecture.

In Claude, context: fork + inline command execution allows a skill to encapsulate both:

  • how to run the tool
  • how to interpret the tool output

The main agent can simply use the skill as a capability.

Without this feature, Codex skills are less self-contained for noisy execution workflows. The main agent has to participate in implementation details that should belong to the skill.

Example Use Case

A Claude UE test skill can effectively do:

---
name: ue-test
description: Run Unreal Engine automation tests
context: fork
---
Run the test with:

```!powershell
.\UECommand.ps1 Test -TestFilter "{{filter}}"

Parse the automation report and return:

  • pass/fail
  • failed test names
  • key error lines
  • full log path

The main agent does not need to know the UE command syntax. It only receives the interpreted result.

In Codex today, this has to be rewritten as a normal instruction file plus external scripts, and the main agent still has to orchestrate execution.

## Expected Benefits

- Easier migration of Claude skills to Codex
- Better encapsulation of command-heavy skills
- Less context pollution in the main agent
- Less need for custom subagent protocols
- More reliable handling of noisy logs
- Cleaner abstraction boundary between “using a skill” and “knowing how the skill works”

## Non-goals

This is not just a request to hide logs or suppress command output.

The key request is to let Codex skills own execution in the same way Claude skills can: fork the context, run inline commands, inspect noisy output locally, and return a concise interpreted result to the main agent.


### Additional information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appenhancementNew feature or requestskillsIssues related to skillswindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions