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
lmas_startstarts a command through LMAS handoff semantics.lmas_statusreads a run status without polling blindly.lmas_cancelcancels a user-selected run and records cancellation when the watcher is still alive.lmas_inforeports current guard and run diagnostics for live doctor checks.- The OpenCode TUI sidebar can show the current session's LMAS guard state and active/finalizing runs.
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.