---
title: "我使用 REA 克隆了 OpenAI 的 Codex"
url: "https://reamcp.dev/zh-cn/cases/i-used-rea-to-clone-openai-s-codex-925c9e"
source: "https://www.youtube.com/watch?v=pX8Sy8Rd44U"
source_type: "youtube"
author: "SoftsWeb"
author_handle: "softsweb"
stars: 0
category: "应用功能复现"
categories: ["app-recreation"]
tags: ["agentic-reverse-engineering", "cli", "codex", "ghidra", "open-source", "rea"]
added: "2026-10-16T02:16:00.497Z"
updated: "2026-10-15T10:19:44.000Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# 我使用 REA 克隆了 OpenAI 的 Codex

一个视频演示，作者只给 Claude Code 提供 OpenAI 开源 Codex 的已安装文件（无源代码），并让它用 Python 重建非交互式 CLI 引擎，使 REA 和 Ghidra 成为必需工具。得到的克隆通过了 416/422 个隐藏检查（98.6%），并附有测试工具包、REA 和 Codex 仓库链接。

## Description

作者展示了一个逆向工程工作流程：扫描已安装的 Codex 文件，让真实的 Codex 响应，定义隐藏测试，然后让 Claude Code 用 Python 重建程序，首先不使用、然后强制使用 REA 和 Ghidra。指出 Codex 是 Apache-2.0 开源软件，仅使用虚假 AI 服务器重现了非交互式 codex exec 模式，并且对 294 MB 二进制文件的完整 Ghidra 分析超时，因此仅用 REA 打开了一个切出的 15 MB 片段。提供了隐藏测试工具包仓库和 REA GitHub 项目的链接。

## Original README

I Used REA to Clone OpenAI's Codex

I gave Claude Code only the files that OpenAI's Codex installs on a computer, with no source code at all, and asked it to rebuild the program in Python while a hidden test I wrote beforehand decided if the copy was good enough. REA, the open source reverse engineering tool, is the one it was supposed to use.

The first copy scored 99% on my easy test and only 75.4% on a much harder one, so I made REA and Ghidra mandatory. The second copy passed 416 of 422 checks (98.6%) and the whole AI bill for both rounds was about $16.80. Everything on screen is replayed from the real logs and results.

0:00 Two terminals, one secret
1:08 The one rule that makes it fair
1:44 Step 1: what is inside the file
2:29 Step 2: making the real Codex talk
3:31 Step 3: the hidden test
4:12 Step 4: the first copy
4:50 Step 5: a much harder test
5:32 Step 6: Ghidra and REA get their turn
6:43 The verdict
7:40 What this really means

Links
Test kit from this video (the hidden test, the fake AI server and the AI's notes): https://github.com/softsweb/codex-clone-hidden-test-kit
REA on GitHub: https://github.com/morluto/rea
Codex on GitHub (open source, Apache-2.0): https://github.com/openai/codex

Notes and honesty
- Codex is open source (Apache-2.0), that is why I picked it. I did not do this to Cursor or Claude Code because their terms forbid it.
- I only copied Codex's non-interactive mode (codex exec). The copy has no screen and no model, it is only the engine, and I used a fake AI server so the test cost nothing.
- Not tested: the real sandbox (it does not start on my computer), the interactive screen, resume and review commands, and a real model.
- The full Ghidra analysis of the 294 MB program never finished (every call timed out after 330 seconds), so I show exactly which parts worked: a carved 15 MB piece of the file that REA could open.
- Remaining misses (6 checks of 422): the real program rejects a tiny image that the copy accepts, the copy does not count tokens used by a goal, it lacks the codex-path folder in PATH, and it does not print the applied patch.
- Only analyze software you are allowed to test. I am not a lawyer and this is not legal advice.
- This video is not sponsored.

#REA #Codex #ClaudeCode #ReverseEngineering #OpenSource
