Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .memory/workspace-isolation-backlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Workspace isolation backlog — 2026-11-02

Revalidated on main `9b2875d65f316265323d3d06a73904fbe00e2277` after #696. Findings 6.2 (populated No workspace copy/fork sharing a private folder/access) and 6.1 (first-send folder allocation invalidating the selected skill) were confirmed current by behavioral repros.

A shared main-process reservation now excludes concurrent assignment of an empty hidden home until its owning operation and failure cleanup settle. Desktop first-send, copy/fork and supported Remote creation all use this reservation; unknown commit outcomes keep it until restart/reconciliation.

The shared fork service now assigns a fresh hidden workspace through the existing workspace application service, admits both source and target, and releases only unowned targets on known failure. Unknown commit outcomes retain the target for reconciliation. Named-workspace forks, Bots, shared No workspace memory, existing shared copies and the legacy shared home remain unchanged; newly copied legacy chats get independent folders. Desktop workspace metadata is refreshed before navigating. iOS validates fork lineage rather than workspace equality; Android accepts the returned workspace already.

Desktop private first-send allocation now happens inside the main-owned first-message committer after durable-receipt replay checks. Its fingerprint keeps the submitted source identity; skill resolution keeps the original selection authority while the prepared turn and persisted chat own the destination. Both workspace admissions cancel/drain preparation. No Remote wire change or runtime network fetch was added.

Focused source tests reproduce the original folder sharing and cover file/access isolation, named-workspace sharing, refusal cleanup, skill handoff and replay. Native fork tests exercise returned private workspace IDs. Validation and PR details are recorded in the working chat.

## PR #714 integration follow-up

The original published head `c8295f11ba1856ca9b3ab0f5f182260a8f0ad465` fails ordinary Electron startup IPC: after real onboarding, `chats:create` throws while reading `requiresAppendReconciliation` from an undefined `llmClient`. This reproduces Linux CI job 125629914575 (run 41548473303), independently of the separate UUID/privacy-filter issue owned by PR #718. A real registered-IPC control was added to the existing No workspace E2E suite; no production correction has yet been made at this checkpoint.

Current investigation compares that head, main `c975f6e77760d183e4fa548785ffde49423b5cb5`, and #714 merged with that main (`b22394caefda87835558cd52a1fb253ddb8a40f2`). Main was merged normally, retaining Remote revision 53 and the complete package test chain. Keep #714 and #716 open, preserve their branches, and leave hosted CI management to the coordinating chat. Do not implement the #718 privacy correction here; its reviewed branch may be merged as an explicit dependency for validation if needed.

The real create/read startup control passes on main, and the initialization failure persists on the merged #714 head. Resolving the workspace service lazily inside the new first-send/fork callbacks fixes the failure; those callbacks keep the same reservation/cleanup behavior. Before introducing any privacy dependency, the startup control, ordinary No workspace second send, and Workspace settings follow-up send all passed in Cua Space with zero retries.

The reviewed #718 head `c5d372c3fbacc1120b9966c88423f22a6d2d309b` was merged normally as an explicit dependency, preserving its owner-bound read implementation; the only textual conflict combined two imports. Integrated validation passes 196 focused tests, root/E2E TypeScript, scoped ESLint and React Doctor, plus two iOS fork tests on iOS 26.5 and two Android fork tests. Rendered coverage verifies new private fork/copy folders, independent access, source-file isolation and follow-up sends. Final rendered-suite evidence and exact published head belong in PR #714; the coordinating chat owns hosted exact-head CI.

Final local rendered coverage: 48 distinct Electron cases pass with zero retries, including 32 of the 33 cases that failed in the original Linux job. The selected-skill test initially inspected the automatic title request; after correcting its request assertion, its focused run passes. One worktree lifecycle case cannot reach its assertions in the gVisor Cua Space: `statfs` reports about 8 EiB free (`availableBytes=9223372034644681000`, not a safe integer), so the unchanged capacity guard refuses `git:createWorktree`. The exact same case fails with the same capacity error on unchanged main `c975f6e77760d183e4fa548785ffde49423b5cb5`. Preserve that gap for hosted Linux x64/macOS validation; do not bypass the capacity guard or weaken tests. PR #716 remains untouched at `f6710cb9bb93eced7a198b47805a665efb6f8a79`.
2 changes: 1 addition & 1 deletion PRODUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Aiden combines a native-feeling desktop workspace with Pi-based agent extensibil

## Operating Context

The primary application is an Electron desktop app for macOS and Linux. People work in folder-backed workspaces or in No workspace chats (global settings, with a hidden per-chat folder Aiden manages), use chats and Bots, review files and Git changes, run tools with explicit permissions, and may connect native iOS or Android clients to a paired desktop for remote access.
The primary application is an Electron desktop app for macOS and Linux. People work in folder-backed workspaces or in No workspace chats (global settings, with a hidden per-chat folder Aiden manages), use chats and Bots, review files and Git changes, run tools with explicit permissions, and may connect native iOS or Android clients to a paired desktop for remote access. Copies and forks keep independent private folders and access.

## Capabilities and Constraints

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ I don't come from a coding background. I'd been bouncing between the coding agen
- **Headless server** - `aiden serve` runs Aiden on a macOS or Linux box with no display, such as a server you reach over SSH, for paired phones and Macs: chats, Bots, scheduled tasks and Telegram run there, and it prints a pairing code at startup. `aiden service install` keeps it running across reboots and asks whether phones reach it on the local network, over Tailscale, or both. It is a server with short admin commands, not an interactive terminal app; build it from a clone (see [the server guide](packages/cli/README.md)). It can also enable durable Bot sessions with `aiden bots enable-durable` and a restart; migration preserves legacy conversations and journals in a private recovery backup ([supported capabilities and recovery](docs/cli-durable-bots.md)).
- **Workspaces and managed worktrees** - use folders, scratch workspaces, or isolated managed worktrees with three access levels, workspace-scoped tools, Ask-mode approvals, guarded creation/deletion, and crash-aware cleanup. A new chat can start in its own worktree on its first message, from the desktop or from Aiden On The Go. If a workspace's folder is moved, renamed or deleted, Aiden names it above the composer and keeps your message until the folder is back. If a managed worktree's folder is deleted or moved while its branch is still there, the chat offers **Restore worktree** (checks the branch out again in the same place, with its commits; uncommitted changes are gone, so a folder that was only moved or is in the Trash is better put back, then **Check again**) or **New chat in main checkout** (carries your unsent message).
- **Inbox sidebar (Beta)** - switch the sidebar from **By workspace** or **Recent only** to **Inbox**, in the sidebar's Organize menu or Settings → Appearance → Sidebar. Chats and Bots that wait on you (an approval, a question, a failed run), on this Mac or a paired one, sit in **Needs you** with how long they've waited; new replies sit in **Updates** with a one-click Mark read; the past week sits in **Earlier**; and running chats collect in a **Working** shelf at the bottom. A row's ••• or right-click menu can **Pin** it to a **Pinned** group, **Mark done** to hide it until something new arrives, or **Snooze** it until later today, tomorrow or next week (an approval, a question, a failed run or your own reply wakes it early); each action shows a short Undo, and a search still finds Done and snoozed chats, with **Mark not done** and **Unsnooze** in their menus. Rows hold still while your pointer or keyboard is in the list, and opening one lands on its pending card. The Dock icon (the launcher icon on Linux) shows how many rows wait in Needs you, counting paired computers only while they're online; turn it off with **Show Needs you count on the Dock icon** (**on the app icon** on Linux) in Settings → Appearance → Sidebar. Also available in Aiden On The Go for iPhone and Android; see the [Inbox sidebar plan](docs/plans/inbox-sidebar-plan.md).
- **Chats without a workspace** - choose **No workspace** to just chat with your global settings. The chat is listed under **Chats** in the sidebar and still runs in its own hidden folder in Aiden's app data, so files, skills and Git work; deleting the chat moves that folder to the Trash. Paired iPhones and Android phones list them the same way and can start one too; see [chats without a workspace](docs/no-workspace-chats.md).
- **Chats without a workspace** - choose **No workspace** to just chat with your global settings. The chat is listed under **Chats** in the sidebar and still runs in its own hidden folder in Aiden's app data, so files, skills and Git work; deleting the chat moves that folder to the Trash. Paired iPhones and Android phones list them the same way and can start one too; see [chats without a workspace](docs/no-workspace-chats.md). Copies and populated forks get a separate empty folder and independent access.
- **Models and the Model Pad** - choose from Pi's native hosted-provider catalog, local Ollama or LM Studio models, and declarative compatible endpoints. Arrange a personal capability-and-pace map, optionally enrich hosted models with explicitly fetched Artificial Analysis scores through a benchmark-only OpenRouter key, and keep benchmark evidence visibly separate from runtime limits and availability. Each chat keeps its own model: picking one in a chat that already has messages changes only that chat, while a pick in a new chat sets the model new chats start with. The iOS and Android apps follow the same rule for the Mac they are paired with. Phones follow refreshed desktop choices unless that chat has an unsent user pick.
- **Usage limits and spending limits** - when a provider's rate limit or plan window turns a reply away before it starts, chats, Bots and routines wait for the reset (up to a longest wait you choose, 6 hours by default), send one test request, then resume one at a time with the same model; a "Waiting for … usage limit · next try at 3:40 PM" row offers **Retry now**. Dollar limits per chat, per Bot per month and per routine run count only pay-as-you-go API keys, and a reached limit offers **Allow $X more**, also from Aiden On The Go. The owning desktop tracks limits; paired phones can respond to Bot spending notices. See [usage limits and spending limits](docs/usage-limits-and-spending.md).
- **Terminal, Git, and review** - keep a terminal drawer beside the conversation, inspect files and diffs in Environment, edit with dirty-file protection, compare branches, commit or push checked snapshots, and open the workspace in a discovered external editor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4766,6 +4766,7 @@ class AidenChatTest {
model.fork("user-2", AidenChatForkPosition.BEFORE)

assertEquals(fork.id, withTimeout(5_000) { model.forkNavigation.first { it != null } })
assertEquals("private-fork-home", harness.cache.loadChat("instance-fork", fork.id)?.workspaceId)
val request = withContext(Dispatchers.IO) { forkRequests.poll(5, TimeUnit.SECONDS) }!!
assertEquals("source-r1", request.getHeader("If-Match"))
val body = json.parseToJsonElement(request.body.readUtf8()).jsonObject
Expand Down Expand Up @@ -5184,7 +5185,7 @@ class AidenChatTest {
)

private fun forkChat(lineage: AidenChatForkLineage) = AidenChat(
id = "chat-fork", workspaceId = "workspace-fork", title = "Parser review",
id = "chat-fork", workspaceId = "private-fork-home", title = "Parser review",
messages = listOf(
AidenChatMessage("fork-user-1", AidenChatRole.USER, "Review the parser.", createdAt = Instant.EPOCH),
AidenChatMessage("fork-assistant-1", AidenChatRole.ASSISTANT, "Starting.", createdAt = Instant.EPOCH)
Expand Down
2 changes: 1 addition & 1 deletion docs/aiden-remote-api-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ Public keys in `info` are their base64url strings. The host uses a fresh ephemer

### Fork (contract revision 21, `chat-fork-v1`, `chat-fork-summary-v1`)

Fork creates a new regular chat in the same workspace from one message of an existing one. The source is never changed. Bot chats are not forked (`404 not_found`). A host that implements forking advertises `chat-fork-v1`; one that can also summarize the rest of the source advertises `chat-fork-summary-v1`. Without a feature its routes answer `404 not_found`.
Fork creates a new regular chat from one message of an existing one. Named workspace chats keep their workspace. A No workspace chat gets a fresh hidden workspace with an empty private folder and independent Ask first access; clients must use the returned chat's workspace ID rather than requiring the source ID. The source is never changed. Bot chats are not forked (`404 not_found`). A host that implements forking advertises `chat-fork-v1`; one that can also summarize the rest of the source advertises `chat-fork-summary-v1`. Without a feature its routes answer `404 not_found`.

- `POST /chats/{chatId}/fork` (`chat:write`; requires `If-Match` with the chat revision and an `Idempotency-Key`). The body is `{messageId, position, summary?}`:
- `position: "after"` keeps everything through `messageId`, which must be a settled assistant reply.
Expand Down
4 changes: 4 additions & 0 deletions docs/no-workspace-chats.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Each No workspace chat gets its own folder in Aiden's app data, named like a scr

The folder is created when the chat is first sent, so a draft you abandon leaves nothing behind. If the folder goes missing (cleared app data, a manual delete), Aiden makes it again, empty, on the next message. The model is told the folder is private to the chat, so it can use it for downloads, clones and scratch files.

Copying a chat or forking from a reply gives the new chat a separate, empty private folder and its own **Ask first** access setting. Conversation history is copied; files and workspace access are not shared. This also applies when copying an older chat from the migrated shared home. Previously created shared copies keep their existing files and access; Aiden does not move or duplicate that existing data automatically.

A skill selected before the first send is validated in the draft's original workspace, while its one-turn instructions run in the newly assigned private folder.

The chat's header chip reads **No workspace**; its menu can still show the folder in Finder or a file manager.

## Settings, access and memory
Expand Down
5 changes: 4 additions & 1 deletion ios/AidenOnTheGo/Features/Remote/AidenChatFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,10 @@ final class AidenChatViewModel {
if forkAttempt == attempt { forkAttempt = nil }
guard !isRemoved, coordinator.isCurrent(context) else { return nil }
let forked = result.chat
guard !forked.isBotChat, forked.workspaceId == source.workspaceId else {
guard !forked.isBotChat,
forked.forkedFrom?.chatId == source.id,
forked.forkedFrom?.messageId == attempt.request.messageId,
forked.forkedFrom?.position == attempt.request.position else {
presentedError = String(localized: "Aiden returned a conversation that is unavailable in Workspaces.")
coordinator.haptics.play(.error, scope: hapticScope)
return nil
Expand Down
Loading
Loading