You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: a browser opened by afx from a Codev terminal closes when the session ends #1961
On Windows, a browser that Codev opens from inside a Codev terminal closes when that terminal's session ends.
afx workspace start, afx attach and afx tower connect (cloud login) call openBrowser() (packages/codev/src/agent-farm/utils/shell.ts), which launches the default browser as a child of the afx process. When afx runs in a Codev terminal, that child is inside the session's Job Object. After #1915 (PR #1959) a session job allows no break-away, so:
A browser is already running: the URL is handed to the existing browser process, which is outside the job. Nothing changes.
No browser is running: the new browser process is a member of the session job. It is ended when the session ends or is cleaned up, with no message.
PR #1959 documents this in DEPENDENCIES.md; it does not change it.
Expected
A browser opened by an afx command outlives the session the command was typed in, as it does on macOS and Linux.
Proposed fix
On Windows, when afx is running inside a session job, start the browser outside the job, the way afx tower start already creates Tower through CIM (agent-farm/commands/windows/tower-lifecycle.ts). Outside a session job, and on other platforms, keep the current open() call.
Scope
The three openBrowser() callers: commands/start.ts, commands/attach.ts, commands/tower-cloud.ts.
With no browser running, afx workspace start from a Codev terminal on Windows opens the dashboard, and the browser is still open after that session is closed.
A Windows test shows the launched process is not a member of the session job.
No behaviour change on macOS or Linux, or on Windows outside a session job.
Activity