stablyai / stablyai/orca

[Bug]: Resuming an agent session for the floating workspace does not open/enter the floating workspace

Open
#11,640 0 comments 0 reactions 1 assignee Assigned to @nwparker View on GitHub
bug
Dominant language
TypeScript
Stars
69.7k
Forks
4.5k
Avg merge
15h 28m
Merged PRs (30d)
471

Description

### Summary

Resuming an agent session that belongs to (or is targeted at) the **floating workspace** does not actually enter/open the floating workspace. The session is either resumed elsewhere, queued without revealing the floating panel, or fails to land in the floating surface the user expects.

### Steps to reproduce

1. Open Orca and create/run an agent session inside the **floating workspace** (floating terminal panel).
2. Leave or close the floating workspace so the main worktree view is active again.
3. Open **Agent Session History** (AI Vault / session list).
4. Find that session and choose **Resume** (e.g. Resume in Worktree / resume into its original workspace).

### Expected

- Orca opens/shows the **floating workspace** overlay.
- The resumed agent session appears as a tab **inside** the floating workspace.
- Focus lands on that resumed session in the floating surface.

### Actual

- Resume does **not** go into the floating workspace.
- The floating panel is not opened/revealed, and the user stays on the main workspace (or the session is not attached to the floating surface as expected).

### Suspected code path

Session History resume activation currently only handles folder + normal worktree targets:

```ts
// src/renderer/src/components/right-sidebar/ai-vault-session-launch-actions.ts
function activateAiVaultResumeWorkspace(workspaceId: string): void {
const workspaceScope = parseWorkspaceKey(workspaceId)
if (workspaceScope?.type === 'folder') {
activateAndRevealFolderWorkspace(workspaceScope.folderWorkspaceId)
return
}
activateAndRevealWorktree(workspaceId)
}
```

There is no branch that opens/reveals the floating workspace (`FLOATING_TERMINAL_WORKTREE_ID` / floating terminal open state).

Related gate: `isKnownAiVaultResumeWorkspaceTarget` only recognizes folder workspaces and repo worktrees in `worktreesByRepo`, so the synthetic floating worktree id may not be treated as a valid resume target either:

```ts
// src/renderer/src/components/right-sidebar/ai-vault-session-resume.ts
// folder → folderWorkspaces lookup
// else → getIndexedWorktreeMap(state.worktreesByRepo).has(worktreeId)
```

### Impact

Users who run agents in the floating workspace cannot reliably return to them via Session History resume. That breaks the floating-workspace agent workflow and forces manual reopen + reattach.

### Notes / acceptance criteria

- Resuming a session whose original/target workspace is the floating workspace should:
1. open the floating workspace if closed
2. create/attach the resumed tab under `FLOATING_TERMINAL_WORKTREE_ID`
3. focus that tab in the floating panel
- Regular worktree / folder resume behavior should remain unchanged.
- Cover SSH and local hosts if floating sessions are host-scoped the same way as other resume targets.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.