Skip to content

feat: adopt codex-huge-context, refresh codex-first - #7

Merged
BramVR merged 3 commits into
mainfrom
claude/codex-huge-context
Jul 22, 2026
Merged

feat: adopt codex-huge-context, refresh codex-first#7
BramVR merged 3 commits into
mainfrom
claude/codex-huge-context

Conversation

@BramVR

@BramVR BramVR commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Upstream intake from steipete/agent-scripts: adopts the codex-huge-context skill and brings codex-first up to date, both scrubbed of upstream-personal assumptions per the rule in AGENTS.MD.

Why

codex-first had 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 in codex-huge-context, which this fork did not have, so the two land together.

Commits

26a2d4ef — adopt codex-huge-context

The 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.rb and preflight.test.rb are taken verbatim — they carry no personal paths and default to ~/.codex/config.toml with a --config override. Tests pass; ruby -c clean.

SKILL.md scrubs: /Users/steipete/Users/bram; the named 1Password vault item replaced with a $one-password pointer (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.yaml have 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 route

Bram-local hard rule: no --enable fast_mode flag and no fast_mode config default on this route, fresh or resumed.

d187fc91 — refresh codex-first, drop fast mode

Ports 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-sol and model_reasoning_effort=high pinned 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:

  • Fast mode removed entirely — dropped from the main invocation, the watchdog invocation, and the model-default bullet, plus a standing Never fast mode: no --enable fast_mode, on any route. Upstream pins it as house default.
  • Maintainer pointer is $bram-maintainer-loop-v2, not upstream's $maintainer-orchestrator.
  • Gate keeps the loopback half only (localhost, *.localhost, 127.0.0.0/8, ::1, fail closed if unreadable); upstream's personal router host dropped.
  • Preflight path targets the flat skill mirror (~/.codex/skills/codex-huge-context/scripts/preflight.rb), not upstream's whole-root ~/.codex/skills/agent-scripts/ layout, which scripts/sync-skills deliberately does not create.

Reviewer notes

  • One adopted policy change is a real shift, not mechanical. The old "Keep in Claude" list reserved destructive/irreversible ops, releases, pushes, and GitHub mutations for Claude. Upstream narrowed that to releases/publishes/credentials and now lets Codex execute rebases and the merge/land mechanics once Claude has decided to land and the gates pass. Adopted as written — worth a second look if you want it clawed back.
  • codex-huge-context describes a route this Mac is not on. ~/.codex/config.toml has model = "gpt-5.6-sol" but no model_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 with model_provider must be "openai_api_direct".
  • scripts/validate-skills passes at 42 skills. No gorillaclaw, Clawdex, maintainer-orchestrator, or skills/agent-scripts/ references survive.

BramVR added 3 commits July 22, 2026 14:32
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.
Copilot AI review requested due to automatic review settings July 22, 2026 12:40
@BramVR
BramVR merged commit b9d7ba1 into main Jul 22, 2026
2 checks passed
@BramVR
BramVR deleted the claude/codex-huge-context branch July 22, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-context skill documentation + Ruby preflight script and tests for validating the direct-provider configuration and credential delivery.
  • Updated codex-first skill 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
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