Skip to content

feat(loop): fixed tasks run on creation, user-level loop.md, /proactive alias (0.8.0) - #24

Merged
jkrandom-sudo merged 1 commit into
mainfrom
feat/run-now-0.8.0
Aug 5, 2026
Merged

feat(loop): fixed tasks run on creation, user-level loop.md, /proactive alias (0.8.0)#24
jkrandom-sudo merged 1 commit into
mainfrom
feat/run-now-0.8.0

Conversation

@jkrandom-sudo

Copy link
Copy Markdown
Owner

Summary

Implements the v0.8.0 stage of the Claude Code alignment report:

  • Fixed tasks run immediately on creation (was 🔴 missing): recurring fixed tasks execute in the creation turn via a first-run prompt (schedule confirmation + task execution), with the next fire anchored to creation time. --once tasks become due immediately so the ticker fires them within one tick and auto-cancels.
  • User-level ~/.opencode/loop.md (was 🔴 doc/code mismatch): bare /loop now falls back to the user-level file when the project has none (priority: project > user > built-in default), matching the README's promise.
  • /proactive alias (Claude Code parity): bundled commands/proactive.md, the command hook accepts both names, and the run-mode chat.message fallback intercepts /proactive ... too.

Test plan

  • npm test — 182/182 (new run-now, once-immediate, user-level loop.md, alias tests; existing fire-cycle tests updated for run-now semantics)
  • Real opencode serve E2E:
    • /loop 10m … — assistant confirmed schedule AND executed the task in the same turn
    • /loop 10s --once … — creation confirmation, fired within ~5s, auto-cancelled
    • /proactive 10m … — task created and executed immediately
    • bare /loop with only ~/.opencode/loop.md present — maintenance task created from the user-level file

🤖 Generated with Claude Code

…ve alias (0.8.0)

Claude Code alignment (v0.8.0 stage of the alignment report):

- Fixed recurring tasks now execute immediately in the creation turn
  (Claude Code behavior) via a first-run prompt that confirms the
  schedule and performs the task; the next fire is anchored to creation
  time, keeping wall-clock semantics. One-shot (--once) tasks become
  due immediately instead, so the ticker fires them within one tick and
  auto-cancels.
- Bare /loop now also reads the user-level ~/.opencode/loop.md when the
  project has none (priority: project > user > built-in default) —
  README already promised this but the code only checked the project.
- /proactive is a full alias of /loop: bundled commands/proactive.md,
  the command hook accepts both names, and the run-mode chat.message
  fallback intercepts "/proactive ..." too.

182/182 tests pass. Verified against a real opencode serve: recurring
fixed executed in the creation turn, once fired within seconds and
auto-cancelled, /proactive created and ran its task, and bare /loop
picked up ~/.opencode/loop.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jkrandom-sudo
jkrandom-sudo merged commit 7756e54 into main Aug 5, 2026
3 checks passed
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.

1 participant