feat: adopt codex-huge-context, refresh codex-first - #7
Merged
Conversation
Port upstream steipete/agent-scripts codex-huge-context: Codex 1M-token direct OpenAI Responses API route, 922k safe input window, 820k total-scope compaction, Keychain-only credential delivery, secret-safe preflight.rb. preflight.rb and preflight.test.rb taken verbatim (no personal paths). SKILL.md scrubbed: /Users/steipete -> /Users/bram, named 1Password item replaced with a $one-password pointer, Mac-fleet rollout section dropped. Preflight path targets the flat skill mirror rather than upstream's whole-root ~/.codex/skills/agent-scripts symlink, which this fork does not create.
Overrides the $codex-first house default, which pins --enable fast_mode.
Port ten upstream commits: hard gate + autoreview exception, widened routing (diagnose-then-fix, exploratory subagents, git mechanics/PR landing), gpt-5.6-sol + high effort pinning, ChatGPT-app PATH recipe, harness-tracked background launches, liveness watchdog with explicit-id resume. Bram-local: never fast mode (flag dropped everywhere), maintainer pointer stays $bram-maintainer-loop-v2, loopback-only proxy gate without upstream's personal router host, preflight points at the flat skill mirror.
There was a problem hiding this comment.
Pull request overview
Upstream intake adds the codex-huge-context skill (1M-context direct OpenAI Responses API route + secret-safe preflight) and refreshes codex-first routing guidance to match upstream while preserving Bram-local deviations (notably: never fast mode).
Changes:
- Added
codex-huge-contextskill documentation + Ruby preflight script and tests for validating the direct-provider configuration and credential delivery. - Updated
codex-firstskill to widen delegation scope (fixing/exploration/git mechanics), add hard gate logic + huge-context preflight step, and document long-run watchdog/resume flow. - Recorded both skill updates in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/codex-huge-context/SKILL.md | New skill doc for 1M-context direct-provider setup, constraints, and verification workflow. |
| skills/codex-huge-context/scripts/preflight.rb | New secret-safe preflight validator for config, model catalog, and auth-helper delivery. |
| skills/codex-huge-context/scripts/preflight.test.rb | New tests covering preflight success/failure modes and leak-prevention expectations. |
| skills/codex-first/SKILL.md | Refreshed routing/gating rules, invocation patterns, and watchdog/resume guidance; drops fast mode. |
| CHANGELOG.md | Adds dated entries documenting the new/updated skills and policy deviations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+69
to
+72
| match = line.match(/\A([A-Za-z0-9_-]+)\s*=\s*(.+)\z/) | ||
| next unless match | ||
|
|
||
| sections[section][match[1]] = parse_toml_value(match[2]) |
| printf '#!/bin/sh\nexec "/Applications/ChatGPT.app/Contents/Resources/codex" "$@"\n' > "$HOME/.local/bin/codex" && chmod +x "$HOME/.local/bin/codex" | ||
| fi | ||
| ``` | ||
| Or install the self-contained CLI via `curl -fsSL https://chatgpt.com/codex/install.sh | sh`, which needs no wrapper. |
Comment on lines
+162
to
+167
| unless wait_thread.join(timeout_ms / 1000.0) | ||
| Process.kill("TERM", wait_thread.pid) | ||
| unless wait_thread.join(0.5) | ||
| Process.kill("KILL", wait_thread.pid) | ||
| wait_thread.join | ||
| end |
This was referenced Jul 22, 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.
Upstream intake from
steipete/agent-scripts: adopts thecodex-huge-contextskill and bringscodex-firstup to date, both scrubbed of upstream-personal assumptions per the rule inAGENTS.MD.Why
codex-firsthad not been touched since its original import — 76 lines against upstream's 149, ten commits behind. Its refreshed form references a preflight script that lives incodex-huge-context, which this fork did not have, so the two land together.Commits
26a2d4ef— adoptcodex-huge-contextThe Codex 1M-token direct OpenAI Responses API route: 922,000-token safe input window (1,050,000 total minus 128,000 max output), 820,000 total-scope auto-compaction, Keychain-only credential delivery, and a secret-safe
preflight.rb.preflight.rbandpreflight.test.rbare taken verbatim — they carry no personal paths and default to~/.codex/config.tomlwith a--configoverride. Tests pass;ruby -cclean.SKILL.md scrubs:
/Users/steipete→/Users/bram; the named 1Password vault item replaced with a$one-passwordpointer (service-account path, one tmux session, ask rather than enumerate); the entire Mac-fleet rollout section dropped, since$fleet-maintenance,$remote-mac, and~/Projects/manager/computers.yamlhave no equivalent here. The fleet section's useful hygiene — date-stamped backups, don't touch unrelated settings — was already stated under Required files.13571ab6— never fast mode on the huge-context routeBram-local hard rule: no
--enable fast_modeflag and nofast_modeconfig default on this route, fresh or resumed.d187fc91— refreshcodex-first, drop fast modePorts ten upstream commits: hard gate with the autoreview exception taking precedence; widened routing (diagnose-then-fix plus CI/lint/type failures, exploratory Codex subagents instead of Claude Explore/Task fan-out, git mechanics including rebase and PR landing);
-m gpt-5.6-solandmodel_reasoning_effort=highpinned explicitly; the ChatGPT.app PATH recipe (exec-wrapper, not symlink); harness-tracked background launches, one chip per worker; and the liveness watchdog with mtime staleness detection and explicit-id resume.Bram-local deviations:
Never fast mode: no --enable fast_mode, on any route.Upstream pins it as house default.$bram-maintainer-loop-v2, not upstream's$maintainer-orchestrator.localhost,*.localhost,127.0.0.0/8,::1, fail closed if unreadable); upstream's personal router host dropped.~/.codex/skills/codex-huge-context/scripts/preflight.rb), not upstream's whole-root~/.codex/skills/agent-scripts/layout, whichscripts/sync-skillsdeliberately does not create.Reviewer notes
codex-huge-contextdescribes a route this Mac is not on.~/.codex/config.tomlhasmodel = "gpt-5.6-sol"but nomodel_provider, no~/.codex/models-api-1m.json, and no auth helper. Opting in needs a dedicated OpenAI API key in Keychain and bills at long-context rates above 272,000 input tokens. The preflight was run against the live machine and fails correctly withmodel_provider must be "openai_api_direct".scripts/validate-skillspasses at 42 skills. Nogorillaclaw,Clawdex,maintainer-orchestrator, orskills/agent-scripts/references survive.