Skip to content

Add reviewed task-file flow for Codex sleep runs#60

Open
Kirchberg wants to merge 1 commit into
microsoft:mainfrom
Kirchberg:codex/reviewed-task-files-cwd
Open

Add reviewed task-file flow for Codex sleep runs#60
Kirchberg wants to merge 1 commit into
microsoft:mainfrom
Kirchberg:codex/reviewed-task-files-cwd

Conversation

@Kirchberg

@Kirchberg Kirchberg commented Jun 15, 2026

Copy link
Copy Markdown

Summary

PR adds a safer Codex-oriented SkillOpt-Sleep workflow for optimizing repo-scoped skills

  • Adds a reviewed task-file flow so Codex-backed runs can replay explicitly reviewed tasks instead of mining raw archived sessions at run time
  • Adds --target-skill-path support to focus harvesting, mining, staging, and adoption on a specific repo skill.
  • Runs Codex CLI backend calls from the target project directory using codex exec -C <project> and cwd=<project>
  • Adds bounded-run controls and diagnostics, including --max-sessions, --max-tasks, --progress, rejected edit reporting, and no-edits reasons
  • Documents the Codex reviewed-task workflow for bounded and privacy-sensitive runs

Testing

  • git diff --check
  • python3 -m unittest tests.test_sleep_engine -v

@Kirchberg

Copy link
Copy Markdown
Author

The main change is moving from “mine raw archives and run immediately” to a reviewed task-file flow: export candidate tasks, inspect/redact them, mark them as reviewed, and only then run the real backend. It also lets users target a specific repo skill with --target-skill-path, runs Codex from the correct project directory, and adds bounded-run/progress diagnostics so runs are easier to control and debug

In practice, this turns SkillOpt into a scoped proposal generator for Codex skills rather than an opaque run over the full session archive

@Yif-Yang

Copy link
Copy Markdown
Contributor

Review feedback

The code is clean and purely additive (802 additions, well-tested, no deletions of existing features) ✅

However, rebase is needed. Two conflicts:

  1. skillopt_sleep/cycle.py (Medium) — Your PR calls consolidate() directly, but main now uses dream_consolidate() (from the merged experience-replay/dream feature). You'll need to integrate your _progress() calls with the new dream_consolidate() API (history_tasks, recall_k, dream_rollouts, dream_factor).

  2. docs/sleep/CONTROLLABLE_DREAMING.md (Easy) — This file was deleted from main (content moved to the guide). Move your new task-file usage examples to the appropriate docs location.

Once rebased, this is ready to merge. The task-file flow, target-skill filtering, and progress logging are solid additions.

@Kirchberg Kirchberg force-pushed the codex/reviewed-task-files-cwd branch from e38d267 to 5ff3f24 Compare June 17, 2026 19:39
@Kirchberg

Kirchberg commented Jun 17, 2026

Copy link
Copy Markdown
Author

@Yif-Yang Made rebase & fixed conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants