Problem
zelma instances create currently falls back to the hardcoded zellij session name zelma-main when ZELMA_ZELLIJ_SESSION is not set. This makes the CLI target a fixed session instead of the zellij session where the user is currently working.
Observed touchpoints:
internal/create/create.go: DefaultZellijSession = "zelma-main"
internal/cli/cli.go: configuredZellijSession() returns create.DefaultZellijSession
memory-bank/ops/config.md: documents ZELMA_ZELLIJ_SESSION default as zelma-main
- tests and e2e fixtures currently assume
zelma-main
Desired Behavior
When ZELMA_ZELLIJ_SESSION is set, keep honoring it as an explicit override.
When ZELMA_ZELLIJ_SESSION is not set, resolve the current attached zellij session and use that as the target for instances create / pane launch workflows. zelma-main should not be the production fallback.
Suggested Design Notes
- Add a small zellij adapter capability to discover the current zellij session from the running environment or zellij CLI, with deterministic diagnostics when unavailable.
- Keep tests free to use fixture names like
zelma-main, but avoid treating that name as a production default.
- Update help text, config docs and recovery hints so the default is described as “current zellij session”, not
zelma-main.
- Preserve explicit
ZELMA_ZELLIJ_SESSION behavior for scripts and Docker e2e.
Acceptance Criteria
instances create without ZELMA_ZELLIJ_SESSION targets the current zellij session.
instances create with ZELMA_ZELLIJ_SESSION=<name> still targets <name>.
- No production code path hardcodes
zelma-main as the default target session.
- If current session resolution is impossible, CLI returns an agent-friendly diagnostic and does not launch a pane or write registry state.
- README/help/config docs describe the new resolution order.
- Unit tests cover current-session resolution, env override precedence and failure diagnostics.
- E2E fixtures may still use
zelma-main as test data, but tests assert behavior rather than relying on a global production default.
Problem
zelma instances createcurrently falls back to the hardcoded zellij session namezelma-mainwhenZELMA_ZELLIJ_SESSIONis not set. This makes the CLI target a fixed session instead of the zellij session where the user is currently working.Observed touchpoints:
internal/create/create.go:DefaultZellijSession = "zelma-main"internal/cli/cli.go:configuredZellijSession()returnscreate.DefaultZellijSessionmemory-bank/ops/config.md: documentsZELMA_ZELLIJ_SESSIONdefault aszelma-mainzelma-mainDesired Behavior
When
ZELMA_ZELLIJ_SESSIONis set, keep honoring it as an explicit override.When
ZELMA_ZELLIJ_SESSIONis not set, resolve the current attached zellij session and use that as the target forinstances create/ pane launch workflows.zelma-mainshould not be the production fallback.Suggested Design Notes
zelma-main, but avoid treating that name as a production default.zelma-main.ZELMA_ZELLIJ_SESSIONbehavior for scripts and Docker e2e.Acceptance Criteria
instances createwithoutZELMA_ZELLIJ_SESSIONtargets the current zellij session.instances createwithZELMA_ZELLIJ_SESSION=<name>still targets<name>.zelma-mainas the default target session.zelma-mainas test data, but tests assert behavior rather than relying on a global production default.