From TODO.md (Refactoring, P0).
CLI commands currently resolve against the focused workspace. An agent running in a background workspace ends up sending keys or splits into whatever the user is looking at. Commands should resolve against the PROGRAMA_WORKSPACE_ID env var from the calling environment instead.
Affected: send, send-key, send-panel, send-key-panel, new-split, new-pane, new-surface, close-surface, list-panes, list-pane-surfaces, list-panels, focus-pane, focus-panel, surface-health.
Acceptance:
- with PROGRAMA_WORKSPACE_ID set, all listed commands target that workspace regardless of focus
- without it, current behavior is preserved
- socket focus policy holds: none of these steal app focus
- v2 tests cover both paths
From TODO.md (Refactoring, P0).
CLI commands currently resolve against the focused workspace. An agent running in a background workspace ends up sending keys or splits into whatever the user is looking at. Commands should resolve against the PROGRAMA_WORKSPACE_ID env var from the calling environment instead.
Affected: send, send-key, send-panel, send-key-panel, new-split, new-pane, new-surface, close-surface, list-panes, list-pane-surfaces, list-panels, focus-pane, focus-panel, surface-health.
Acceptance: