feat(workspace): turn workspaces on by default, with `ALTIMATE_DISABLE_WORKSPACE` as the kill switch
Issue for this PR
No tracking issue. Workspaces leave the opt-in pilot.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Turns workspaces on by default. The opt-in flag ALTIMATE_WORKSPACE is retired (setting it now does nothing) and ALTIMATE_DISABLE_WORKSPACE=1 is the kill switch that turns every part of the feature off.
Because there is a kill switch, the old "pilot off" code is kept rather than deleted: every gate is inverted, so what used to run for non-pilot users now runs when the switch is set. That includes the hidden link / skill publish stubs, the 409 on the serve workspace routes, and the per-turn cleanup that takes already-synced workspace skills out of service. The five error messages that told users to "restart with ALTIMATE_WORKSPACE unset" to edit a workspace-managed MCP entry by hand now name the kill switch. The serve workspace routes' 409 now says "Workspaces are turned off on this server because ALTIMATE_DISABLE_WORKSPACE is set." instead of "Workspace mode is not enabled for this server."
What reaches every user signed in to Altimate with this change:
- Binding lookups. Each process asks the backend whether the project is linked: 2 requests (by git remote, then by project path) for an unlinked project, 1 for a project linked by remote. They send the
originURL (credentials stripped) and the absolute project path. The "not linked" answer is cached for 5 minutes in memory, so a long-running TUI orserverepeats it at most every 5 minutes, but every separatealtimate-code runlooks up once. A failed lookup (backend unreachable) is not cached, so it is retried every turn; the turn waits at most 2s for it. - The post-scan workspace prompt during onboarding: after the first-launch scan gate's "Yes", a dialog offers to set up or link a workspace (Skip hides it for 7 days per project and account).
- The
/workspacemenu, the sidebar tile,link,skill publish, and thememory_refreshtool.
Users not signed in to Altimate make no workspace requests.
Other changes:
test/preload.tssets the kill switch for the whole suite, and the workspace tests clear it and restore it. This keeps the test environment as it was onmain: with workspaces on by default, unrelated test files left background skill syncs running against the real network after theirfetchstub was restored, which hung later tests.launch-resolve.test.tsnow restores the switch instead of deleting it.- New
test/altimate/workspace/kill-switch.test.tschecks the default (unset means on), the switch, and that the retired variable is ignored. It fails if the old opt-in check is put back. - Docs:
usage/cli.mdandconfigure/skills.mddrop the pilot wording and document the switch.
Not in this PR: the CHANGELOG entry, which goes in the release PR as usual. It needs to say that workspaces are now on for everyone, including the lookup traffic above.
Known leftovers:
- Synced skills keep
alwaysApply/applyPathsfrom their frontmatter, as they did in the pilot. With default-on, anyone who can upload a skill to a workspace can add standing instructions to every linked member's prompt. This was approved for the pilot and has been re-approved for this change; the note inskill-sync.tsis unchanged.
How did you verify your code works?
- Typecheck (
packages/opencode,packages/core) and the strictaltimate_changemarker check pass. - The 24 affected test files pass (824 tests). The full
packages/opencodesuite was run twice on this branch and once onmain: no failures unique to this branch.flushPendingSyncs waits for a sync…fails onmaintoo, and therunsubprocess tests are flaky on both. - End-to-end against a live account with a binary built from this branch, in both modes. Approach and results are in a comment below.
Updated for current main (5 Oct). main was merged in: 10 commits, including v0.12.4 and several workspace changes.
- Conflict: only
docs/usage/cli.md. Kept this PR'sALTIMATE_DISABLE_WORKSPACErow andmain's newALTIMATE_WORKSPACE_WEB_URLrow, and dropped the old opt-in row. - Nothing new bypasses the off switch. This PR removes the
Flag.ALTIMATE_WORKSPACEgetter, so any new code still reading the old opt-in would fail to compile, and the typecheck is clean. - Stale test from
mainfixed.release-v0.12.4-adversarial.test.tsturned workspaces "off" by deletingALTIMATE_WORKSPACE, which no longer does anything, and expected the old opt-in message. It now usesALTIMATE_DISABLE_WORKSPACE, and checks that the message names the switch to unset (33 pass). - Changelog: historical entries mentioning
ALTIMATE_WORKSPACE=1describe past releases and are left as they are.
Smoke tests on a binary built from the merged branch, in a sandbox repo linked to a live test workspace with one custom skill:
| Mode | link / skill publish | Agent: "which workspace, which skills?" |
|---|---|---|
| Default (no variables set) | real commands; skill publish reaches the publish path | names workspace id 35 and its one skill |
ALTIMATE_DISABLE_WORKSPACE=1 | both refuse: "Workspaces are turned off because ALTIMATE_DISABLE_WORKSPACE is set…", exit 1 | no workspace known, and the synced workspace skill is not offered |
ALTIMATE_WORKSPACE=0 only (old variable) | on, so the old variable is ignored | workspace and skill back |
| No Altimate account, unlinked repo, default | n/a | run answers normally; no workspace output on stderr and no workspace warnings in the log |
Not covered by the smoke tests: the TUI link prompt. In code it appears only after project_scan, with an Altimate account configured and the switch unset, so users without an account never see it.
Full packages/opencode suite on the merged branch: 14,479 pass, 8 fail.
- 6 are MCP tests reading the developer's real
~/.claude.json(#1386). silent-turn.test.tsis flaky onmaintoo (2 of 6 isolated runs fail there).--trace writes a session trace artifactpasses 4 of 4 when run alone, here and onmain.
Screenshots / recordings
None; TUI checks were captured as text (see the E2E comment).
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
🤖 Generated with Claude Code
https://claude.ai/code/session_018fJ3X7pcGT4R9yzjsJnqsV
Summary by CodeRabbit
- New Features
- Workspace support is enabled by default, including project linking, skill publishing and syncing, memory syncing, and workspace tools.
- Set
ALTIMATE_DISABLE_WORKSPACEto a value other than empty,0, orfalseto turn off workspace features. Existing project links are preserved but not applied while disabled; workspace-provided skills and agent context are unavailable. Unset the variable to restore workspace behavior. - Workspace skill synchronization can run in the background when no snapshot is available, allowing the current turn to proceed without waiting. Pending sync work is also included in the shutdown flush.
- Documentation
- Updated CLI and workspace guidance to explain the default-on behavior and how to disable workspace features.