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
Keyless fleet commands silently use the machine-global active workspace; a stale one yields a misleading 401 Invalid API key #1950
Keyless agent-relay fleet ... commands (fleet nodes, fleet status) resolve the workspace key from the machine-global active workspace in ~/.agentworkforce/relay/workspaces.json when no --workspace-key / RELAY_WORKSPACE_KEY / RELAY_API_KEY is set. If that active entry is stale or rotated, the command returns 401 Invalid API key, which reads as a fleet or credential bug even though the intended workspace key is valid. workspace create and workspace switch mutate the same machine-global pointer, so one script or session silently changes what every other relay session on the box resolves to.
Impact
Hours lost diagnosing a "rotated key" or "auth split" that does not exist; scripts that create a throwaway workspace flip the active workspace for all other sessions on the host.
Evidence
2026-07-14: keyless fleet nodes 401 against a stale default active workspace while the messaging MCP (explicit key) worked (agent memory reference_relay_fleet_spawn_and_cli_scoping.md; precedence in packages/cli/src/cli/lib/sdk-client.tsresolveWorkspaceKey).
2026-09-07: workspace create/switch side effects on other sessions (agent memory reference_relay_workspace_create_gotchas.md).
Always pass --workspace-key or set RELAY_WORKSPACE_KEY; snapshot workspace list and workspace switch back after creating a workspace.
Expected
When a command falls back to the global active workspace, say so, and on 401 name the workspace it used ("key for active workspace default was rejected; pass --workspace-key or workspace switch").
Activity
fix(cli): address review feedback on AgentWorkforce#1950