OpenCode is the primary LMAS target.
OpenCode gets the most complete LMAS experience: start a long job, stop polling, and continue automatically when it finishes.
Install
npx let-my-agent-sleep install --agent opencode
Restart OpenCode after installation so it reloads plugin tools and skills.
What you get
- Automatic handoff and wake-up in the same session.
- Status and cancellation when you explicitly ask for them.
- A TUI sidebar showing the current handoff and run state.
- A recovery prompt if the OpenCode session is no longer available.
Oh My OpenAgent compatibility
LMAS does not modify Oh My OpenAgent disabled_hooks or disabled_skills. Existing settings are preserved.
During an active handoff, LMAS blocks only recognized automatic continuation prompts. Unmarked fallback prompts, benign synthetic notifications, direct user slash commands, and LMAS completion messages still pass through.
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 uses a non-default server URL, include it in your request. The server that owns the session must still be running when the job finishes; otherwise LMAS leaves a recovery prompt.
Status, notify, and cancel
For explicit status checks, progress.txt, secondary notification URLs, runtime files, and cancellation behavior, see Run operations.