Repository navigation
Backlog
Labels
difficulty: mediumLeaderboard: 6 points when the PR closing this is mergedenhancementNew feature or requesthelp wantedExtra attention is needed
Description
Part of #240. Builds on #242 and #241. Packaging: #227 (Codex row).
What Codex offers (checked against the docs on 2026-12-03)
developers.openai.com/codex/* now redirects to learn.chatgpt.com. Sources: Hooks, Skills, Scheduled tasks, Plugins.
- Hook config:
$CODEX_HOME/hooks.json(user),.codex/hooks.json(trusted projects only),/etc/codex/hooks.json, or[hooks]/[[hooks.PreToolUse]]tables inconfig.toml. Use one format per layer, because using both triggers a warning. - Trust: non-managed hooks must be reviewed and trusted before they run.
secfoo automations enablemust tell the user to approve them. Never use--dangerously-bypass-hook-trustin anything we generate. - Events:
PreToolUse:permissionDecision: "deny".PostToolUse: can replace the tool result.Stop/SubagentStop:decision: "block"keeps the agent going.SessionStart.SessionEnd: always synchronous, 1 s default, 3 s maximum.- Also
UserPromptSubmit,PreCompact,Interrupt, …
- Async:
"async": truecommand hooks can't block, and at most 8 run concurrently. Timeout is in seconds, default 600. - Not documented: whether hooks fire under
codex exec. secfoo'scodexadapter usescodex execfor nested reviews, so verify it and keep the recursion guard either way. - Skills:
.agents/skills/<name>/SKILL.md(repo, scanned up to the root),$HOME/.agents/skills. Invoke with$nameor/skills. This is the same path Antigravity reads, so one generated skill folder serves both. - Plugins: bundle skills, MCP servers and hooks. Install via
/plugins. Manifest docs: developers.openai.com/plugins/build/plugins (not verified). - Scheduled tasks: created only in the ChatGPT/Codex app or on the web, not the CLI. Desktop tasks run locally (the app must be running). Team tasks run in the cloud via a service account. Triggers are time-based, plus Gmail/Slack/GitHub app events on eligible plans.
- Sandbox: under
workspace-write, tool calls that need the network fail. A push from inside a sandboxed command fails. Check whether hook processes run outside the sandbox. If they don't, rely on the outbox (Automation runs always report back: trigger provenance, every outcome (not just success), offline queue, env-var key #241 item 3).
Recipe mapping
| Recipe | Codex event | Behaviour |
|---|---|---|
commit-guard |
PreToolUse (matcher ^Bash$ or the shell tool name in your version) |
permissionDecision: "deny" + reason |
turn-review |
Stop |
decision: "block" with findings, loop-guarded |
dependency-watch etc. |
PostToolUse with async: true |
Background; surfaced at the next Stop |
session-brief |
SessionStart |
|
session-flush |
SessionEnd |
Spawn the detached flush only; the budget is ≤3 s |
fix-findings, on-demand reviews |
Generated skills in .agents/skills/ |
Shared with Antigravity |
scheduled-baseline |
Codex scheduled task | Prompt template that runs the secfoo skill and submits (host mode), or secfoo run --json (delegate) |
Tasks
-
hosts/codex.py+ fixtures (PreToolUse,PostToolUse,Stop,SessionStart,SessionEnd) -
enablewriteshooks.json(prefer it overconfig.toml). Ifconfig.tomlis chosen, reuse the tomlkit merge fromsrc/secfoo/mcp.py - Document the trust step, and have
secfoo automations doctor --tool codexdetect untrusted or disabled hooks ([features]flag) - Verify hook behaviour under
codex execand inside the sandbox (network) - Skills generated once into
.agents/skills/, shared with the Antigravity issue - Scheduled-task prompt template + docs
- Verification row: Codex CLI version, OS, recipes, portal shows
trigger.host = "codex"
Done when
The recipes work in the Codex CLI with trusted hooks. Sandboxed runs report via the outbox. The scheduled-task template is documented, and skills are shared with Antigravity without duplication.
Metadata
Metadata
Assignees
Labels
difficulty: mediumLeaderboard: 6 points when the PR closing this is mergedenhancementNew feature or requesthelp wantedExtra attention is needed
Activity