feat(cli): named daemon sessions for concurrent use (--session / VIBIUM_SESSION) - #207
Open
paulsmith wants to merge 11 commits into
Open
feat(cli): named daemon sessions for concurrent use (--session / VIBIUM_SESSION)#207paulsmith wants to merge 11 commits into
paulsmith wants to merge 11 commits into
Conversation
added 7 commits
July 4, 2026 16:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-shot CLI commands proxy through a per-host daemon that was previously a singleton (fixed
vibium.sock/vibium.pid/\\.\pipe\vibium), so concurrent shell scripts shared one browser and stomped on each other's page state. This PR namespaces the daemon per session:VIBIUM_SESSION=<name>env var (resolved in thepathspackage, same precedent asVIBIUM_CACHE_DIR) or the new global--session <name>flagvibium-<name>.sock), PID file, Windows pipe (\\.\pipe\vibium-<name>), daemon process, browser, and idle timeoutdaemon statusreports the session (text adds asession:line; JSON gains"session")[A-Za-z0-9_-]{1,64}; empty = default session, whose paths are byte-for-byte unchangedUsage
New how-to guide:
docs/how-to-guides/concurrent-cli-sessions.md.Testing
internal/pathsunit tests (default paths unchanged, session suffixing, validation)tests/daemon/sessions.test.js(wired intotest-daemon): two concurrent daemons with separate PIDs/sockets, stop isolation, env-var routing, session-scoped auto-start, invalid-name rejection — 5/5 greengo test ./...,test-cli,test-js-process,test-js-async(265),test-mcp(47),test-python(384)test-daemonfailures on main (tests exercise aquitcommand and arg shapes the binary doesn't implement — tracked separately);test-javanot run locally (no JVM on the dev host); intermittent tsup DTSEBADFbuild flake under Node 24 (reproduces on main)Notes
--session ''cannot clear an env-setVIBIUM_SESSION(useunset); flag help doesn't spell out flag-beats-env precedenceos.Remove+ rebind); per-session namespacing reduces real-world contention rather than adding it🤖 Generated with Claude Code