Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Repository files navigation

Task Continuation Plugin

Minimal task continuation plugin for OpenCode - automatically continues sessions when incomplete tasks remain.

Overview

This plugin provides task continuation functionality:

  1. Task Continuation: Automatically continues sessions when incomplete todos remain

Perfect for:

  • Multi-step task execution with automatic continuation
  • Long-running agent workflows
  • Preventing premature session termination
  • Ensuring all tasks in a todo list are completed

Installation

npm install @frugally3683/agent-loop-plugin

Usage

importagentLoopPluginfrom"@frugally3683/agent-loop-plugin"exportdefaultagentLoopPlugin

Configuration

The plugin can be configured with the following options:

{countdownSeconds: 2,// Seconds to wait before auto-continuationerrorCooldownMs: 3000,// Cooldown period after errorstoastDurationMs: 900,// Toast notification durationagent: "custom-agent",// Agent name for continuation promptsmodel: "custom-model",// Model name for continuation promptslogFilePath: "path/to/log",// Path to log file for debugging}

Features

  • Automatic Continuation: Sessions automatically continue when incomplete tasks remain
  • User Message Handling: Cancels pending continuations when users send new messages
  • Error Handling: Graceful handling of session errors with cooldown periods
  • Recovery Support: Sessions can be marked as recovering to pause auto-continuation

API

Plugin Export

import{agentLoopPlugin,createTaskContinuation}from"@frugally3683/agent-loop-plugin"

Task Continuation API

constcontinuation=createTaskContinuation(input,options)continuation.handler({ event })// Handle session eventscontinuation.cleanup()// Cleanup resourcescontinuation.scheduleContinuation(sessionID)// Manually schedule continuationcontinuation.markRecovering(sessionID)// Mark session as recoveringcontinuation.markRecoveryComplete(sessionID)// Mark recovery as completecontinuation.cancel(sessionID)// Cancel pending continuation

License

MIT

About

Agent Loop Plugin for OpenCode - Task continuation and iteration loops

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages