Skip to content

chore(workspaces): stop creating isolated workspaces; existing ones keep running (backport #297) - #153

Open
HaukeSchnau wants to merge 2 commits into
mainfrom
gitea-pr/298
Open

HaukeSchnau wants to merge 2 commits into
mainfrom
gitea-pr/298

Conversation

@HaukeSchnau

Copy link
Copy Markdown
Owner

Mirror of schnau/t3code#298 for CodeRabbit. Discuss and merge it on Gitea; this pull request closes when that one does.

Isolated (agent-exec) workspaces caused incidents from Oct 6 to Nov 3 while they were the default, and none since they became opt-in. Nothing has registered a new one since Oct 21. This stops T3 from creating isolated workspaces and separate projects, and keeps the existing agent-exec registrations running.

Backport of #297 to `main`, stacked on #290 (the directory-copy backport); merge that first.

## What goes

- The `isolated` and `profile` launch options (`ManagedWorkspaceLaunchStrategy`), the composer's **New isolated workspace** item and its Familiar/Minimal setup on web and mobile, and their strings in every locale.
- Isolated creation in `IsolatedWorkspaces.ts` and `ManagedWorkspaces.ts`. A separate project's new workspaces are now ordinary host workspaces; only its own threads run in its registration.
- The agent-facing `isolated:true`/`profile` sentences in `orchestrationInstructions.ts` and the `t3_thread_launch` description (`agentContextBudget.json` re-measured).
- agent-exec's `create`, `fork` and `collect` subcommands, their helpers (repository discovery, fork, transport refs, legacy `t3.json` rewrite) and their tests.

## What stays

- The 83 agent-exec registrations on srv-1, srv-2 and dev-hauke keep resuming: `SeparateProjectRegistry`, `ProjectExecution`, the adapter hooks, and agent-exec's `auto` routing, bridge, network, process, devenv and world parts are untouched. Deleting such a workspace still runs `retire --remove-checkout`.
- agent-exec's `filesystem` subcommand, the directory view in `project_files.py` and the `agent-workspace-files@` unit. Six of the srv-2 registrations are directory-layout workspaces that read their files through that unionfs view, so removing it would stop them resuming. They go after those six are retired. unionfs-fuse and its quiet patch stay in `nix/agent-exec.nix`.
- `managedWorkspaces.isolated` stays in the capability, always `false`, because installed clients built before this require the field.
- Saved launches with `isolated` or `profile` still decode; the fields are dropped (mobile's queued messages keep them, and the start-turn builder ignores them). Read-only checks found no scheduled task with `isolated`, `profile` or a `workspace` strategy on tower, srv-1, srv-2 or dev-hauke, and no setting that mentions isolation.

## What a user sees

- In a jj project the composer's workspace menu offers **New workspace** and **Project checkout**; **New isolated workspace** and its clean-room setup are gone (web and mobile).
- An older client or a queued mobile message asking for an isolated workspace gets a plain jj workspace. In a plain folder without tracked Git folders it gets #288's refusal, which is safer than silently running a clean-room request in the real folder.
- Existing isolated workspaces and separate projects look and behave as before.

## Evidence

- On this backport: `vp run check:changed origin/main --concurrency 1` passes every step (unused patches, format, lint, knip, graphql, typecheck of 43 packages, 23 test files, React Compiler for 13 files). Conflicts were main's different `ManagedWorkspaceSelector`, `BranchToolbar` and web catalogs (W2's removals reapplied to main's versions, catalogs regenerated, `i18n:check` passes) and the measured `agentContextBudget.json`.
- On #297: `vp run check:changed origin/redesign --concurrency 1`: unused patches, format, lint, knip, graphql, typecheck of 43 packages and 23 test files pass. The React Compiler step's `ChatView.tsx` case hit its 60 s timeout on a loaded host (load average 17–24 on 12 cores) and passes when run alone.
- agent-exec: `python3 -m unittest discover -p 'test_*.py'` passes (69 tests).
- Real web client on a launcher host (`T3CODE_EXECUTION_LAUNCHER` set): a jj project's menu offers only **New workspace** and **Project checkout**, and a `--worktree` launch made a host jj workspace with no agent-exec registration. Screenshot on #297.
- mcp-tool-use evals: one full run per model on this text (Sonnet 5.5: bad 85% of 308, control 98% of 121, guard 91% of 196, $27.37; Opus 5.5: bad 91% of 316, control 98% of 122, guard 92% of 190, $51.31). Every failing case that touches launches, handoffs or workspaces was rerun against the base text with 3 to 6 samples per side: same pass rates within noise (`tt-another-thread-worktree`, `thread-send-*`, `DISC-01` and `feedback-auto-wrong-result` fail on the base text too). The other failures are browser, preview, secret, feedback and device cases this change does not touch. The touched cases match #288's text on both models. `clean-room-thread-opts-into-isolation` is removed. `delegates-then-new-thread-with-model` dropped to 16/26 on Opus because agents that read the delegate threads got the runner's unrelated default thread; the case now mocks `t3_thread_read` with the delegates' own findings, and both texts pass 12/12.

## Review

Sol's open items: S4 says an older isolated request for a plain folder without tracked Git folders now fails preparation instead of running. Declined: no saved launch asks for isolation on any host, the failure creates nothing and says how to proceed, and running a clean-room request in the real project folder would do the opposite of what was asked. S3 (the eval mock answers in call order) declined as a nit: no sample read the delegates out of order, and per-thread mocks need runner changes. Fixed: S1 (mobile outbox kept the retired fields; the builder now ignores them), S2, S5.

Reviewed with sol-loop: 3 rounds with GPT 6.2 Sol. Sol verdict: approved

Implemented by Claude Opus 5.5 in Claude Code, run from T3 Code.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-01T20:09:35.871411Z
We couldn’t complete this review. Comment @codex review to try again.
b97de1f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 148b3f8 and 461f2ad.

Files selected for processing: 75

  • apps/mobile/src/features/settings/scheduledTaskDraft.test.ts
  • apps/mobile/src/features/settings/scheduledTaskDraft.ts
  • apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
  • apps/mobile/src/features/threads/NewTaskWorkspacePickerRouteScreen.tsx
  • apps/mobile/src/features/threads/managed-workspaces.ts
  • apps/mobile/src/features/threads/new-task-flow-provider.tsx
  • apps/mobile/src/i18n/translations/de.json
  • apps/mobile/src/i18n/translations/en.json
  • apps/mobile/src/i18n/translations/es.json
  • apps/mobile/src/i18n/translations/fr.json
  • apps/mobile/src/i18n/translations/ja.json
  • apps/mobile/src/i18n/translations/ko.json
  • apps/mobile/src/i18n/translations/pt-BR.json
  • apps/mobile/src/i18n/translations/ru.json
  • apps/mobile/src/i18n/translations/sv.json
  • apps/mobile/src/i18n/translations/zh.json
  • apps/mobile/src/lib/projectThreadStartTurn.test.ts
  • apps/mobile/src/lib/projectThreadStartTurn.ts
  • apps/mobile/src/state/thread-outbox-model.ts
  • apps/server/src/environment/ServerEnvironment.ts
  • apps/server/src/mcp/ManagedWorkspaceHandoff.ts
  • apps/server/src/mcp/toolkits/project/tools.ts
  • apps/server/src/mcp/toolkits/worktree/tools.ts
  • apps/server/src/orchestration-v2/ThreadLaunchService.test.ts
  • apps/server/src/orchestration-v2/ThreadLaunchService.ts
  • apps/server/src/provider/agentContextBudget.json
  • apps/server/src/scheduledTasks/ScheduledTaskService.interval.test.ts
  • apps/server/src/scheduledTasks/ScheduledTaskService.schedule.test.ts
  • apps/server/src/scheduledTasks/ScheduledTaskService.ts
  • apps/server/src/storageCleanup.ts
  • apps/server/src/workspace/DirectoryCopyWorkspaces.ts
  • apps/server/src/workspace/IsolatedWorkspaces.ts
  • apps/server/src/workspace/JjWorkspaces.ts
  • apps/server/src/workspace/ManagedWorkspaces.test.ts
  • apps/server/src/workspace/ManagedWorkspaces.ts
  • apps/web/src/components/BranchToolbar.tsx
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/ManagedWorkspaceSelector.tsx
  • apps/web/src/components/chat/useComposerSend.ts
  • apps/web/src/components/settings/scheduledTasksSettings.logic.test.ts
  • apps/web/src/components/settings/scheduledTasksSettings.logic.ts
  • apps/web/src/i18n/translations/de.json
  • apps/web/src/i18n/translations/en.json
  • apps/web/src/i18n/translations/es.json
  • apps/web/src/i18n/translations/fr.json
  • apps/web/src/i18n/translations/ja.json
  • apps/web/src/i18n/translations/ko.json
  • apps/web/src/i18n/translations/pt-BR.json
  • apps/web/src/i18n/translations/ru.json
  • apps/web/src/i18n/translations/sv.json
  • apps/web/src/i18n/translations/zh.json
  • apps/web/src/lib/managedWorkspaces.ts
  • docs/internals/project-execution.md
  • docs/user/project-settings.md
  • docs/user/separate-projects.md
  • docs/user/thread-sidebar.md
  • evals/mcp-tool-use/cases/orchestration.ndjson
  • native/agent-exec/README.md
  • native/agent-exec/agent_exec.py
  • native/agent-exec/project_files.py
  • native/agent-exec/test_agent_exec.py
  • native/agent-exec/test_workspaces.py
  • native/agent-exec/workspaces.py
  • packages/client-runtime/src/scheduledTaskWorkspace.test.ts
  • packages/client-runtime/src/state/workspaces.test.ts
  • packages/client-runtime/src/state/workspaces.ts
  • packages/contracts/src/workspace.ts
  • packages/provider-core/src/server/orchestrationInstructions.ts
  • patches/nix-flake-packaging.md
  • patches/one-time-scheduled-tasks.md
  • patches/separate-project-environments.md
  • patches/storage-cleanup.md
  • patches/workspaces.md
  • patches/worldfs.md
  • patches/worlds.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…e project

A new workspace for a plain folder copied the folder. Copies of large
folders failed or ran into the size limit (a scheduled task retried a
174 GiB copy every day, and launches failed when du timed out), and no
copy workspace exists on any host.

Plain folders now take upstream's path: a folder that tracks Git folders
or has a worktreeLayout gets upstream's task folder as before, and any
other plain folder gets upstream's answer for a folder with nothing to
check out. The composer offers managed workspaces only in jj checkouts,
and a scheduled worktree task in such a folder saves as a root task, as
upstream does.
…eep running

Isolated workspaces caused incidents from Oct 6 to Nov 3 while they were
the default, and nothing has registered a new one since Oct 21. T3 no
longer creates them or separate projects: the isolated/profile launch
options, the composer and mobile choices, the agent instructions and
agent-exec's create, fork and collect commands go.

The existing agent-exec registrations keep resuming and stay retirable
through retire --remove-checkout. The directory view (filesystem
subcommand, agent-workspace-files@ unit, unionfs) stays, because six
directory-layout workspaces on srv-2 still read their files through it.
Saved launches with isolated or profile still decode; decoding drops
the fields.
@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@HaukeSchnau

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant