Skip to content

feat(runtime/codex): pass agent skills through to Codex#640

Merged
yaozheng-fang merged 1 commit into
mainfrom
feat/codex-skill-passthrough
Jul 6, 2026
Merged

feat(runtime/codex): pass agent skills through to Codex#640
yaozheng-fang merged 1 commit into
mainfrom
feat/codex-skill-passthrough

Conversation

@yaozheng-fang

Copy link
Copy Markdown
Collaborator

What

Bridges an agent's skills into the runtime="codex" path. Previously the codex runtime only flattened the session into a prompt and ignored agent skills entirely, so a Codex-backed agent had none of its skills.

This materializes each skill into \$CODEX_HOME/skills/<name>/SKILL.md (+ resources), where Codex's native skill system discovers, injects and progressively loads them. It's purely prompt- and file-level, so:

  • backend-independent — no dependence on the Responses/code-mode tool path (unlike MCP/function tools, which Codex wraps in a namespace type that Ark rejects);
  • no config flag — Codex auto-scans the user skill scope \$CODEX_HOME/skills/;
  • cloud-safeCODEX_HOME and the remote-skill download cache both live under the system temp dir (/tmp), the only writable path on the AgentKit runtime (overridable via VEADK_SKILLS_CACHE_DIR).

How

New veadk/runtime/codex/skills.py with sync_skills_to_codex_home(agent, codex_home), called from run_async right after the CODEX_HOME is prepared. It rebuilds the skills/ subdir each run (so it always reflects the agent's current skills) and covers two sources:

  • ADK-native skills (google.adk.tools.skill_toolset.SkillToolset in agent.tools): each models.Skill is reconstructed back into a SKILL.md (frontmatter + instructions) plus its resource files (references / assets / scripts).
  • Legacy VeADK skills (agent.skills_dict): a local skill directory is linked as-is; a remote skill-space / SkillHub skill is downloaded on demand via veadk.skills.materializer.materialize_remote_skill and linked in.

Everything is best-effort — a skill that fails to materialize is logged and skipped, never aborting the turn.

Validation

  • Unit: SkillToolset(skills=[load_skill_from_dir(...)]) → correct SKILL.md with frontmatter + body.
  • E2E: put a skill whose body carries a secret only in SKILL.md (not the prompt), run a codex agent against 方舟 (deepseek) through the shim → the model discovers the skill and answers with the secret.
  • Remote: listed + downloaded a real SkillHub space's skills (SKILL.md + themes/ / scripts/ / references/) into /tmp, linked into \$CODEX_HOME/skills/, and Codex enumerated all of them.

Note

The remote path via the new veadk.skills.VeSkillRegistry wrapper needs a google-adk that exports SkillRegistry (not in the currently pinned version); the underlying materialize_remote_skill used here works today. Legacy-dict and ADK-native SkillToolset sources are unaffected.

🤖 Generated with Claude Code

The codex runtime ignored agent skills. Materialize them into
$CODEX_HOME/skills/, where Codex's native skill system discovers and loads
them. This is prompt- and file-level, so it is backend-independent and needs
no config flag; everything lands under the temp dir (the sole writable path
on the cloud runtime).

- ADK-native skills (google.adk SkillToolset) are reconstructed from each
  models.Skill (frontmatter + instructions + resources) into a SKILL.md tree.
- Legacy VeADK skills (agent.skills_dict) link their local directory, or
  download remote skill-space / SkillHub skills via materialize_remote_skill.
- Best-effort: a failing skill is logged and skipped, never aborting the turn.
@yaozheng-fang
yaozheng-fang merged commit 874a344 into main Jul 6, 2026
16 checks passed
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.

2 participants