Codexfast Development Flow
Overview
Use this skill for day-to-day codexfast feature work.
This repo is high risk because it launches and can test runtime patches against a real /Applications/Codex.app bundle. Public launch must leave the app bundle untouched. Legacy bundle mutation, file-patch, archive rewrite, re-sign, and restore flows have been removed.
When To Use
- Adding or updating a patch target in
src/targets/*orsrc/patcher-targets.mts - Adapting to a new Codex bundle version
- Changing compatibility gating or bundle metadata handling
- Updating runtime launch, CDP interception, generated CLI composition, or hidden watcher cleanup
- Updating repo docs because behavior, support scope, or release guidance changed
Do not use this skill for release-only work. Use codexfast-release-flow for that.
Core Rules
- Keep the generated CLI self-contained.
- Edit
src/*as the source of truth, then runpnpm buildto regeneratebin/codexfast. - Preserve the runtime-only launcher. Do not reintroduce bundle unpack/repack, archive rewrite, persistent
Contents/Resources/app, localcodesign, or restore paths. - Treat patch-signature and runtime interception changes as one unit.
- Do not add new public watcher commands. Current
launchremoves legacy auto-repair watcher files installed by older releases. - Do not claim app behavior is fixed from code inspection alone. The regression suite must pass.
Workflow
Inspect the current repo state.
- Read
AGENTS.md,src/cli.mts, the relevantsrc/cli-*.mtsmodule,src/patcher-targets.mts, the relevantsrc/targets/*module,test/runtime-launch-flow.mts,test/re-sign-flow.sh, and the relevant README sections. - Use
src/targets/speed.mts,src/targets/plugins.mts, andsrc/targets/models.mtsfor feature-specific target definitions; keep shared target builders insrc/targets/builders.mts. - For runtime launch behavior, inspect
src/cli-runtime-launch.mts,src/cli-runtime-patcher.mts,src/cli-cdp.mts, andsrc/cli.mtstogether because the generated CLI inlines those modules. - For app environment or watcher behavior, inspect
src/cli-app-environment.mts,src/cli-watcher.mts, andsrc/cli.mtstogether. - If the change is bundle-specific, identify the exact gated text key, target file shape, and runtime URL shape first.
- Do not trust a missing runtime match as proof that a feature target is gone. For every expected feature path, search the extracted bundle by stable needles such as
settings.agent.speed.label,composer.speedSlashCommand.title,composer.intelligenceDropdown.speed.title,featureRequirements?.fast_mode,sidebarElectron.pluginsDisabledTooltip,skills.pluginsAuthBlockedToast.title,pluginDeepLinkAuthBlocked,openai-curated-marketplaces-hidden,skills.appsPage.pluginsLimitedCatalog,4218407052,plugins.install.connectorUnavailable,plugins.installModal.about,directoryApps,appsNeedingAuth, and nearbyserviceTierSettings/ auth-method gates. - For Fast support, verify the source hook that computes service-tier allowance and request-tier fallback, the request helper that computes
serviceTierfor send/edit/resume paths, and the visible consumers. Settings,/fast, and composer Speed controls are not sufficient ifuse-service-tier-settings-*.jsor an equivalent shared hook still collapses custom API users to standard, if a helper nearFailed to read service tier for requeststill gates non-ChatGPT auth methods with:!1, if stale conversation-level service-tier state overrides Settings Fast, or if latest-turnparams.serviceTierfrom stop/edit/resend flows locks the current conversation to Standard. - For Plugins catalog support, trace both the backend result and the UI consumption path. A successful
list-pluginsresponse withopenai-curatedplugins is not enough ifuse-plugins-*.jslater excludes marketplace names, applies build-flavor filtering, orplugins-page-selectors-*.jsselects only bundled sections. InspectNe(t.marketplaces, ...),He({buildFlavor,...}), vertical-catalog flags such as4218407052, and selector defaults when the page shows only a sparse list. - Distinguish "target absent" from "target present but regex stale". A target is absent only after broad non-locale JS search shows the user-facing needle and adjacent gate are no longer present anywhere in
webview/assets. - For runtime launch work, inspect the real CDP request URLs as well as the extracted archive paths. Current
26.513.20950serves renderer JavaScript asapp://-/assets/*.js, while older assumptions usedapp://-/webview/assets/*.js. - For runtime launch interception issues, verify the browser-level CDP auto-attach path first:
Target.setAutoAttachmust usewaitForDebuggerOnStartand flattened sessions,Fetch.enablemust run in the renderersessionIdbeforeRuntime.runIfWaitingForDebugger, and the heartbeat should stay browser-level rather than page-level.
- Read
Make the smallest viable code change.
- Keep patch logic narrow.
- Prefer adding a new target spec over refactoring unrelated logic.
- For compatibility gating, update the whitelist and surface the detected version/build clearly in output.
- If changing the generated entrypoint, edit the source pieces, update
scripts/build-codexfast.mtswhen a newsrc/cli-*.mtsmodule must be inlined, and regeneratebin/codexfast.
Update regression coverage in the same change.
- Extend
test/runtime-launch-flow.mtsfor every new target, runtime path, hidden watcher cleanup path, or compatibility guard. Keeptest/re-sign-flow.shas the compatibility entrypoint. - Cover both positive and negative cases when relevant.
- When changing runtime launch, cover generated single-file behavior. A source-level
patch-engineimport is not enough because the embedded runtime engine is extracted from generated__PATCHER_SOURCE__.
- Extend
Update repo docs in the same change.
- Update
README.mdwhen usage, compatibility policy, supported features, or recovery guidance changes. - Update
README.zh-CN.mdwith the same behavior changes. - Keep README compatibility lists newest-first when adding or reordering verified Codex builds.
- Keep public README usage focused on
launch,help, andversion. - Update
AGENTS.mdwhen the maintenance checklist or validation expectations change. - Update
CHANGELOG.mdunder the active unreleased or target release section.
- Update
Verify before calling the work done.
- Run
pnpm build:check. - Run
pnpm typecheck. - Run
pnpm testor, for a narrow local check,bash test/re-sign-flow.sh. - If package metadata changed, also inspect
package.jsonandbin/codexfast. - If packaging or docs changed materially, run
pnpm pack --dry-run. - For runtime launch changes, run a real installed-app
launchpass when possible, then confirmapp.asar,Info.plist, and the app signature are unchanged.
- Run
Codexfast-Specific Checklist
- Settings-side Fast patch still works.
- The shared Fast service-tier allowance/source hook still lets custom API users compute, persist, and send the selected Fast tier while preserving official ChatGPT
fast_moderequirements. - The Fast request service-tier helper still lets send/edit/resume paths compute and send Fast for non-ChatGPT auth methods while preserving official ChatGPT
fast_moderequirements. - The shared Fast service-tier fallback path still ignores stale conversation-level service-tier state, so reopened conversations fall back to the configured Settings tier instead of forcing Standard.
- The shared Fast service-tier fallback path still ignores stale latest-turn
params.serviceTier, so stopping a Fast response, editing the message, and resending in the same conversation does not force Standard or lock speed changes until restart. - Composer
/fastpatch still works. - Composer-side
Speedmenu patch still works for the target bundle:Add files and more / +Speed submenu on builds that still expose the add-context path.- Composer
Intelligencedropdown Speed submenu on newer builds where the add-context Speed entry moved.
- Every Plugins gate required by the target build still works, including sidebar access, page content, plugin detail redirects, curated catalog visibility, install-button availability, install-modal content, plugin detail app-connect content, and post-install app connect where present.
- Curated catalog validation checks the visible page, not only the backend. For builds with curated catalog support, the page must not collapse to only bundled addable plugins such as Computer Use and LaTeX after
list-pluginsreturns the OpenAI curated marketplace. - Unsupported versions are blocked before runtime launch starts Codex.
- Generated CLI extraction still runs the embedded runtime patch engine.
- Public help and the interactive menu must not advertise
status,apply,restore,install-watcher, oruninstall-watcher. - Public
launchremoves legacy auto-repair watcher files when present.
Common Mistakes
- Updating source target regexes without regenerating and inspecting the generated CLI.
- Treating a missing target as product behavior. First prove whether the bundle still contains the feature needle in a moved file or with a renamed minified hook.
- Validating Fast support only by making controls visible. Trace the selected tier back to the shared service-tier hook, the request helper used by send/edit/resume commands, the request/config path, and conversation reload fallback so Fast is not silently normalized back to standard after relaunch, history restore, or edit/resend with changed reasoning effort.
- Assuming
serviceTierForRequestcovers every send path. Newer bundles can also call a helper nearFailed to read service tier for request; if that helper returns false for non-ChatGPT auth methods, UI can show Fast while outgoing requests still omitservice_tier. - Treating latest-turn
params.serviceTieras safe request state. Stop/edit/resend flows can leave stale Standard there; tests must proveserviceTierForRequestfalls back to the configured Settings tier. - Validating Plugins catalog support only by calling
list-plugins. Trace the returned marketplaces throughuse-plugins-*.jsandplugins-page-selectors-*.js; a later exclusion can still hideopenai-curatedfrom the actual page. - Assuming old Plugins sidebar/page/detail gates are required on every new build. Some builds remove those gates but add new catalog or install gates, so required initial targets must stay build-specific.
- Writing a fixture assertion that passes on both guarded and patched code. For hidden-control fixes, assert both the patched replacement and the removal of the original guard, for example
if(!n)return null;is gone. - Describing a Codex build as supported before adding tests and whitelist coverage.
- Updating only one README and leaving English/Chinese docs out of sync.
- Publishing behavior changes without moving the maintenance checklist forward.
- Validating runtime launch only against extracted fixture files or source imports; generated CLI extraction and CDP timing can fail independently.
Source: Veath/codexfast — distributed by TomeVault.