No description
  • Rust 45%
  • Python 44.3%
  • Shell 8.9%
  • Starlark 1.5%
  • C 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-02 07:16:43 +03:00
.agents Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
docs Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
elevation-gate Snapshot 0.156.0-alpha.12-patched.5 tooling and runtime patches 2026-09-24 17:38:42 +03:00
patches/legacy Snapshot 0.156.0-alpha.12-patched.5 tooling and runtime patches 2026-09-24 17:38:42 +03:00
runtime-control Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
runtime-fastctx-adapter Document and package native runtime modules 2026-09-27 11:21:42 +03:00
runtime-module-spike Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
runtime-native-modules Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
skills Document and package native runtime modules 2026-09-27 11:21:42 +03:00
tools Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
vendor Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
.bazelversion Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
.gitignore Snapshot 0.156.0-alpha.12-patched.5 tooling and runtime patches 2026-09-24 17:38:42 +03:00
.gitmodules Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
AGENTS.md Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
BUILD.bazel Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
BUILD.md Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
MODULE.bazel Update patched Codex and isolate addons with fully remote builds 2026-11-02 07:16:43 +03:00
README.md Publish latest native modules and Codex source customizations 2026-10-13 11:09:30 +03:00

Codex patched: modular runtime

This repository packages Codex around a native runtime module system. The patched host loads a versioned manager, exposes module catalog and lifecycle operations, and lets selected feature modules provide their capabilities. The module system is the default architecture of this fork, not an optional demo. The patched source is pinned in vendor/codex and reproduced by runtime-control/patches/0001-codex-customizations.patch against the upstream release recorded in runtime-control/release.conf.

The CLI exposes codex modules and the TUI exposes /modules for status, inspection, verification, activation, rollback, and disable. Package staging can include approved module libraries; the active version of each module is selected per Codex profile. See native module activation and the module author guide for the lifecycle and ABI contracts.

Module and tool layer

Component Role Interface
Native runtime manager Loads versioned modules, publishes their catalog, and controls activation and rollback Patched Codex host; codex modules and /modules
Runway Context telemetry, checkpoint state, and phase assessment Native module
Session history Bounded access to the indexed Codex session history Native module
Session state Bounded host-owned state snapshots and restore Native module
Context hooks Role hints at context and compaction boundaries Native module
Agent policy Checks native agent spawns against configured role policy Native module
Model route Proposes a configured model route for host validation Native module
Approval guard Vetoes configured tool approvals at host checkpoints Native module
Statusline Wraps statusline content to display configured indicators across multiple rows Native module
FastCtx Local file inspection, search, glob, and replacement through the official FastCtx MCP server FastCtx adapter; external MCP connection

runtime-native-modules/build-approved.sh defines the release allowlist for the manager and eight native feature modules. It produces a manifest containing the library name, SHA-256, and absolute source path for each artifact. Staging uses CODEX_APPROVED_MODULES_MANIFEST to verify and include those artifacts. FastCtx is an external tool connection in the same working tool layer; its adapter configures the official server and does not load a native library.

Local fixes and delivery work

Area Change Detail
Codex source Integrates the native manager with Core, CLI, TUI, session, and tool surfaces Source patch and patch migration
Restart handling Adds managed daemon recovery and restart checks runtime-control/ and its restart tests
Module updates Adds version selection, verification, rollback, and profile activation tooling Activation guide and update acceptance
Release integrity Pairs CLI and code mode host from one build record, checks staged hashes, and verifies packages before installation BUILD.md
Desktop integration Updates the desktop bridge and Codex manager/doctor helpers tools/desktop-bridge/, docs/codex-manager.md, and docs/codex-doctor.md
External file tools Adds the FastCtx connection and catalog probe FastCtx adapter

Build and repository map

Follow BUILD.md to build, stage, and package the paired CLI and code mode host. tools/build-codex-release retains immutable builds under dist/dev-builds/; staging and packaging verify their hashes. The alpha rebase runbook covers moving the source patch to another upstream release.

Path Contents
vendor/codex/ Pinned patched Codex source submodule
runtime-native-modules/ Manager release allowlist and native feature modules
runtime-module-spike/ Native ABI prototype and module update acceptance work
runtime-fastctx-adapter/ Official FastCtx MCP connection helper
runtime-control/ Release pin, complete source patch, restart sidecar, and checks
tools/ Build, staging, packaging, activation, doctor, and desktop helpers
docs/ Architecture, module, migration, and operations guides
patches/legacy/ Archived patch fragments; not an input to the current build

The complete source patch is regenerated after vendor edits settle. Archived patches under patches/legacy/ document earlier work and must not be applied on top of the current source patch.