---
name: runtime-targets-preview
description: Use when detecting, editing, running, stopping, logging, troubleshooting, or previewing Remix runtime targets, web app previews, framework commands, readiness, ports, or E2B preview URLs.
---

# Runtime Targets Preview

Use this skill when the user asks to run an app, preview a web UI, detect framework commands, edit runtime commands, inspect logs or status, stop or restart a server, or understand preview URLs.

This skill is for persistent runtime target lifecycle. It is not the collaboration recording path and should not be confused with app edit status.

Mental model:

- Runtime targets are saved command definitions such as install, dev, build, preview, test, and custom.
- Running a runtime target is explicit execution in the app sandbox.
- Web preview v1 exposes a temporary direct E2B sandbox port URL.
- Long-running targets need lifecycle handling: status, logs, restart, stop, and readiness.

Recommended sequence:

1. Start with `remix_collab_runtime_list` to see saved targets.
2. Use `remix_collab_runtime_status` and `remix_collab_runtime_logs` before changing commands when debugging.
3. Use `remix_collab_runtime_detect` as a dry run unless the user explicitly wants to save detected targets.
4. Use `remix_collab_runtime_set` only when the user intends to create or update a persistent command definition.
5. Use `remix_collab_runtime_run` to start or restart a target only after the target and app are clear.
6. Use `remix_collab_runtime_stop` for long-running targets that should release processes, ports, and locks.

Important rules:

- Do not treat a runtime target failure as collaboration app status failure unless the app status or worker logs directly say so.
- Do not use sandbox commands as a replacement for a persistent dev server or preview flow.
- Explain `Start` as running the target, `Restart` as replacing a running long-lived process, and `Stop` as terminating a long-running target.
- Prefer framework-specific host binding. For Next.js use `--hostname 0.0.0.0`, not `--host 0.0.0.0`.
- If a preview URL is returned without a scheme, normalize it mentally as `https://...`; direct E2B preview URLs are temporary.
- If ports, locks, or stale dev servers appear stuck, inspect status and logs, then stop or restart before changing the target command.
- Preserve the selected runtime `environment`; default to `development` only when none is specified.
