The npm and V2 entrypoints use the official @opencode/plugin Plugin.define() contract. The installer now registers the exact @bybrawe/opencode-loop package in OpenCode's plural plugins configuration instead of copying a loose global plugin directory. OpenCode therefore resolves @opencode/plugin from Loop's own production dependency graph; explicit --legacy-v1 remains a separate compatibility path.
The installer defaults to the native V2 package plugin. It needs no loose local V2 copy, V1 SDK, or legacy command files. Valid legacy plugin registrations are now persisted into the single native plugins list using OpenCode 2.0.21's own normalization semantics, so native installs no longer leave parallel plugin and plugins blocks. Object options and entry order are preserved, malformed legacy values are left untouched, and unrelated provider/model settings are not rewritten. Existing 0.6.1/0.6.2 loose plugins/opencode-loop installs are still removed on update. Use --legacy-v1 explicitly for the compatibility installation.
V2 prompt admission and durable inbox/execution/compaction events own scheduling. Core-generated user-role messages never authorize a session abort. An unfinished dedicated Goal reserves its session, including paused and handed-off states; Loop does not wake or replace that Goal. Soft iteration timeouts do not abort a native model/tool/compaction turn.
Automatic compaction remains host-owned. On OpenCode 2 versions exposing public session.compact, Loop's explicit native compaction is capability-gated and waits for its own manual session.compaction.started input ID, compaction completion, and a session terminal event. Older hosts reject unsupported compaction before scheduling.
Prompt/command timers, watch and stop conditions, verification, preflight/postrun, notifications, checkpoints and diagnostic commands use the V2 runtime. Uncertain restart admissions pause for review rather than replaying potentially admitted work. OpenCode 2.2.x includes a native /goal feature. Loop does not install or maintain the separate @bybrawe/opencode-goal plugin; older Loop Goal records remain on disk and are not reinterpreted as native Goal contracts.
Idle-safe auto-continue, scheduled OpenCode work, and background loops.
OpenCode Loop adds /loop, scheduled prompt/command/shell jobs, compact scheduling, verification/checkpoints, and the opencode-loopd background daemon.
Current published native OpenCode 2 release:
0.6.10. GitHub Actions workflows have been removed; future releases require an explicit, separately verified manual publication.
OpenCode 2.4 / OpenTUI source update (not published): main accepts optional OpenTUI 0.8.x and 0.9.x peers alongside 0.5–0.7. OpenCode 2.4.1 uses OpenTUI 0.9.4 and Solid 1.9.17; match the host's UI dependencies. The 0.8/0.9 renderer and current native lifecycle still require local real-host verification. An incomplete OpenCode 2.4+ plugin inventory is not proof that a Goal has no owner. If the native Goal RPC is unavailable or a live dedicated Goal shard remains after uninstall, Loop conservatively defers admission rather than risking overlap. The published npm 0.6.10 is unchanged. GitHub Actions remain disabled; see manual release checks.
Native failure recovery (unreleased, PR #199): /loop 0s continue --resume-on-failure --max-runs 10 opts in to retrying a delivered, owned native prompt after session.execution.failed. Retries wait 5s, 10s, 20s and 40s by default, with a 5-minute cap when a larger --max-failures is explicitly configured. The fifth consecutive failure pauses by default; run limits still apply. An explicit /loop-resume resets the retry budget. Interruptions, shell/compaction/command failures and uncertain admissions do not auto-replay. A known native authentication, permission, quota/budget or permanent provider error also pauses the owned job, even with the flag enabled. Automatic retries also honor a valid native provider retry-after delay of up to 15 minutes, even when longer than local backoff. An invalid or longer delay pauses for review. Explicit manual run-now/resume remains a user decision. Older/unknown failure envelopes keep the existing opt-in bounded retry behavior; a fixed category, not the provider response body, is recorded in the pause reason. A failure during a pending host compaction, during owned background work, or after finalization has started is ambiguous and pauses instead of automatically replaying the prompt. Invalid persisted retry counters/budgets are also ineligible for replay. Cadence compaction preserves the pending retry, manual run-now request and watch trigger until the actual scheduled action is admitted. The flag is rejected when creating a non-prompt job. The legacy V1 plugin parser rejects the option; the standalone daemon does not support this native retry flag. The flag does not alter Goal ownership or bypass admission checks. Rebuild and verify against a real host before publishing. Thanks to @Cyxo for the contribution.
Install OpenCode Loop alone:
npx -y @bybrawe/opencode-loop@latestLoop installs, updates, and removes only Loop. It never invokes, installs, upgrades, or uninstalls @bybrawe/opencode-goal. OpenCode 2.2.x already has a native /goal; the separate ByBrawe Goal plugin is not required for Loop.
The old --with-goals and --with-loop-goals installation modes have been removed; both now fail before changing configuration. --loop-only and --without-loop-goals remain accepted as compatibility aliases for the standalone default. Loop preserves any previously installed Goal package, user-owned commands, and project history.
Run the relevant install command again to update that package. Then fully restart OpenCode and verify:
/loop-help
/loop-doctor
If both native commands work in terminal TUI but are missing from Windows Desktop, follow the Windows Desktop command-registry diagnostic guide. Do not replace native commands with legacy Markdown bridges.
On a version containing the diagnostic, run npx -y @bybrawe/opencode-loop@latest --desktop-diagnostics --workspace "C:\\path\\to\\your\\project" to check both commands against the currently registered local V2 service without printing its credentials. This does not install or modify Goal or Loop.
Global npm alternative:
npm install -g @bybrawe/opencode-loop@latest
opencode-loopTo uninstall:
npx -y @bybrawe/opencode-loop@latest --uninstallor, for a global install:
opencode-loop --uninstall
npm uninstall -g @bybrawe/opencode-loopLoop uninstall never removes the dedicated Goal plugin. Project Loop state under .opencode/opencode-loop/ is intentionally preserved by uninstall.
Loop separates two ideas:
- When does work become due? Idle, a timer, a watch trigger, or
/loop-now. - When is it safe to dispatch? Only when the session is actually idle and no active tool/child work would overlap it.
A timer expiring does not intentionally inject a second model turn on top of an active one. Due work waits for idle.
/loop continue
Turkish shorthand works naturally too:
/loop devam et
Explicit equivalent:
/loop idle continue
This is an unlimited idle loop by default. When the assistant finishes and the session becomes safely idle, Loop sends the prompt again. When that turn finishes, it does the same again, until you pause/stop it or a configured limit is reached.
For very short continuation prompts such as continue, keep going, or devam et, Loop adds project-continuation guidance: treat the turn as continuation of the current repository/conversation, inspect relevant files/TODO/progress/git state as needed, find the next unfinished step, avoid redoing completed work, and verify meaningful changes when practical.
For project work, a continuation loop with an explicit progress file is:
/loop --safe --ask-never --progress-file progress.md devam et
Important: --progress-file supplies project context only; it is not a completion or stop condition. Checking every - [ ] task as - [x] in progress.md or TASK.md will not automatically stop an ordinary idle loop. This distinction is tracked in #174 following a user report. For unattended tasks that must stop, combine the progress file with a host-observed stop criterion such as --max-runs, --max-runtime, --stop-file or an explicit --until marker. For checklist-completion stop in 0.6.9 or newer, add --until-checklist-complete explicitly alongside --progress-file; this option is absent from 0.6.8. Do not assume a progress file by itself implements a stop condition.
The user, not an AI-generated chat response, must invoke /loop-stop or /loop-clear as a native control command. Asking the model to type /loop-clear in conversation does not reliably execute that command. Use /loop-status to inspect current jobs and /loop-stop or /loop-clear to stop them. See #175 for improvements to host-owned stop UX.
Create a starter progress file first if needed:
/loop-init
OpenCode Loop 0.6.9 introduced the opt-in, host-checked completion guard, also included in 0.6.10. It is not part of 0.6.8. On a compatible native V2 host:
/loop --progress-file TASK.md --until-checklist-complete --verify "npm test" finish the tasks in TASK.md
On a safe idle/scheduling boundary, Loop reads TASK.md as a regular project file. If it has at least one Markdown checkbox and all actionable boxes are checked, Loop stops scheduling further turns. If --verify is configured, Loop also requires a successful host verification associated with the same checklist digest. Empty/missing/oversized/unsafe/symlink/control-plane files pause for review rather than being called finished; code-fenced and quoted checkbox examples do not count.
Without --until-checklist-complete, --progress-file only supplies context and normal unlimited loops stay unlimited. The host/user controls /loop-stop and /loop-clear directly; having a model print those names is not an actual command invocation. Follow #174 and #175.
/loop every 5m continue the project
This waits five minutes before the first run, then becomes due every five minutes. If the timer expires while OpenCode is busy, it waits for the next safe idle boundary rather than stacking prompts.
/loop after 5m continue once
Alias:
/loop in 5m continue once
This is a one-shot delayed job. Five minutes passing makes it due; it still waits for idle before dispatching.
/loop 5m continue the project
For backward compatibility, this form starts on the next safe idle boundary and then follows a five-minute interval.
Delay its first run explicitly:
/loop 5m --no-now continue the project
Legacy idle form is still valid:
/loop 0s continue
For the exact schedule truth table and edge cases, see docs/SCHEDULING.md.
| Command | Meaning | First dispatch | Repeats |
|---|---|---|---|
/loop continue |
auto-continue on idle | next safe idle | every idle |
/loop idle continue |
explicit idle loop | next safe idle | every idle |
/loop every 5m continue |
recurring timer | after 5m, then idle | yes |
/loop after 5m continue |
delayed one-shot | after 5m, then idle | no |
/loop in 5m continue |
delayed one-shot alias | after 5m, then idle | no |
/loop 5m continue |
legacy recurring form | next safe idle | yes |
/loop 5m --no-now continue |
legacy delayed-first recurring | after 5m, then idle | yes |
/loop 0s continue |
legacy idle form | next safe idle | every idle |
A useful first loop for an unfamiliar repository is:
/loop-init
/loop --safe --ask-never --progress-file progress.md Understand the existing project architecture and current state first. Inspect relevant source, tests, docs, TODOs, git status, and recent work. Record useful state in progress.md, choose the next unfinished safe improvement, implement it, verify it, update progress.md, and continue from there on later idle turns.
Once the project state is established, this is enough:
/loop --safe --ask-never --progress-file progress.md devam et
The short continuation form is deliberately interpreted as “resume this project”, not “invent a new task from scratch”.
Schedule an OpenCode slash command:
/loop-command 200m /compact
Run a real shell command:
/loop-shell 10m npm test
Ask a recurring quality-control prompt:
/loop-ask 1h did you run tests, typecheck, and build? If not, run them and fix errors.
Watch a path:
/loop --watch progress.md inspect the updated progress and continue
Prompt, command, shell, compact, and watch jobs use the same idle-safe scheduling path but different execution transports.
| Command | Purpose |
|---|---|
/loop <prompt> |
Add/update an unlimited idle prompt loop |
/loop idle <prompt> |
Explicit idle-loop form |
/loop every <duration> <prompt> |
Recurring timer, first run delayed |
/loop after <duration> <prompt> |
One-shot delayed prompt |
/loop in <duration> <prompt> |
Alias for after |
/loop <duration> <prompt> |
Backward-compatible compact interval form |
/loop-command <interval> <slash-command> |
Schedule an OpenCode command |
/loop-cmd <interval> <slash-command> |
Alias for /loop-command |
/loop-ask <interval> <question> |
Schedule a recurring check/question |
/loop-shell <interval> <command> |
Schedule a shell command |
/loop-status |
Show jobs plus schedule/state |
/loop-now [id/name/all] |
Mark selected jobs due now; still waits for idle |
/loop-pause [id/name/all] |
Pause jobs |
/loop-resume [id/name/all] |
Resume jobs |
/loop-remove [id/name/all] |
Remove jobs |
/loop-clear |
Remove all jobs for the current session |
/loop-logs |
Show recent scheduler/runtime events |
/loop-doctor |
Diagnose session/state/scheduling problems |
/loop-init |
Create a starter progress.md |
/loop-export |
Export current-session Loop state |
Lifecycle and limits:
--name <name>
--max-runs <n>
--max-runtime <duration>
--max-failures <n>
--timeout <duration>
--no-now
--now
Safety and verification:
--safe
--ask-never
--no-overlap
--verify "npm test"
--preflight "npm install"
--postrun "git status --short"
--pause-on-verify-fail
Project context:
--progress-file progress.md
--prompt-file loop-prompt.md
--include-file ARCHITECTURE.md
--batch 5
--compact-every 20
--watch progress.md
Checkpoints:
--checkpoint-only
--git-checkpoint
--git-checkpoint may stage/commit work; use it only when intentional.
The native OpenCode 2 TUI can show a read-only Loop status panel alongside OpenCode Goal's separate status panel. This feature was proposed and implemented by @zhek in PR #165; thank you for the contribution!
The new @bybrawe/opencode-loop/tui entry renders status only; the server's Loop plugin exposes @bybrawe/opencode-loop/rpc for location-scoped reads. Scheduled work, stop/pause commands, compaction and Goal ownership continue to run only in the server, and losing an optional panel never disables the Loop scheduler. The panel reports persisted jobs, due versus waiting for idle, runs/failures and pause reasons; it deliberately does not guess task completion, tokens, ETA or success percentage.
Release status: the native CLI TUI sidebar is included in published 0.6.10. The sidebar.content API belongs to the native CLI TUI; it does not establish Windows Desktop/Web plugin UI support. OpenCode 2.0 and 2.1 OpenTUI compatibility and simultaneous Goal panel behavior are subject to real-host tests.
TUI discovery caveat (OpenCode 2.1): actual rendering and plugin auto-loading are different checks. Upstream OpenCode #55084 documents a silent skip when a TUI connects to a plugin-enabled server but the client has a different npm package cache, notably remote/split-cache setups. Normal shared-cache installs are not generally affected. If /loop works but the TUI panel is absent, inspect the active CLI/TUI plugin catalog and cache paths; on affected 2.1.x builds, adding the package to that version's separate cli.json plugin list is an upstream-reported workaround. Do not assume Desktop supports ui.slot. A real CLI/TUI reproduction is tracked in #191.
/loop-status reports both the schedule definition and the current scheduler state. Examples:
schedule=every idle | state=waiting for idle
schedule=every 5m, first after 5m | state=due in 3m
schedule=once after 5m | state=due; waiting for idle
This is intentional: “due” is a clock fact, while “waiting for idle” is an admission/safety fact.
The problematic shape is typically:
enabled=true
paused=false
runCount=0
lastRunAt=0
Some OpenCode TUI versions can leave session.status at busy/retry after a plugin command acknowledgement. Loop cross-checks that stale state against the chronological message tail before the first Loop run too. It recovers only when the latest assistant message is actually completed and no active tool/child work is known. A genuinely unfinished assistant turn, latest user turn, active tool, busy child, or unknown completion remains busy.
Recovery is logged as:
status-message-idle-recovery
Busy retries are also written as throttled deferred events so loop.log does not misleadingly contain only the original add line.
Use:
/loop-status
/loop-logs
/loop-doctor
Normal plugin Loop jobs are session-bound and stored under:
.opencode/opencode-loop/<session-id>.json
A new OpenCode session does not silently inherit another session's jobs. /loop-doctor reports other persisted session files that still contain enabled jobs, including jobs that have never run, so an old loop is visible instead of appearing lost.
For work that must continue after the TUI/session closes, use opencode-loopd.
Loop works by itself. It does not install or manage other Goal plugins. Use separate sessions for native /goal and prompt-producing /loop whenever practical. On OpenCode 2.2.x, Loop checks the built-in Goal's public, read-only opencode.goal RPC before admitting an autonomous turn and again immediately before dispatch; an active/paused native Goal reserves the session. A separately installed ByBrawe Goal keeps its own guard, but orphaned ByBrawe Goal files no longer block Loop when that package is confirmed uninstalled. Unavailable/unrecognized ownership states fail closed. This is a safety guard, not a claim that two independently scheduled agents can run atomically without races; host-level integration remains tracked in #195. Recommended split:
- use OpenCode's native
/goalfor a built-in objective workflow, or install ByBrawe Goal separately (native command/goalxin 1.3.50) if its stronger evidence contracts are needed; - use
/loop,/loop-command,/loop-shell, andopencode-loopdfor scheduling/repetition/background infrastructure.
A prompt-producing Loop and an active dedicated /goal should not both own autonomous continuation of the same session. The runtime therefore blocks a new prompt Loop when it detects an active dedicated Goal for that session.
Recommended choices are to finish/pause the Goal or use a separate session. Advanced users can deliberately override the guard with:
/loop --allow-goal-overlap continue
That escape hatch can create competing autonomous turns; use it only when that is intentional.
Loop's older experimental /loop-goal* commands are omitted by default. The former --with-loop-goals mode is no longer supported. Existing Goal state is preserved; no automatic migration or deletion is performed.\n\n## Recommended development loop
/loop --name dev --ask-never --safe --no-overlap --batch 5 --compact-every 200m --checkpoint-only --progress-file progress.md Treat progress.md as the project state. Continue with the next unfinished TODO, implement it, mark completed items, add useful follow-up TODOs, run tests/lint/build when available, and keep going while work remains.
Test/fix loop:
/loop --name testfix --ask-never --safe --verify "npm test" --max-failures 3 Continue from progress.md. If tests fail, analyze the failure, fix it, and run the tests again.
The normal /loop plugin is session-bound. opencode-loopd pins one exact OpenCode session for daemon iterations and can keep scheduling outside the normal interactive Loop timer lifecycle.
opencode-loopd --project . --every 5m --prompt-file loop-prompt.mdImmediate daemon cadence:
opencode-loopd --project . --every 0s --prompt "continue from progress.md and implement the next unfinished TODO"Pin a session and limit runs:
opencode-loopd --project . --session ses_xxx --every 5m --max-runs 20 --timeout 30m --prompt-file loop-prompt.mdUse the daemon as a read-only stall detector for dedicated Goal extension state (GoalX on native V2, legacy Goal on V1; not OpenCode's built-in Goal):
# one-shot (good for systemd timers / cron-style runners)
opencode-loopd pulse-check --project . --stale-after 30m
# repeating opt-in watcher
opencode-loopd pulse-check --project . --stale-after 30m --every 1m
# watch one Goal by Goal ID or session ID
opencode-loopd pulse-check --project . --goal <goal-or-session-id> --stale-after 30m --every 1mThe pulse-check reads .opencode/goals/*.json and alerts for an active or unverified unknown dedicated Goal. paused, waiting_user, blocked, budget/usage-limited, and completed Goals do not alert. A stall episode is based on durable Goal activity (updatedAt, progress/revision changes); OpenCode session updated time is included only as corroborating telemetry because it is not reliable enough to be the stall authority on every host version.
Episode state is stored separately in .opencode/opencode-loop/pulse-check.json. The checker never writes Goal state, never dispatches a prompt, never runs /goal resume, and therefore does not participate in the prompt-producing Goal-overlap guard. It emits at most one alert per stall episode and re-arms after observed Goal activity or a status change. On a detected V2 host the alert recommends inspecting /goalx status (GoalX 1.3.50+); verify the installed extension and owning session before recovery. It must not direct you to the built-in /goal. The explicit detected V1 path retains its legacy /goal resume advisory. If host detection fails, the alert is namespace-neutral. These are human-facing instructions only; pulse-check never invokes any of them.
Windows Task Scheduler:
opencode-loopd install-task --project "C:\path\to\project" --every 10m --prompt-file loop-prompt.md --name OpenCodeLoop
opencode-loopd uninstall-task --name OpenCodeLoopRuntime state and logs:
.opencode/opencode-loop/
.opencode/opencode-loop/loop.log
Patch checkpoints:
.opencode/opencode-loop/checkpoints/
Loop automatically creates .opencode/opencode-loop/.gitignore containing an explanatory comment and * when it first creates the state directory, so runtime state, checkpoints, and logs are not committed by accident. An existing .gitignore in that directory is left untouched.
For unattended work, avoid permanently allowing every shell command. Grant routine read/edit/test operations while keeping destructive commands on ask/deny. --safe reduces risk but does not replace OpenCode permission configuration.
@bybrawe/opencode-loop
Native OpenCode 2 is the default supported package path for 0.6.10. The runtime dependency accepts the previous SDK 2.0.22 or the targeted 2.4.4 SDK; the checked-in npm lock still resolves 2.0.22 until a maintainer can regenerate it with registry access. The native runtime uses the optional experimental.idle hook to defer autonomous work while this session owns background jobs. Real 2.4.4 host validation is pending; the explicit legacy V1 compatibility path retains @opencode-ai/plugin >=1.4.0 <2. Do not mistake the legacy V1 peer range for the V2 runtime API version.
The 0.6.10 release was verified with standalone native V2 packaging, Windows/Linux regressions, and real OpenCode 2 host command registration. Future releases use explicit local verification, not automatic Actions. Separate legacy ByBrawe Goal coexistence remains an optional compatibility test: it is not a Loop runtime, installation, update, or npm publication dependency. Native OpenCode 2.2+ /goal is checked read-only via the public Goal RPC immediately before autonomous Loop admission. Windows Desktop GUI slash-command discovery is not yet proven equivalent to CLI TUI; see #169 and the diagnostic guide. Platform gaps are tracked in #177.
See docs/SCHEDULING.md for the scheduling contract and CHANGELOG.md for release history.
MIT
Native verification hardening (unreleased): Loop checks the checklist digest both before and after its verification command. Changed/unavailable checklists cannot inherit a passing result; an interrupted terminal boundary cannot finalize the run. Goal reservations are rechecked after persisting an admission marker, before calling the host. This is a conservative recheck, not an atomic cross-plugin lease. Real-host validation remains pending.
Open /loop-panel in the Desktop command palette or choose Loop in the session panel menu. The panel uses the existing location-scoped read-only status RPC, shows the selected server's session, aborts obsolete reads after routing changes, and refreshes every 10 seconds while mounted. It does not send prompts, run tools, alter lifecycle state, or require the other ByBrawe plugins. It is a single host-module CommonJS entry; real Desktop/Web host validation is still required. Existing server and TUI command behavior is unchanged.
Open /loop-panel or select Loop in the session panel menu. The dashboard shows each job, schedule, run and failure counts, pause reason, and confirmed per-job pause/resume/run-now/stop plus a bounded prompt-job creation form. Turkish and English UI labels follow the host locale. Structured status is read-only and refreshes every 10 seconds (can be disabled). An older server falls back to read-only text. Mutations call existing native commands, require confirmation, and re-read the selected session snapshot before dispatch. Command acceptance is not execution completion; starting or resuming a Loop job can use models. Stopping a Loop job does not abort a native model/tool turn. This is not an atomic compare-and-swap across the command boundary. Real Desktop validation is pending.
Native scheduled command compatibility (unreleased): the adapter translates Loop's internal command/arguments request to the OpenCode 2 session.command name/text payload. This matches both 2.0.22 and 2.4.4 protocol definitions. No host execution validation has been performed.
The read-only Loop status RPC now exposes a reservation method for independently installed companions. It reports live runtime or persisted v2Run admission ownership, even while a job is being stopped. Stop/clear retain in-flight records until a confirmed terminal boundary; a successfully completed stopped job is removed without running a completion notification. After a restart, an uncertain persisted admission is retained by stop/clear/remove. Inspect native inbox/history; these commands do not bypass an unresolved reservation. This is a conservative admission check, not an atomic cross-plugin lease. Goal reservation polling backs off from one second to at most thirty seconds to reduce idle CPU/RPC usage.
Desktop Loop editor update (unreleased): choose idle, immediate recurring, delayed recurring or one-shot schedules; configure run/failure/runtime limits, progress file, checklist stopping, optional verification and the safe heuristic. No verification command is selected by default. Job controls freeze exact IDs before merged state writes; clear rejects a selector and empty results use the merge-aware writer rather than unlinking the shard. This preserves unrelated concurrent jobs. The checked-in native/server bundles mirror the runtime source; the official Bun build remains pending.
A stopping job with an unresolved admission is now shown as stopping, not merely paused. The panel does not offer a record-removal action while a stopping job still has a reservation. The record stays visible until a verified terminal boundary.
The Desktop Loop panel includes a separate list of automations created by the selected session when the OpenCode host exposes its native experimental automation API (as in 2.4.4). It does not migrate or delete automations; confirmed pause/resume uses OpenCode's own API after revalidating the automation. Opening the section or explicitly refreshing it reads the host list, with a ten-second request deadline. Older or disabled APIs leave the Loop dashboard usable. Native automations are owned by OpenCode, not by Loop; they may run independently of the Loop/Goal reservation checks.
Companion Goal RPC and inventory queries now have a three-second deadline per request. A timeout is treated as uncertain ownership, not an idle-session grant. This is still not an atomic cross-plugin lease. Source and checked-in native/server bundles were updated; official builds and real-host checks remain pending.
Unresolved native admissions (unreleased): a persisted v2Run without a settled local owner blocks all new Loop jobs in its session, even when the job is paused, disabled or at its run limit. Inspect the native inbox/history. A safe automatic restart-reconciliation mechanism is not yet available; use a separate session if the old reservation cannot be verified. Resume/run-now reject selections consisting only of unresolved admissions. This is not an atomic lease across plugin instances.
Native admission compare-and-reserve (unreleased): the existing per-session state writer checks the exact job baseline and absence of any persisted admission under its cross-process state lock before creating a new v2Run. A losing concurrent scheduler does not send a prompt, run a shell command, or charge a run. The runtime re-reads the exact reservation after the companion query and before host dispatch. This coordinates updated Loop writers sharing the same state shard only; it does not lock native OpenCode or GoalX, and cannot make the host API call atomic with the disk write. Older writers and different storage locations remain outside this guarantee. Official bundle and host validation are pending.
Native prompt automation creation (unreleased): the Desktop automation section supports explicit one-shot delays and repeating intervals (5 minutes to 4 hours) with mandatory expiry for repeating schedules (8 hours, 1 day or 7 days). Only prompt actions to the selected session can be created here. Shell/Code Mode/event creation is not exposed. Native schedules are independent of Loop/GoalX ownership; prefer a separate session. Creation requires confirmation, never retries automatically, and refreshes the list to reconcile uncertain responses. A real OpenCode host check is still required.
Desktop request handling (unreleased): a disconnected or moved session invalidates rendered controls, and cancellation/deadline settles the panel's wait even if an older client ignores AbortSignal. A timed-out native mutation remains uncertain; inspect the fresh server state before retrying.
Concurrent native reservation handling (unreleased): a persisted v2Run may belong to a different still-live Loop writer, so detecting it no longer automatically pauses or changes that job. All new dispatches remain blocked until the reservation is resolved. When other eligible jobs exist, an idle scheduler rechecks at a 30-second interval. The panel labels persisted reservations separately from runnable jobs; a reservation is not evidence that a model is currently running. Cancellation events must identify the exact undelivered admission; stale/anonymous events cannot clear its ownership. Never remove a reviewed reservation until host history confirms its work has settled.
Native event-stream safety (unreleased): unexpected end of the host event subscription or a failed event handler blocks new native Loop work, clears scheduling timers, and invalidates in-flight pre-dispatch checks. Existing admission records are retained; stop and status remain available. /loop-doctor reports stream availability. Reload OpenCode before starting/resuming jobs after this condition; automatic reconnection is intentionally not assumed to restore missed terminal events.
Native scheduling refinements (unreleased): overdue runnable jobs receive a bounded wake after scheduling is reconsidered, even after a competing reservation disappears. Completed/disabled jobs cannot be silently rearmed by run-now/resume. Unowned host errors do not pause all saved jobs, and in-flight admission responses cannot recreate timers after event-stream loss. Existing limits and separate-session ownership rules are unchanged.
State persistence (unreleased): Loop writes a private, exclusive temporary file in its existing runtime state directory, flushes it, and replaces the session shard with a same-filesystem rename. Temporary destination locks are retried. When the filesystem refuses atomic replacement, Loop reports an error rather than copying/truncating the live reservation file. A hard crash can leave an ignored temporary file; it is not treated as a session record. This also applies to the legacy runtime.
Desktop dashboard (unreleased): shows the native scheduler's event-stream health separately from the status RPC connection. New work/run-now/resume are unavailable when scheduler observations are lost; stop/pause remain available. Persisted and live admissions both affect availability. Dashboard confirmations include all persisted job fields, and ambiguous/malformed job records disable the dashboard instead of appearing as an empty session.
Native preflight reservation (unreleased): Loop persists the exact job reservation before running configured preflight commands or branch preparation. Preparation results use a compare-and-swap checkpoint; a changed job, foreground turn, peer reservation or session move prevents subsequent host dispatch. Interrupted preparation pauses for review instead of blindly rerunning side-effectful commands. A hard crash during preparation can still leave an unresolved record, which is intentionally retained.
Preparation and scheduler refinements (unreleased): the native preflight/branch policy rechecks the reserved job, peer ownership and session location between preparation phases. Withdrawal uses a bounded compare-and-swap retry. A Goal-owned session uses only the companion backoff timer instead of a competing fast scheduler wake. Replaced timer callbacks cannot erase newer handles. Invalid or duplicate job identities and malformed reservation identities are rejected by storage before mutation, not just by the panel. These checks do not make independent host and filesystem operations a single transaction.
Native transport teardown (unreleased): admission responses have a 30-second caller-side wait limit; missing/rejected responses retain the durable reservation for review, never trigger automatic replay. Requested inbox/shell IDs are remembered even while the response is pending. Unexpected stream closure revokes callbacks and aborts the subscription. Cleanup starts unsubscription and iterator closure together, bounds those waits, and reports incomplete cleanup instead of hanging indefinitely on the event bridge. Runtime shutdown and owned local-shell shutdown run together. These limits do not cancel a remote model operation or imply it has stopped.
Native terminal checkpoints (unreleased): successful completion, failed shell and matching inbox cancellation release only the exact persisted run through a compare-and-swap checkpoint. A concurrent stop is honored without erasing a replacement job. Finalization checks the current reservation, session location and peer ownership between verification/postrun/checkpoint phases. An interrupted or conflicting finalization is paused for review rather than replaying hooks or applying stale verification proof. Compaction terminal events with a different input ID cannot finish the owned manual compaction. A write conflict may still retain the admission for review; no distributed atomicity is implied.
Native admission and terminal corrections (unreleased): the runtime distinguishes a withdrawn pre-invocation gate from an uncertain host response. It releases only the former without asking the host to cancel anything. Manual compaction failure only settles a matching owned compaction; unrelated failure events cannot release a delivered Loop prompt. When an adapter exposes inbox cancellation, its positive acknowledgement is applied against the current reservation with a bounded wait and compare-and-swap. The native server adapter still does not expose a cancellation API; pause/stop there retain ownership until terminal evidence. No host cancellation guarantee is added.
Session lookup and compaction identity (unreleased): native scheduling and status RPCs bound session-location lookup waits to five seconds. A timeout is not ownership permission; no late response authorizes a timed-out attempt. Status waits also settle on RPC cancellation or plugin disposal. Generic compaction hooks do not overwrite a matching raw input ID or terminal evidence. A manual compaction end/failure without its own input ID requires the currently recorded matching manual input identity; ambiguous boundaries remain reserved for review. These changes do not cancel remote host work.
Native location isolation (unreleased, #186/#191): scheduler keys use a canonical instance directory and session ID, so equivalent Windows path spellings cannot start a second scheduler. Explicitly foreign directory/workspace events are filtered. An event whose session lookup cannot confirm ownership suspends that session's timers and invalidates in-flight preparation without erasing native admission evidence. An actual fresh idle boundary is required before ordinary scheduling can proceed. An unresolved admission remains reserved for review. This is not a cross-plugin atomic lease or a real remote-host discovery result.
Native identity and event cache (unreleased): rejected or foreign session events no longer update the remembered directory; duplicate event IDs are scoped by event type, session and reported workspace. Failed session resolution in the prompt, idle and compaction hooks suspends the existing scheduler. Native prompt admission requires the exact requested inbox ID; an unexpected ID or explicit failed wait is treated as uncertain and retains the reservation. An older host returning an unidentifiable prompt response may require review rather than automatic continuation.
Native Goal coexistence (unreleased, #195/#186): Loop bounds its read-only Goal shard observation to three seconds, treats malformed/failed plugin inventories as unknown ownership, and refuses to release a reservation using a completed built-in Goal response explicitly belonging to another session. Unknown host versions no longer use a potentially partial plugin inventory to disregard a live ByBrawe Goal shard. This favors pausing over unsafe takeover; it does not create an atomic lock shared with OpenCode's built-in Goal.
Native admission checkpoint (unreleased, #186): successful native acknowledgements update counters only through the exact persisted reservation with bounded compare-and-swap retries. A conflicting checkpoint remains uncertain instead of mutating a replacement job. Cancellation refunds share the same guarded accounting rule, preserving newer user stop/limit edits. A terminal event without a confirmed local admission checkpoint releases only through review, without executing postrun/verification hooks. This does not automatically replay unresolved work.
Native cancellation recovery (unreleased, #186): if a native inbox cancellation arrives after reload with no in-memory Loop run, the runtime may reconcile only an exact previously acknowledged prompt reservation whose saved run and inbox IDs both match the native event. A delivered marker blocks this recovery; live prompt delivery is now checkpointed on the same reservation. The recovered job remains paused (a prior stop removes it); counters are preserved, and no preflight/postrun/model dispatch is triggered by the recovery. Generic idle, missing messages, unconfirmed admissions and command/shell/compaction reservations remain unresolved. No automatic recovery is claimed if the terminal event was lost while the plugin was offline.
Native sidebar consistency (unreleased): the text sidebar and dashboard now receive the same live/durable reservation and event-stream availability observations. Reserved jobs, stopping jobs, and jobs waiting for a reservation or scheduler connection are separated from runnable counts. The text sidebar no longer reports a due/overdue countdown as actionable while a native reservation or disconnected stream blocks dispatch. A recorded delivery marker is labeled historical; it is not a live execution indicator. These are presentation-only observations, not changes to scheduler authority.
Shared Goal admission lease (unreleased): native Loop uses the existing Goal session SHA-256 shard lease under .opencode/goal-locks when Goal is installed or its presence is uncertain. While holding the lease, Loop rechecks the dedicated Goal shard before atomically claiming its own v2Run; the paired Goal writer checks Loop reservations under that same lease. Both use compatible owner/candidate and dead-owner cleanup election formats. The lease is not held during host prompt execution, preflight or postrun. Older hosts with a positively absent dedicated Goal retain standalone behavior; OpenCode's built-in Goal and older nonparticipating plugin versions are still checked separately and are not covered by this cross-plugin lease. No other plugin is installed, migrated or modified by Loop.
Native reservation phases and restart reconciliation (unreleased, #186): new reservations record the originating host/PID and first enter a reserved phase before any preflight, branch change, or native submission. A separate exact checkpoint advances them to preparing before side effects. Only an exact reserved record with a definitively dead same-host owner can be released automatically; the recovered job is paused, its counters are retained, and it is never replayed automatically. Older/ambiguous records and preparations that may have executed remain reserved. Exact native delivery events can now be recorded after reload even if the admission acknowledgement was lost; delivery does not prove completion. Timeout/error pauses use an exact reservation CAS and preserve user pause/stop decisions. Event-stream loss blocks queued terminal releases. Review-only terminal handling records lastTerminalAt rather than asserting new successful finalization.
Native reservation wake and status consistency (unreleased, #186): a single pre-preparation reservation owned by another identifiable same-host process is checked at bounded 30-second scheduler wakes even when no other job can run. A dead owner is still required for automatic recovery; admitted/preparing work is never released on time alone. Native cancellation also checks the exact persisted delivery flag before releasing a reservation. CLI status, sidebar and dashboard use the same schedule description for blocked, stopped and reserved jobs; the displayed reservation phase is historical, not a live model indicator.
Unreleased native control transaction fix: creation/replacement and pause/resume/stop/clear use exact selected-job snapshots under the existing storage lease. Concurrent edits or new same-name jobs reject the command instead of silently merging contradictory results. Stop/remove/clear perform one local transaction, retaining reserved work until exact terminal settlement. Status/export use the read-only state reader and never create forensic backups just for a status view. Lock metadata checks are also aligned with the Goal lease reader, including bounds during empty-lock publication retries.
Unreleased native finalization outcomes (#186): a verification/postrun failure or interrupted finalization no longer refreshes lastCompletedAt; a known terminal records lastTerminalAt and an explicit lastFinalization outcome. Existing failure thresholds still apply; a failed verification without a configured pause can continue normally. Foreground-interrupted/paused prompt or command turns are review-only, not proof of success. Notification errors cannot strand a committed terminal owner. Stop-condition reads are committed against the exact selected job, with unreadable conditions paused for review rather than interpreted as completion.
Unreleased checkpoint hardening: Git repository/status/diff/staging/commit failures now produce an explicit checkpoint failure, not a successful checkpoint toast. Native finalization pauses on a requested checkpoint failure without marking that iteration completed. Each subsequent Git/write phase rechecks current native ownership. Existing opt-in --git-checkpoint still uses git add -A; already-started commands or partially staged changes are not rolled back automatically. Legacy checkpoint callers receive failure warnings without interrupting scheduler cleanup.
Unreleased local command capture: stdout/stderr are each bounded to 16 MiB. Truncation produces a failed result instead of an incomplete successful Git patch or verification. Timeout uses a POSIX process group with awaited escalation, or a bounded Windows taskkill attempt with a direct-child fallback; the code still awaits the actual close event. Native verification pauses on timed-out or truncated output even if ordinary verification failure retries are enabled. This is not a guarantee that detached descendants have stopped; no process-tree termination claim is made.
Unreleased scheduler fairness: native due jobs are considered by explicit run-now request first, then least recent admission (run count breaks equal timestamps), without changing persisted list order. Unsupported jobs cannot be resumed/run-now. Dry-run and unsafe-shell pauses use exact job snapshots and schedule other eligible jobs. Cancellation requests are not initiated after loss of the event stream.
Current-main report isolation (#179): native display messages from /loop-status, /loop-help, /loop-doctor, /loop-logs and other local reports retain resume:false and a dedicated display metadata tag. Where the public request hooks expose that metadata, Loop removes only its tagged text-only user messages from primary, compaction, generation and title request projections, while retaining a non-report user boundary. It never removes Goal/GoalX metadata, ordinary Loop work, attachments or the stored transcript. Older hosts without request metadata remain unchanged; previously stored reports, opaque provider replay windows and report-only requests are not guaranteed isolated. Reports may still wait in the native inbox. Prefer the read-only sidebar/status RPC when no model-context side effects are acceptable. Real-host verification of this capability is required before claiming full context isolation.