OpenCode

OpenCode is the primary LMAS target.

OpenCode gets the cleanest experience: the installer registers the LMAS plugin and skill, and the watcher injects LMAS_COMPLETION_EVENT v1 back into the running OpenCode session when the job exits.

Install

npx let-my-agent-sleep install --agent opencode

Restart OpenCode after installation so it reloads plugin tools and skills.

Tools

Oh My OpenAgent continuation

During OpenCode install, LMAS does not modify Oh My OpenAgent disabled_hooks or disabled_skills. Existing settings are preserved; doctor only warns about entries that may be LMAS 0.3.0 residue.

The OpenCode plugin guard blocks explicitly marked or clearly identified continuation prompts only while an LMAS_HANDOFF v1 is active in the same session.

LMAS also installs a runtime guard in the OpenCode plugin. While an LMAS_HANDOFF v1 is active, OMO initiator markers, compaction-continuation metadata, and known TODO/Ralph/Boulder or explicit continue-work prompts are no-oped until LMAS_COMPLETION_EVENT v1 arrives. Unmarked fallback prompts, benign synthetic notifications, direct user slash commands, noReply internal notifications, and LMAS completion prompts pass through. A direct user request authorizes one exact-run status or cancel action without ending the handoff.

LMAS does not install OpenCode compaction hooks. Compaction and ordinary continuation remain owned by OpenCode and other plugins; LMAS only blocks live reply-expecting prompts for active handoffs.

Agent prompt

Use the let-my-agent-sleep skill for this task.
Start this command with lmas_start:
python train.py --config configs/exp.yaml
After LMAS_HANDOFF v1, stop. Do not wait, poll, inspect status, or use bash as a fallback.

Non-default server URL

If OpenCode is running on a non-default server URL, include that URL in the request so the watcher knows where to inject the completion prompt. The server that owns the session must still be running when the watched job finishes; otherwise LMAS leaves resume_prompt.txt for manual recovery.

Status, notify, and cancel

For explicit status checks, progress.txt, secondary notification URLs, runtime files, and cancellation behavior, see Run operations.