Skip to content

feat(opencode): add session loop command - #23575

Closed
vipuljaverioutreach wants to merge 2 commits into
anomalyco:devfrom
vipuljaverioutreach:feat/loop-command
Closed

vipuljaverioutreach wants to merge 2 commits into
anomalyco:devfrom
vipuljaverioutreach:feat/loop-command

Conversation

@vipuljaverioutreach

@vipuljaverioutreach vipuljaverioutreach commented Apr 20, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #23578

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This adds a built-in /loop command and /proactive alias in packages/opencode.

The command runs an immediate loop step, then continues either on a timer like /loop 5m ... or in self-paced mode when the assistant ends with a continue marker. It also supports /loop stop, uses .claude/loop.md when no prompt is provided, and removes loop control markers from assistant text before it is shown in the session.

I kept the change inside the existing command/session flow so it reuses the current prompt runtime instead of adding frontend-only scheduling or separate persistence.

How did you verify your code works?

  • Ran bun test test/session/prompt.test.ts in packages/opencode
  • Ran bun test test/session/prompt-effect.test.ts in packages/opencode
  • Ran bun run typecheck in packages/opencode
  • Ran bun run build in packages/opencode
  • Pushing the branch also passed the repo pre-push hook, which ran bun turbo typecheck

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@vipuljaverioutreach
vipuljaverioutreach marked this pull request as ready for review April 20, 2026 16:06
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
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.

[FEATURE]: Add /loop command for automated iterative task execution

2 participants