strategy: session #0123 -- 3 tasks from v2 strategy analysis#242
strategy: session #0123 -- 3 tasks from v2 strategy analysis#242
Conversation
…y report Tasks created from analysis of sessions #107-#122 and 7 human-filed issues: - #241 (urgent): fix worktree cleanup -- .claude/worktrees/agent-* leaking - #242 (urgent): add sessions_since_eval signal + brain eval cadence rule - #243 (normal): run nightshift against Phractal immediately (eval #17) Root causes identified: eval loop broken (14 sessions stale), worktree leak confirmed live, Phractal E2E never runs in daemon cadence.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f307eb09a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| In `nightshift/core/signals.py` or equivalent, add a `sessions_since_eval` signal that: | ||
| 1. Reads the latest eval file from `.recursive/evaluations/` (highest-numbered `NNNN.md`) | ||
| 2. Reads the current session count from `.recursive/sessions/index.md` | ||
| 3. Returns `sessions_since_eval = current_session - eval_session_number` |
There was a problem hiding this comment.
Compute eval staleness from session IDs, not eval file IDs
The task defines sessions_since_eval = current_session - eval_session_number, but the preceding text says eval #0016 happened in session #0108, so subtracting the eval file number (16) from the session count (123) would produce 107 instead of 14. That will make the staleness signal permanently inflated and force unnecessary eval delegations. The calculation needs to use the session ID associated with the latest eval run (e.g., parsed from eval metadata) rather than the evaluation document sequence number.
Useful? React with 👍 / 👎.
| status: pending | ||
| priority: normal | ||
| target: v0.0.8 | ||
| vision_section: self-maintaining | ||
| created: 2026-04-09 |
There was a problem hiding this comment.
Tag external eval run as integration task
This task requires cloning and testing against https://github.com/fazxes/Phractal (external network/resource dependency), but the frontmatter leaves environment unset, so it defaults to internal. The build operator explicitly skips only tasks tagged environment: integration, so this item can be auto-selected in environments where external access is unavailable and repeatedly fail/block the queue. Add environment: integration (or split into internal subtasks) so scheduler behavior matches the task's dependency profile.
Useful? React with 👍 / 👎.
- Add `sessions_since_eval()` to signals.py: reads the latest eval file from .recursive/evaluations/, extracts its date/mtime, then counts session index rows after that timestamp. Returns a scalar int. - Surface the signal prominently in the dashboard Health section next to Eval score, with STALE annotation when >= 5 sessions. - Add alert in the Alerts section when sessions_since_eval >= 5, pointing the brain to delegate a Phractal eval run. - Add eval cadence rule to brain.md Delegation Protocol: when eval_staleness alert fires, brain SHOULD include eval run as a delegation. - Add 8 unit tests in test_signals.py and 6 in test_dashboard.py covering all branches of the new signal and alert logic. - All 1156 tests pass (make check green). Closes task #242.
Summary
First strategy session in the v2 brain era (sessions #107-#122, 16 delegations). Analyzed the 7 human-filed GitHub issues and produced 3 high-priority tasks.
.claude/worktrees/agent-*leaking after every session (live: this session's cwd confirms it)sessions_since_evalsignal + brain rule to enforce eval rerun every 5 sessions. Eval is 14 sessions stale.Root Cause Analysis
The 7 human issues share 3 root causes:
Test plan
bash .recursive/scripts/validate-tasks.sh