Repository navigation
Closed
Description
我在 macOS + Codex Desktop / Codex CLI 0.140.0-alpha.2 上尝试安装并运行 plugins/codex。整体思路可行,但当前 Codex 集成有一些明显边界和功能问题。
- Codex integration 仍强依赖 Claude 路径
当前 skillopt_sleep/config.py 默认使用:
~/.claude/projects
~/.claude/history.jsonl
~/.claude/skills
cycle.py 也默认写项目下的:
CLAUDE.md
这导致 plugins/codex 虽然文档说支持 Codex,但实际不会开箱即用地读取 Codex Desktop/CLI 的历史记录。我的 Codex 历史在:
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
~/.codex/history.jsonl
建议:增加真正的 Codex transcript adapter,识别 session_meta、turn_context、response_item.message、response_item.function_call 等结构,并把 Codex memory 目标改为项目级 AGENTS.md,skill 目标改为 ~/.codex/skills/.../SKILL.md。 - Codex skill 安装路径疑似不对
plugins/codex/install.sh 把 skill 安装到:
~/.agents/skills/skillopt-sleep/SKILL.md
但我当前 Codex Desktop 实际加载的是:
~/.codex/skills//SKILL.md
导致安装脚本可能显示成功,但 Codex Desktop 不一定能看到这个 skill。
建议:检测当前 Codex 版本支持的 skill path,至少同时支持 ~/.codex/skills,或在 README 中明确版本差异。 - 文档说 custom prompts 稳定,但 Codex 当前更偏 skills / plugins
plugins/codex/README.md 说使用 ~/.codex/prompts/.md 作为 /sleep。但当前 Codex 有 codex plugin 命令,也有 skills 机制;custom prompt 的长期稳定性需要再确认。
建议:提供一个正式 Codex plugin manifest,或明确说明这是“临时 prompt + skill 适配”,不是 Codex 原生插件包。 - run-sleep.sh 无法指定 Python 路径
我的系统 Python 是 3.9.6,但 Codex Desktop 自带 Python 3.12。原始 runner 只在 PATH 里找 python3.12/python3.11/python3.10/python3,无法通过环境变量直接指定。
建议:支持:
SKILLOPT_SLEEP_PYTHON=/path/to/python3
否则很多 macOS 用户会因为系统 Python 版本低而安装失败。 - 真实 Codex backend 运行成本和耗时不可控
我用:
--backend codex --max-tasks 1 --edit-budget 1
跑真实学习。一次成功 run 大约花了两分钟,并生成 accepted proposal;另一次 run 卡在 candidate memory validation 的 codex exec 子进程里,数分钟无输出,需要手动中断。
问题点:
每个 replay/judge/reflect 都 spawn codex exec
缺少实时进度日志
缺少 per-call timeout 的 CLI 参数
max_tokens_per_night 配置存在,但未看到真实强制预算控制
建议:增加 --max-tasks、--codex-timeout、--max-codex-calls、实时阶段日志,并真正执行 token/time budget。 - Accepted 后会 stage 未变化文档
我遇到一次 accepted memory edit,但 staging 同时生成了 proposed_SKILL.md。当 live skill 文件里已有测试残留/旧内容时,它会被一起 stage,哪怕本轮 accepted edit 只针对 memory。
建议:stage 前比较 result.new_skill != original_skill、result.new_memory != original_memory,只有实际变化的文件才写入 manifest。 - 测试或 mock run 容易污染真实用户状态
在本地测试过程中,测试用的 mock persona 规则曾写入真实:
~/.codex/skills/skillopt-sleep-learned/SKILL.md
~/.skillopt-sleep/state.json
这会导致后续真实 run 的 staged proposal 混入 mock 示例规则,例如:
Always wrap the final answer in ... tags.
Report arXiv ids in the exact form arXiv:XXXX.XXXXX.
建议:测试默认必须使用 isolated temp state_dir / agent_home,不应触碰真实 home;CLI demo 也应显式提醒 state 写入位置。 - Staging 文件命名仍是 proposed_CLAUDE.md
即使目标是 Codex 的 AGENTS.md,staging 里仍写:
proposed_CLAUDE.md
这会让用户误解它要改 Claude 配置。
建议:根据 platform/memory filename 生成:
proposed_AGENTS.md
proposed_CLAUDE.md
或统一叫 proposed_memory.md。 - Secret redaction 配置存在但实现不明显
config.py 有:
"redact_secrets": True
但我没有看到 harvest 阶段对 Codex/Claude transcript 做明确 secret redaction。由于历史会话可能包含 API key、路径、私有代码、业务信息,这个边界很重要。
建议:在 harvest 后、LLM miner 前做强制 redaction,并在 report 里说明 redaction 是否启用。 - lookback_hours 似乎没有实际参与 harvest
配置里有:
lookback_hours: 72
但当前 cycle 主要依赖 state.last_harvest_for(project);首次运行时没有看到按 lookback window 限制历史读取。
建议:首次运行也应按 lookback_hours 限制,避免第一次就扫描大量历史并触发大量 LLM mining。 - README 中“Codex 支持的路径”与现实有偏差
README 写 Codex skills 在:
~/.agents/skills//SKILL.md
但我的 Codex Desktop 环境中可见 skills 是:
~/.codex/skills
建议更新 README,并注明 Codex Desktop、CLI、旧版/新版路径差异。 - 缺少清晰的“不会随 Codex 启动自动运行”的说明
用户容易误以为安装后会后台自动学习、同步启动、持续消耗 token。实际不是,只有手动 run --backend codex 才会消耗。
建议在 README 明确写:
Installation does not start a daemon.
No learning happens on Codex startup.
Only /sleep run or skillopt_sleep run triggers replay and model calls.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Yif-Yang commentedon Jun 17, 2026
Thanks for the detailed feedback! Several of the issues you raised have been addressed in recent PRs:
✅ Resolved: Codex transcript support
PR #48 added
--source codexto harvest directly from Codex Desktop's~/.codex/archived_sessions/*.jsonl:The new
harvest_codex.pymodule correctly parses Codex'ssession_meta,response_item.message, and related structures, while filtering out tool arguments, raw tool outputs, and sensitive content.✅ Resolved: Codex skill-first
PR #49 migrated the Codex integration from the deprecated custom prompt to a
SKILL.md-based entrypoint. The/sleepslash command is no longer used — the skill is the sole entrypoint.🔜 To be improved: default paths and adoption target
Your point about
cycle.pydefaulting toCLAUDE.mdinstead ofAGENTS.md, and the skill target path issue, are valid and will be addressed in a follow-up update.Thanks for testing and reporting!
fix: add SKILLOPT_SLEEP_PYTHON override + lookback_hours first-run fa…
Yif-Yang commentedon Jun 20, 2026
Hi, following up — several more points from your feedback have now been addressed:
✅ Newly fixed (PR #74)
run-sleep.shnow supportsSKILLOPT_SLEEP_PYTHON=/path/to/python3.12to explicitly set the interpreter. This solves the macOS system Python 3.9 issue.lookback_hoursconfig (default 72h) as a time cutoff, so it won't scan your entire transcript history and trigger massive LLM mining. Use--lookback-hours 0to explicitly opt out and scan everything.✅ Previously fixed (PRs #48, #49, #60, #72, #73)
--source codexreads Codex Desktop transcripts ✅--max-tasks,--max-sessions,--progress, per-call timeout all added ✅harvest_codex.py✅🔜 Remaining (lower priority, planned for follow-up)
~/.agents/skillsvs~/.codex/skills): Codex Desktop is still in alpha and the skill path may change — we'll update once it stabilizes.proposed_CLAUDE.mdnaming): Planned to make platform-aware (proposed_AGENTS.mdfor Codex).Thanks again for the thorough feedback — it's been very helpful!
Yif-Yang commentedon Sep 30, 2026
A concrete follow-up on point 6: #277 has now merged after official CI passed. Accepted cycles stage only skill/memory documents whose text actually changed. The regression covers skill-only, memory-only, both/neither changed, and whitespace-only changes, including manifest flags and artifact presence.
This update concerns unchanged-document staging only. It does not reopen this issue or claim that every historical integration concern is resolved.