Skip to content

workspace(fix): Preserve the daemon environment - #190

Merged
tony merged 2 commits into
mainfrom
workspace-daemon-env
Dec 6, 2026
Merged

tony merged 2 commits into
mainfrom
workspace-daemon-env

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #176.

What changed, and why

tmux can copy the planning client’s environment into a new session. Workspace now retains the daemon environment when creating a session, then applies the manifest’s per-window overrides. Programs in separate windows verify both values.

Checks run

The regression reads the variables from inside the launched programs. The complete Workspace suite ran on pristine tmux 3.3 and upstream 3.8.

  • Workspace on tmux 3.3 passed in 5.32 s.
  • Workspace on tmux 3.8 passed in 2.67 s.

Review evidence

Workspace owns the environment passed when it creates a session. The regression starts two window programs and reads their environments, including an explicit per-window override.

With the topic tests and the runtime code from d64ebc0dc, the focused check failed. The window program read client where it expected the daemon’s value daemon. The focused test failed in 3.86 s and passed on f5982bf5f in 3.53 s.

mix test --warnings-as-errors --max-cases 2 --seed 624498 test/workspace_test.exs:305 from packages/workspace

Tool use

Codex extracted this change from #169 and ran the checks above on the topic branch. A separate Codex reviewer checked the component boundaries and the two corrected test fixtures.

tony added 2 commits December 5, 2026 18:08
why: tmux copied update-environment entries from the planning client
when it created a session. Window programs could lose the daemon's
values before their manifest overrides were applied.

what:
- Leave the daemon environment in place when creating a session.
- Check inherited and overridden values inside the window programs.
@tony
tony force-pushed the workspace-daemon-env branch from d339596 to f5982bf Compare December 6, 2026 00:09
@tony
tony merged commit b8bfd37 into main Dec 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace session creation loses inherited daemon values

1 participant