Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Jan 16, 2026

This pull request adds a new experimental codex tool module to extensions.

import { Agent, run, generateTraceId, withTrace } from '@openai/agents';
import { codexTool } from '@openai/agents-extensions/experimental/codex';

async function main() {
  const codex = codexTool({
    sandboxMode: 'workspace-write',
    defaultThreadOptions: {
      model: 'gpt-5.2-codex',
      modelReasoningEffort: 'low',
      networkAccessEnabled: true,
      webSearchEnabled: false,
      approvalPolicy: 'never',
    },
  });
  const agent = new Agent({
    name: 'Codex Agent',
    instructions: [
      'Use the codex tool to inspect the workspace and answer the question.',
      'When skill names, which usually start with `$`, are mentioned, you must rely on the codex tool to use the skill and answer the question.',
      'When you send the final answer, you must include the following info at the end:',
      'Run `codex resume <thread_id>` to continue the codex session.',
    ].join(' '),
    tools: [codex],
  });
  const result = await run(
    agent,
    'You must use `$openai-knowledge` skill to fetch the latest realtime model name.',
  );
  console.log(result.finalOutput);
}

main().catch((error) => {
  console.error(error);
  process.exit(1);
});

see also: openai/openai-agents-python#2320

@seratch seratch added this to the 0.3.x milestone Jan 16, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

🦋 Changeset detected

Latest commit: d57e87f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@openai/agents-extensions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e872dda0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d039b354ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch merged commit da85934 into main Jan 16, 2026
4 checks passed
@seratch seratch deleted the feat/codex-tool branch January 16, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants