by GhabiX
Open-source Codex distribution powered by Spine: subtask-tree context compilation for long-horizon coding at 32%-74% lower cost.
# Add to your Claude Code skills
git clone https://github.com/GhabiX/SpineCodexSpineCodex is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by GhabiX. Open-source Codex distribution powered by Spine: subtask-tree context compilation for long-horizon coding at 32%-74% lower cost. It has 154 GitHub stars.
SpineCodex's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/GhabiX/SpineCodex" and add it to your Claude Code skills directory (see the Installation section above).
SpineCodex is primarily written in Rust. It is open-source under GhabiX on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh SpineCodex against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Long-horizon software engineering naturally unfolds as nested subtasks, yet large language models consume a prefix-sensitive linear context. Flat history compaction loses subtask boundaries and triggers repeated file rereads, while spawning a child agent for every subtask adds heavy cross-session handoff and waiting overhead on sequential work.
SpineCodex places long-horizon execution under a persistent work tree (SpineTree)—acting as the structural spine from which subtasks branch out and fold back. The agent declares subtask boundaries as it reasons, keeping local sequential steps inline while delegating independent branches in parallel when needed. Before each model call, the Spine runtime compiles SpineTree into minimal effective context—replacing completed subtasks with their returned results while keeping unfinished parent context byte-for-byte intact for prefix-cache reuse.
Install globally and run directly—SpineCodex inherits your existing ~/.codex configuration, credentials, and skills out of the box:
npm install -g @spinejit/spine-codex@latest
spine-codex
v0.6.0 tracks OpenAI Codex 0.170.0./experimental in the TUI to enable Spinetree memory projection (exports closed-node memory under .codex/spinetree/ for inspection).Spine resolves the tension between nested work and linear context across three coordinated layers:
Open, Close, Next, Spawn). The compilation frontend maintains the persistent SpineTree so completed intermediate traces remain archived without cluttering active context.SpineTree decouples boundary management from subagent spawning—sequential subtasks open and close locally within the current session (Open / Close / Next), while independent tasks scale out in parallel via Spawn, returning results into the same tree.For formal definitions, compilation rules, and ablation studies, see the paper: Spine: Compiling Subtask Trees into Structured Context for Long-Horizon Coding Agents.
Evaluated across three long-horizon software engineering benchmarks (arXiv:2610.37224):
| Benchmark | Setting | SpineCodex vs. Baseline |
|---|---|---|
| SWE-Milestone | GPT-5.6 Sol (98 milestones) |
42.6% vs. 38.1% Score (+11.8%), 19 vs. 14 resolved, -45% avg. input tokens/req, -32.4% total cost vs. native Codex |
| SWE-Milestone | Grok 4.6 (98 milestones) |
40.4% vs. 35.5% Score (+13.8%), -37.9% total cost vs. native Codex |
| SWE-Milestone | Context-management baselines (GPT-5.6 Sol) |
-73.7% total cost vs. recursive subagent delegation (19 vs. 17 resolved); +14.8%–16.7% Score & -22.7%–58.1% cost vs. history compression/folding |
| ProgramBench | GPT-5.6 Sol / Grok 4.6 (50 tasks) |
73.35% vs. 62.55% (+17.3% rel.) avg. pass rate & 7/50 vs. 2/50 tasks ≥95% (GPT-5.6 Sol); +10.2% avg. pass rate & -13.3% cost (Grok 4.6) |
| FrontierSWE | 10 open-ended tasks (5 trials/task) | Improves Mean@5 on 8/10 tasks (GPT-5.6 Sol, -6.7% cost) and 6/10 tasks (Grok 4.6, -19.2% cost) |
0.170.0. Release notes0.164.0 with full GPT-6.1-Sol / GPT-6-Astra support, embedded app-server startup isolation, prompt-cache preservation in spawned children, and Spine lineage preservation across compacted sessions.0.153.4 and removes legacy 4096-item source-ledger and 1 MiB synthetic context-plan caps for ultra-long sessions.Open / Close / Next / Spawn primitives.Full release notes: GitHub Releases.
@spinejit/spine-codex).@spinejit/pi-spinejit) and DeepSeek Harness (@spinejit/dsh-spinejit), plus companion TUI extensions including @spinejit/pi-compact-tree.If you find Spine or SpineCodex useful in your research or engineering workflow, please cite our paper:
@misc{xiang2026spine,
title = {Spine: Compiling Subtask Trees into Structured Context for Long-Horizon Coding Agents},
author = {Jiahong Xiang and Kunqiu Chen and Lingming Zhang and Yuqun Zhang},
year = {2026},
eprint = {2610.37224},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/2610.37224}
}
SpineCodex is maintained by Jiahong Xiang and Kunqiu Chen under the Apache-2.0 License. Upstream OpenAI Codex and derived components retain their attribution in NOTICE. Bug reports and feature discussions are welcome in GitHub Issues.