Skip to content

yondifon/opencode-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-loop

Session-tied fixed-delay loops for OpenCode.

{
  "plugin": ["@malico/opencode-loop"]
}

For local testing before publish, copy the built plugin into OpenCode's global plugins directory:

make install-local

Or reference the built file directly in your config:

{
  "plugin": ["file:///Users/malico/tinkerbin/opencode-loop/dist/index.js"]
}

Usage:

/loop every 5 mins check this
/loop every 30 mins write the next article section --auto-compact
/loop remember every day to check this
/loop status
/loop cancel the current loops

Test locally with make check.

Intervals are fixed-delay. If a 5 minute loop takes 10 minutes to run, the next run starts 5 minutes after it finishes.

New loops queue their first iteration after OpenCode reports the current session idle. The run-specific [loop:evidence:<run_id>] marker is advisory; a finished turn completes the iteration. An explicit [loop:blocked] marker pauses the loop, while a response-inspection failure pauses it as unverified.

Add --auto-compact to compact the session after each completed iteration. Triggering loop_now during an active iteration queues one immediate follow-up run.

State is stored in ~/.config/opencode/loops/loops.db. Loops are tied to OpenCode session IDs.

OpenCode's own opencode.db is not used for plugin state because plugin APIs do not expose a stable extension table or migration hook. Loop rows store OpenCode sessionId so runs can still be linked back to OpenCode sessions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages