Repository navigation
OpenCode Desktop — Scheduled Tasks + Loop Guards
·
490 commits
to main
since this release
OpenCode Desktop — Scheduled Tasks, Loop Guards, Performance Pass
Follows v1.18.25-fork.4 · Base: opencode v1.18.25 · Commits a0cdd60d24..763af86232
⏰ Scheduled Tasks (headline)
Recurring agent tasks on a cron schedule, fully durable:
- Task scheduler with cron firing and busy-skip semantics — a task that fires while its session is busy is skipped, never queued into a pile-up.
schedule_tasktool so the model itself can create recurring tasks on request ("check deps every morning").- Tasks sidebar section with a create dialog — create, inspect, and manually run scheduled tasks from the app.
- Task CRUD + manual-run API endpoints, durable
Taskcontracts and task events in the schema. - Storage service with runs history and due-claim, covered by tests.
🛑 Runaway Loop Guards (default ON)
An agent that keeps ending turns with tool calls could previously loop for hours (observed: 531 steps / 2h / 75M tokens retrying a failing typecheck). Now bounded at every level:
- Hard step bound (1000, per-agent
stepsoverride wins) — at the wall the turn's tools are physically stripped and a wrap-up prompt injected; a salvage path records the error and ends cleanly with todos intact. - Turn-fingerprint interceptor — 3 identical consecutive turns → visible warning; 6 → forced wrap-up; 10 → hard stop. Mirrors a human interrupting the loop.
- Builds on the existing degenerate-repetition guard and bounded idle-stall retries.
⚡ Performance & Context
- Read-only tool result cache per session — repeated identical reads stop re-burning tokens.
- Incremental staging from watcher dirty sets — file-change snapshots stage only what changed.
- Post-compaction hydration boundary — only retained messages hydrate after compaction, cutting cold-start work.
- tool_search demotion under context pressure — promoted tools yield their budget back when context tightens.
- Sidebar fixes — new-session entries deduplicated; Tasks section added to the new layout.
📦 Artifacts
opencode-desktop-mac-arm64.dmg/.zip— production channel build (verified: embedsprod, usesopencode.db).