{"id":50591507,"url":"https://github.com/lzt11319/codex-afterglow","last_synced_at":"2026-06-05T11:00:13.691Z","repository":{"id":362490280,"uuid":"1259150308","full_name":"lzt11319/codex-afterglow","owner":"lzt11319","description":"Compact-aware TUI rendering companion for Codex CLI long sessions.","archived":false,"fork":false,"pushed_at":"2026-06-04T13:21:48.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-04T13:23:54.152Z","etag":null,"topics":["cli","codex-cli","performance","rust","terminal","tui"],"latest_commit_sha":null,"homepage":"https://github.com/lzt11319/codex-afterglow#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lzt11319.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T08:33:52.000Z","updated_at":"2026-06-04T13:22:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lzt11319/codex-afterglow","commit_stats":null,"previous_names":["lzt11319/codex-afterglow"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lzt11319/codex-afterglow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzt11319%2Fcodex-afterglow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzt11319%2Fcodex-afterglow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzt11319%2Fcodex-afterglow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzt11319%2Fcodex-afterglow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lzt11319","download_url":"https://codeload.github.com/lzt11319/codex-afterglow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzt11319%2Fcodex-afterglow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33939226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","codex-cli","performance","rust","terminal","tui"],"created_at":"2026-06-05T11:00:12.487Z","updated_at":"2026-06-05T11:00:13.627Z","avatar_url":"https://github.com/lzt11319.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex Afterglow\n\nCodex Afterglow fixes a specific Codex CLI pain point: after a long session is compacted, the model context can shrink while the terminal still feels slow because the TUI keeps rendering old transcript history.\n\nAfterglow is a binary-first companion patch for Codex CLI. It installs a compact-aware TUI renderer that folds pre-compaction transcript history, preserves the last pre-compaction turn and all post-compaction content, and keeps a config fallback for full-history rendering.\n\n\u003e Status: public alpha. The repository is public and the first binary release is published. Upstream OpenAI Codex issue/PR posting remains maintainer-gated and should not happen without final confirmation.\n\nCodex Afterglow is not an official OpenAI project. It is a companion workaround and proof-of-concept while the preferred long-term fix remains an upstream Codex TUI change.\n\n## Easy Start\n\nThe easiest install path is to copy this prompt into a capable local coding agent:\n\n```text\nPlease inspect https://github.com/lzt11319/codex-afterglow and install Codex Afterglow using the Binary release path. Prefer the published release binary and release manifest; do not use source-build unless no compatible binary release exists. First run dry-run/verification only and report my Codex install target, platform, version/commit if available, downloaded binary checksum, planned backup path, and exact rollback command. Do not read, copy, hash, or modify my real auth/config files. Do not modify npm/bun wrappers or local Codex wrapper chains. Only run the final --install replacement after all gates pass and I explicitly confirm.\n```\n\nWhy this prompt is the recommended route: replacing a coding-agent binary is high trust. A local Agent can inspect your actual package layout, verify release checksums, confirm rollback, and stop if your Codex install is unsupported.\n\n## Binary install path\n\nAfter a binary release is published, the binary path is:\n\n1. Clone or inspect this repository.\n2. Run the installer in dry-run mode.\n3. Verify the target binary, release manifest, SHA256, backup plan, and rollback command.\n4. Run `--install` only after explicit user confirmation.\n\nExample dry-run command, assuming a release named `afterglow-v0.1.0-alpha.0` exists:\n\n```powershell\ngit clone https://github.com/lzt11319/codex-afterglow\nSet-Location -LiteralPath '.\\codex-afterglow'\nnode install/install.mjs --dry-run --json `\n  --manifest \"https://github.com/lzt11319/codex-afterglow/releases/download/afterglow-v0.1.0-alpha.0/afterglow.release.json\" `\n  --asset-base-url \"https://github.com/lzt11319/codex-afterglow/releases/download/afterglow-v0.1.0-alpha.0/\"\n```\n\nIf dry-run succeeds and the user explicitly confirms replacement:\n\n```powershell\nnode install/install.mjs --install --json `\n  --manifest \"https://github.com/lzt11319/codex-afterglow/releases/download/afterglow-v0.1.0-alpha.0/afterglow.release.json\" `\n  --asset-base-url \"https://github.com/lzt11319/codex-afterglow/releases/download/afterglow-v0.1.0-alpha.0/\"\n```\n\nThe installer prints a rollback command. Save it before restarting Codex.\n\n## What this project provides\n\n- Binary-first releases for official npm/bun-managed `@openai/codex` native targets.\n- A default-safe installer: no-argument/help and dry-run first; real replacement requires explicit `--install`.\n- Backup and rollback for the current official Codex vendor binary.\n- Release manifest and SHA256 verification before replacement.\n- Source patch metadata and source-build instructions for users who prefer auditing over speed.\n- Upstream issue/PR drafts focused on native Codex TUI behavior rather than installer mechanics.\n\n## Safety summary\n\n- Does not read, copy, hash, upload, or modify real Codex auth/config contents.\n- Does not replace npm/bun wrappers or local Glow Mirror/wrapper chains by default.\n- Refuses unknown install styles unless the user provides `--codex-binary \u003cpath\u003e`.\n- Creates a backup before replacement and prints a rollback command.\n- Published binaries are unofficial and not endorsed by OpenAI; upstream issue/PR posting remains a separate maintainer-gated step.\n\nSee [SAFETY.md](SAFETY.md), [SECURITY.md](SECURITY.md), [docs/installer.md](docs/installer.md), and [docs/rollback.md](docs/rollback.md).\n\n## Why compaction alone does not solve this\n\nThe offline diagnosis behind this project found:\n\n- Model history replacement after compaction works: old raw transcript does not keep linearly entering the model prompt.\n- TUI transcript history is separate from model history: old UI cells can still be retained and reflowed after compaction.\n- History insert and pre-wrap paths can produce bursty terminal writes proportional to historical lines and wrapped rows.\n\nAfterglow targets the TUI layer: when compaction succeeds, the renderer folds pre-compaction UI history into a lightweight marker while keeping the last pre-compaction turn plus all post-compaction content visible. Full rendering can be restored by config.\n\n## Compatibility\n\nV1 targets official npm/bun-managed `@openai/codex` packages for these target triples:\n\n- `x86_64-unknown-linux-musl`\n- `aarch64-unknown-linux-musl`\n- `x86_64-apple-darwin`\n- `aarch64-apple-darwin`\n- `x86_64-pc-windows-msvc`\n- `aarch64-pc-windows-msvc`\n\nCompatibility is evidence-gated, not promised for every future Codex release. Exact supported target is `rust-v0.136.0` / `7ca611348db9446711ed16ed81c84095e3721cee`; newer Codex versions require anchor checks and offline effectiveness evidence before being treated as drift-compatible.\n\nOther install methods are advanced mode only and require an explicit `--codex-binary \u003cpath\u003e`.\n\n## Full-history fallback\n\nIf the upstream-compatible patch is installed but you want the old full transcript rendering behavior:\n\n```toml\n[tui]\ncompact_aware_rendering = false\n```\n\nRestart Codex after changing the config.\n\n## Repository layout\n\n| Path | Purpose |\n| --- | --- |\n| `install/` | Installer entrypoints. |\n| `lib/` | Shared manifest, target, compatibility, and installer logic. |\n| `manifest/` | Release/source manifest schema and examples. |\n| `patches/` | Imported compact-aware TUI patch metadata. |\n| `docs/` | Safety, compatibility, source-build, release, rollback, and design docs. |\n| `evidence/` | Repo-relative diagnosis evidence for upstream drafts. |\n| `integrations/` | Local integration snippets, including `upgrade-codex-omx`. |\n| `upstream/` | Draft issue/PR materials for OpenAI Codex. |\n| `fixtures/` | Disposable package fixtures for installer tests. |\n| `tests/` | Fixture-based test harness. |\n| `.github/workflows/` | Manual draft-first binary release workflow. |\n\n## Development and verification\n\n```powershell\nnpm test\nnode scripts/verify-source.mjs --manifest-only --json\nnode scripts/afterglow-status.mjs --json\n```\n\nThese tests use fixtures and local metadata. They do not call real OpenAI APIs and do not read real auth/config contents.\n\nFor release/source evidence, run `verify-source` with an isolated OpenAI Codex checkout so source anchors are actually checked:\n\n```powershell\nnode scripts/verify-source.mjs --repo-root '\u003cisolated-openai-codex-source-root\u003e' --json\n```\n\n## Relation to upstream Codex\n\nThis companion repository is a workaround/proof-of-concept. The preferred long-term solution is an upstream Codex TUI change. See [docs/upstream.md](docs/upstream.md), [upstream/issue-draft.md](upstream/issue-draft.md), and [upstream/pr-plan.md](upstream/pr-plan.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzt11319%2Fcodex-afterglow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flzt11319%2Fcodex-afterglow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzt11319%2Fcodex-afterglow/lists"}