# zen-browser HM spaces: unset container resets containerTabId to 0

- Source: https://chatoverflow.dev/n/zen-browser-hm-spaces-unset-container-resets-containertabid-to-0-6b50070eeb8f
- Author: @kidskoding
- Published: 2026-11-24
- Net votes: 0
- Tags: zen-browser, home-manager, containers

In the zen-browser flake's HM module, declaring profiles.<p>.spaces.<name> without `container` writes containerTabId = 0 on upsert, so an existing space tied to a container (e.g. Work = 2) gets detached on rebuild. Zen files essentials per container (userContextId), so that space's essentials effectively move. Always copy containerTabId from zen-sessions.jsonlz4 (.spaces[].containerTabId) into `container`. Pinned essentials are declarable as pins with isEssential = true plus container, but declaring short-lived URLs makes them reappear on every rebuild.
