Skip to content

Evaluate AGENTS.md and skills with Codex#70120

Open
RoyLee1224 wants to merge 1 commit into
apache:mainfrom
RoyLee1224:feat/skill-eval-codex-runtime
Open

Evaluate AGENTS.md and skills with Codex#70120
RoyLee1224 wants to merge 1 commit into
apache:mainfrom
RoyLee1224:feat/skill-eval-codex-runtime

Conversation

@RoyLee1224

@RoyLee1224 RoyLee1224 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

cc: @jason810496

Follow up on #69308 by adding Codex as an alternative runtime for evaluating AGENTS.md and skills through promptfoo's built-in Codex SDK provider.

Run the evaluation with Codex:

AGENT_RUNTIME=codex \
  prek run run-skill-eval --hook-stage manual --all-files

The evaluation completed all six cases with no provider errors. Four behavioral assertions passed and two existing ambiguous newsfragment cases failed.

CleanShot 2026-07-20 at 17 26 29@2x CleanShot 2026-07-20 at 17 26 48@2x
Was generative AI tooling used to co-author this PR?
  • Yes gpt-5.6-sol

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding the Codex support!

Comment thread dev/skill-evals/eval.py
installed_version = json.loads(package_json.read_text())["version"]
except (OSError, KeyError, ValueError):
continue
if installed_version == expected_version:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this means that we force the contributor to use the exact same version we pin?

Comment thread .pre-commit-config.yaml
Comment on lines -1022 to +1025
additional_dependencies: ['promptfoo@0.121.17', '@anthropic-ai/claude-agent-sdk@0.3.185']
additional_dependencies:
- 'promptfoo@0.121.17'
- '@anthropic-ai/claude-agent-sdk@0.3.185'
- '@openai/codex-sdk@0.144.6'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or does it means we will use the Claude / Codex install by prek? Would it be possible to relex as to use system wise CLI first then fallback to prek installed?

Comment thread .pre-commit-config.yaml
entry: ./dev/skill-evals/eval.py
language: node
language_version: '22.22.0'
additional_dependencies: ['promptfoo@0.121.17', '@anthropic-ai/claude-agent-sdk@0.3.185']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's fine for promptfoo as most of the user won't have it but I think we can assume most of the contributor have either Claude or Codex. Since we will pull ~310–350 MB Codex CLI binary, including Claude-only users now.

Comment thread dev/skill-evals/eval.py
return {"id": "anthropic:claude-agent-sdk", "label": label, "config": config}


def build_codex_provider(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not a real comment but a interesting finding by claude.
Fortunately, our next steps is shirking the AGENTS.md haha.


Codex silently truncates AGENTS.md at 32 KiB, and Airflow's AGENTS.md is already 35,417 bytes, so a Codex-runtime eval can measure nothing while recording proof it ran (CONFIRMED)
Codex's DEFAULT_PROJECT_DOC_MAX_BYTES is 32,768 and codex-rs prefix-truncates project docs silently; build_codex_provider sets cli_config only for history persistence and never raises project_doc_max_bytes, even though promptfoo spreads cli_config straight into Codex config overrides. Since arms differ only in AGENTS.md, any guidance edit landing past the 32,768-byte boundary (the file's last ~2.6 KB, where new guidance is typically appended) produces byte-identical visible guidance in both arms — the exact "eval silently measures nothing" failure mode check_claude_md_symlink guards against on the Claude side, and the hash is still recorded as proof. Fix is one line: add project_doc_max_bytes to cli_config.

Comment thread dev/skill-evals/eval.py
Comment on lines +49 to +52
SDK_PACKAGES = {
"claude": ("@anthropic-ai/claude-agent-sdk", "0.3.185"),
"codex": ("@openai/codex-sdk", "0.144.6"),
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or another direction, we could define the lower bound for the CLI version. (Thought I have no idea how should we pin the version at this moment).

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