Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devbox): add an environment comparison table and a clearer stop message (#122356)

Georges-Antoine Assiac8a24f05622
diff --git a/.agents/skills/setting-up-devbox/SKILL.md b/.agents/skills/setting-up-devbox/SKILL.md
index 6ab6b3ad7e95..54c2a426aa65 100644
--- a/.agents/skills/setting-up-devbox/SKILL.md
+++ b/.agents/skills/setting-up-devbox/SKILL.md
@@ -14,6 +14,22 @@ This skill covers the order of operations and what the help text leaves out.
People use a box in different ways: a shell or editor for general development, a remote target for a local checkout, or a host for the running PostHog app.
Work out which one the user wants, and don't start the PostHog stack unless they ask for the app.
+## Choosing an environment
+
+When the user asks whether a devbox is the right place for the work, compare it with the other two options:
+
+| | Local worktree | Devbox | Tasks sandbox |
+| ---------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Persistence after stop | Everything stays on the user's machine. | `devbox:stop` keeps the disk, including `/home`. Only `devbox:destroy` deletes it. | The sandbox is destroyed after an idle timeout: 30 minutes for background runs, 1 hour for user-created runs, 10 minutes for PostHog AI runs, and at most 2 hours with a per-task override. Interactive Modal runs snapshot `/tmp/workspace` before cleanup so a follow-up can restore it. Files outside `/tmp/workspace` are lost. |
+| Context reset | The user decides. | The user decides. Agent sessions on the box stay on its disk. | Each task starts a new agent session. A follow-up on the same task resumes that session from the snapshot or the run log. |
+| Provisioning steps | Create a worktree. Install dependencies or start the stack only when needed. | `devbox:doctor` and `devbox:setup` once per machine, then `devbox:start`. | One message creates the task. The backend provisions the sandbox, clones the repository, and starts the agent. |
+| MCP reach | The MCP servers configured on the user's machine. | The MCP servers the user configures in Claude Code on the box. | MCP Store installations: shared team installations, plus the user's personal installations for tasks they create. Built-in agent tasks get only the connections granted to that agent. PostHog Desktop can import or relay its own servers into a run. |
+| Preview URL | `localhost:8010` | Stable and PostHog-internal: `https://app--<workspace>--<coder-user>.<coder-host>`. | One URL per run, `/api/projects/<team>/tasks/<task>/runs/<run>/preview/`, on the dev-stack image. It works only while the sandbox runs. |
+| Cost | The user's machine. | An EC2 instance. Billing stops on `devbox:stop`. | Sandbox time is metered per run and counts against the team's PostHog Desktop usage limit. |
+| Best for | Work that does not need the running stack. | Long-lived state, MCP servers outside the MCP Store, a stable preview link, and agent history on the box. | Bounded one-off work that benefits from a fresh context. |
+
+A stopped box keeps its state, and `hogli devbox:start` (with `-n <label>` for a labeled box) resumes it.
+
## Get a box
Copy this checklist and track it:
diff --git a/tools/hogli-commands/hogli_commands/devbox/cli.py b/tools/hogli-commands/hogli_commands/devbox/cli.py
index f2c748144635..b7d6ec1b9c80 100644
--- a/tools/hogli-commands/hogli_commands/devbox/cli.py
+++ b/tools/hogli-commands/hogli_commands/devbox/cli.py
@@ -1604,7 +1604,9 @@ def devbox_stop(workspace: str | None, verbose: bool) -> None:
click.echo(f"Stopping '{name}'...")
stop_workspace(name, verbose=verbose)
- click.echo("Stopped. Disk preserved. Run 'hogli devbox:start' to resume.")
+ start_command = f"hogli devbox:start {workspace}" if workspace else "hogli devbox:start"
+ click.echo("Stopped. Billing for the box stops now.")
+ click.echo(f"The disk and your files stay until you destroy the box. Run '{start_command}' to resume it.")
@click.command(name="devbox:restart", help="Restart your devbox")