{
  "schema_version": 1,
  "as_of": "2026-11-15",
  "index": "/agent-harness-guide.html#codex-prompt-appendix",
  "note": "Original user note is retained byte-for-byte. A–F are full official templates from the note's fixed source commit, rather than re-extracted from the note. V2 comparison templates use the later fixed implementation commit. Markdown source bytes are served as .txt for direct reading. Source inspection and page validation are not a Codex runtime or performance reproduction.",
  "source_versions": {
    "user_note_source": {
      "repository": "openai/codex",
      "commit": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "committed_at": "2026-10-11T23:44:43Z"
    },
    "implementation_comparison": {
      "repository": "openai/codex",
      "commit": "c2c1ebba0a7985ebee065c5492233a843b84c4c6",
      "committed_at": "2026-11-14T02:55:41Z"
    },
    "pruning_attribution": {
      "repository": "anomalyco/opencode",
      "commit": "fc7e4cf93e660ad5ddabb0c48ecc99e934ebfe95",
      "url": "https://github.com/anomalyco/opencode/blob/fc7e4cf93e660ad5ddabb0c48ecc99e934ebfe95/packages/opencode/src/session/compaction.ts",
      "note": "PRUNE_PROTECT 40,000, PRUNE_MINIMUM 20,000 and skill protection belong to this OpenCode implementation. No OpenCode source file is republished in this archive."
    }
  },
  "sources": [
    {
      "id": "user-notes",
      "title": "用户提供的 Codex memory 机制笔记与完整附录",
      "kind": "user_provided_note",
      "original_filename": "468ad45bcceca2454c48f7715db86a4b_5890332052530390841_m.md",
      "local_asset": "/assets/research/codex-memory-20261115/user-notes-original.txt",
      "bytes": 115585,
      "sha256": "29718f9ab57eba9f7410f260059a6997414fdee5a7c6e33ee1d2e5538e9e40bd",
      "license": "User-provided material; no blanket third-party license inferred.",
      "preservation": "No byte changes; extension changed from .md to .txt.",
      "note": "Original statements remain in the archive. Attribution, version, budget and template distinctions are corrected in the integrated article."
    },
    {
      "id": "A",
      "title": "Context checkpoint compaction prompt",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/prompts/templates/compact/prompt.md",
      "local_asset": "/assets/research/codex-memory-20261115/compaction-prompt.txt",
      "bytes": 426,
      "sha256": "ab0c334d4faca17e3afbb9b16967c1b2fdcc7242a9a0880af57949fa236d6d07",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "B",
      "title": "Memory Phase 1 system template, V1",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/memories/write/templates/memories/stage_one_system.md",
      "local_asset": "/assets/research/codex-memory-20261115/phase1-system-v1.txt",
      "bytes": 30449,
      "sha256": "cf795e8a2f5f52d333af2613bf1ff79178112f5fd2161cc181a8ddf52e59da33",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "C",
      "title": "Memory Phase 1 input template, V1",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/memories/write/templates/memories/stage_one_input.md",
      "local_asset": "/assets/research/codex-memory-20261115/phase1-input.txt",
      "bytes": 401,
      "sha256": "2e54c74909238022305c269c862910bb29509fda8b58ce671ef011f8d6453047",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "D",
      "title": "Memory Phase 2 consolidation template, V1",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/memories/write/templates/memories/consolidation.md",
      "local_asset": "/assets/research/codex-memory-20261115/phase2-consolidation-v1.txt",
      "bytes": 51237,
      "sha256": "1450e24f84c03375aa5114c6c0857f515395129dcc00f65263221d03866852a0",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes; the user's rendered appendix has formatting differences and is separately preserved."
    },
    {
      "id": "E",
      "title": "Memory read-path template, V1",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/ext/memories/templates/memories/read_path.md",
      "local_asset": "/assets/research/codex-memory-20261115/memory-read-v1.txt",
      "bytes": 6593,
      "sha256": "2bc7736029884b714860a6f0d6b2fd26598bba58f2213b787f01fe2a491f4326",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "F",
      "title": "Ad-hoc memory notes instructions",
      "kind": "official_source_template",
      "version": "a9b0815167c27ab13719dd12d13b63e02b70d221",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/codex-rs/memories/write/templates/extensions/ad_hoc/instructions.md",
      "local_asset": "/assets/research/codex-memory-20261115/ad-hoc-instructions.txt",
      "bytes": 733,
      "sha256": "d36a36083d92f9d44efbd95e0e4b6e81d7d149e812f2bca2009b6dd4b8aa93e7",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "D-v2",
      "title": "Memory Phase 2 consolidation template, V2",
      "kind": "official_source_template",
      "version": "c2c1ebba0a7985ebee065c5492233a843b84c4c6",
      "url": "https://github.com/openai/codex/blob/c2c1ebba0a7985ebee065c5492233a843b84c4c6/codex-rs/memories/write/templates/memories/consolidation_v2.md",
      "local_asset": "/assets/research/codex-memory-20261115/phase2-consolidation-v2.txt",
      "bytes": 3128,
      "sha256": "7334fdb4aa5d958bcff54568a375d0b0145c19a611a1a22faa6bf251a46a5f0e",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "E-v2",
      "title": "Memory read-path template, V2",
      "kind": "official_source_template",
      "version": "c2c1ebba0a7985ebee065c5492233a843b84c4c6",
      "url": "https://github.com/openai/codex/blob/c2c1ebba0a7985ebee065c5492233a843b84c4c6/codex-rs/ext/memories/templates/memories/read_path_v2.md",
      "local_asset": "/assets/research/codex-memory-20261115/memory-read-v2.txt",
      "bytes": 2099,
      "sha256": "2f81fa2e89f341a1b7b3cf11ee7b855087c4ab84ddad920980475465ef28ff27",
      "license": "Apache-2.0",
      "copyright": "OpenAI",
      "preservation": "Exact official source bytes."
    },
    {
      "id": "license",
      "title": "OpenAI Codex Apache-2.0 license",
      "kind": "license",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/LICENSE",
      "local_asset": "/assets/research/codex-memory-20261115/LICENSE-openai.txt",
      "bytes": 10926,
      "sha256": "d17f227e4df5da1600391338865ce0f3055211760a36688f816941d58232d8dc"
    },
    {
      "id": "notice",
      "title": "OpenAI Codex NOTICE",
      "kind": "notice",
      "url": "https://github.com/openai/codex/blob/a9b0815167c27ab13719dd12d13b63e02b70d221/NOTICE",
      "local_asset": "/assets/research/codex-memory-20261115/NOTICE-openai.txt",
      "bytes": 242,
      "sha256": "9d71575ecfd9a843fc1677b0efb08053c6ba9fd686a0de1a6f5382fd3c220915"
    }
  ]
}
