feat(runtime/codex): pass agent skills through to Codex#640
Merged
Conversation
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.
warm-wm
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bridges an agent's skills into the
runtime="codex"path. Previously the codex runtime only flattened the session into a prompt and ignoredagentskills 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:namespacetype that Ark rejects);\$CODEX_HOME/skills/;CODEX_HOMEand the remote-skill download cache both live under the system temp dir (/tmp), the only writable path on the AgentKit runtime (overridable viaVEADK_SKILLS_CACHE_DIR).How
New
veadk/runtime/codex/skills.pywithsync_skills_to_codex_home(agent, codex_home), called fromrun_asyncright after theCODEX_HOMEis prepared. It rebuilds theskills/subdir each run (so it always reflects the agent's current skills) and covers two sources:google.adk.tools.skill_toolset.SkillToolsetinagent.tools): eachmodels.Skillis reconstructed back into aSKILL.md(frontmatter + instructions) plus its resource files (references / assets / scripts).agent.skills_dict): a local skill directory is linked as-is; a remote skill-space / SkillHub skill is downloaded on demand viaveadk.skills.materializer.materialize_remote_skilland linked in.Everything is best-effort — a skill that fails to materialize is logged and skipped, never aborting the turn.
Validation
SkillToolset(skills=[load_skill_from_dir(...)])→ correctSKILL.mdwith frontmatter + body.SKILL.md(not the prompt), run a codex agent against 方舟 (deepseek) through the shim → the model discovers the skill and answers with the secret.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.VeSkillRegistrywrapper needs agoogle-adkthat exportsSkillRegistry(not in the currently pinned version); the underlyingmaterialize_remote_skillused here works today. Legacy-dict and ADK-nativeSkillToolsetsources are unaffected.🤖 Generated with Claude Code