Repository navigation
CoCode v0.3.0
Pre-release
Pre-release
v0.3.0 — 内嵌 Cox、修复 Codex 登录、App 内一键登录 Codex
新功能
- 内嵌服务换成 Cox:原来的 T3 Code 换成 Cox(端口仍是 3773)。旧版 T3 会提示一键升级;原有的线程、登录状态和环境 ID 都保留,
~/.t3会自动改名为~/.cox。 - App 内一键登录 Codex:在首页「编码代理」的 Codex 那一行点「登录」,App 会显示登录网址和一次性验证码(15 分钟内有效,可复制)。在浏览器里用 ChatGPT 登录并输入验证码后,App 会自动确认登录成功,不需要打开终端。也可以改用 OpenAI API Key 登录;Key 直接交给 Codex 保存,App 不会留存。
修复
- 开启共享目录后 Codex 无法登录(
Function not implemented (os error 38)):Android 公共存储不支持 Codex 依赖的flock文件锁。现在 Codex 的登录凭据、会话、历史和锁文件始终放在 App 私有的~/.codex里。 - 取消 Codex 登录时,会完整结束对应进程,不影响正在运行的服务。
共享目录变化
CoCode/codex/现在只对应~/.codex-shared,只放 Codex 的配置:config.toml、AGENTS.md、AGENTS.override.md、skills/、rules/、prompts/。私有~/.codex里对应的这几项改成链接,Codex 修改配置时会写回公共目录。- 从 v0.2.0 的整目录映射升级时,公共目录里的 Codex 会话、历史和凭据会复制回私有目录(不覆盖已有内容)。公共目录里的旧副本不会删除,但之后不再使用,建议手动删除。
- 关闭共享时,Codex 配置会恢复成开启前的私有副本。
- Claude Code 仍是整个目录共享,包括登录凭据和会话;风险提示不变。
验证范围
- 572 项 JVM 测试、61 项 Python 测试通过。
- Android 12 / ARM64 redroid 容器:21 项设备测试全部通过,零跳过,包括 Codex 私有目录加锁、配置写回公共目录、迁移中断恢复,以及登录界面和共享存储界面。
- 在同一台 redroid 上用真实的 Codex 0.166.0 走了一遍:点「登录」后显示真实的网址、验证码和倒计时,取消后只结束登录进程、服务继续运行;用测试用的 API Key 登录后显示「已登录」,Key 没有出现在 logcat 和 App 日志里;测试结束后已退出登录。
- 本次没有用真实 ChatGPT 账号走完设备码登录;不是实体手机或厂商后台策略验证。
English
- The embedded server is now Cox (port 3773). Legacy T3 Code installs are offered a one-tap upgrade that keeps threads, sign-in and the environment id;
~/.t3is renamed to~/.cox. - One-tap Codex sign-in from the Home card: CoCode runs
codex login --device-auth, shows the sign-in link and one-time code with a countdown, and finishes automatically. An OpenAI API key can be used instead; it is passed to Codex over stdin and never kept by the app. - Fix Codex sign-in with shared storage on (
os error 38): Android shared storage does not implementflock, so~/.codex(credentials, sessions, history, locks) always stays app-private.CoCode/codex/now maps to~/.codex-sharedand holds only config (config.toml,AGENTS.md,AGENTS.override.md,skills/,rules/,prompts/), linked from~/.codex. Upgrading from v0.2.0 copies public Codex sessions and credentials back to private storage without deleting the public copies, which are no longer used. Claude Code is still shared in full. - Cancelling a Codex sign-in stops only that command; the running server is untouched.
Validation: 572 JVM tests and 61 Python tests passed. On Android 12 / ARM64 redroid, 21 device tests passed without skips, and real Codex 0.166.0 device-code prompt, cancel and API-key sign-in (with a test key, signed out afterwards) were exercised on a development build. A full ChatGPT device-code sign-in, physical phones and vendor background policies remain unverified.