Repository navigation
Description
Problem
apps/vscode/package.json (codev-vscode 3.3.4) declares no capabilities.untrustedWorkspaces. VS Code therefore treats the extension as unsupported in Restricted Mode and does not activate it until the user trusts the folder. Net effect on first open of any repo the user has not trusted yet: the Codev sidebar is disabled, the status bar item is absent, and the Workspace Trust dialog lists Codev among "N extensions are disabled or have limited functionality". For the extension that is the point of the product, that is the wrong first impression — and it is worse than for Git/ESLint, which at least declare "limited".
Repro (stock VS Code, marketplace build, any version ≥ 1.57):
git cloneany repo you have never opened;code <repo>.- Restricted Mode banner appears; the Codev activity-bar icon is inert until Trust is clicked.
- Compare with GitLens/Prettier/Python: they activate immediately (declared support), only their workspace-provided settings are withheld.
Proposed change (manifest only)
"capabilities": {
"virtualWorkspaces": false, // or true if the sidebar genuinely works without a local FS — decide explicitly
"untrustedWorkspaces": {
"supported": "limited",
"description": "Codev works in Restricted Mode. Workspace-provided Tower connection and auto-start settings are ignored until the folder is trusted.",
"restrictedConfigurations": [
"codev.towerHost",
"codev.towerPort",
"codev.workspacePath",
"codev.autoStartTower"
]
}
}Rationale for "limited" + that list: Workspace Trust guards against a cloned repo's .vscode/settings.json driving an extension. The only codev settings a hostile repo could weaponize are the ones that (a) redirect the sidebar to another Tower (towerHost/towerPort), (b) re-root the workspace (workspacePath), or (c) launch a process on open (autoStartTower). Marking those restricted means workspace-scope values are ignored in an untrusted folder while user/global values still apply — so the sidebar, Tower status, agent list and spawn all work immediately, and the promise the declaration makes is actually true. Review the other 18 codev.* keys once and add any that resolve to a command/path.
Also add "restricted": true on those four property definitions under contributes.configuration so the Settings UI shows the lock.
Optional, only if you want the spawn action itself gated: check vscode.workspace.isTrusted in the spawn command and offer vscode.workspace.requestWorkspaceTrust() inline, rather than leaving the whole extension dark.
Acceptance
- Fresh clone opened in Restricted Mode: Codev activates, sidebar + status bar live,
afx statusreflected; the Trust dialog no longer counts Codev as disabled. - A repo carrying
.vscode/settings.jsonwithcodev.towerHost: "evil.example"does not change the Tower target while untrusted; does after Trust. vsce package/ovsxpublish unaffected (standard schema field since VS Code 1.57; engine already^1.105.0).- Extension-host test covering activation with
workspace.isTrusted === false.
Notes
- This is independent of any host: same behavior in stock VS Code, Cursor, and any fork.
- Do not "fix" this by disabling
security.workspace.trust.enabledin a host product — that only helps that host and leaves marketplace users with a dead sidebar.
Activity
amrmelsayed commentedon Sep 23, 2026
Triage from main: this is now the CANONICAL issue for the untrustedWorkspaces manifest declaration. #1669 item 1 proposed the same capability from the web-workbench angle; that half is superseded by this issue (which carries the concrete restrictedConfigurations list and acceptance criteria), and #1669 is narrowed to its web-specific remainder (relay-URL Tower links + the web double-prompt flow). One implementation, both consumers.
Owner priority noted: wanted in the NEXT extension release. Two notes for the implementer:
[AIR #1727] feat(vscode): declare untrustedWorkspaces support so Code…
Merge pull request #1728 from cluesmith/builder/air-1727
docs(changelog): #1727 Codev activates in Restricted Mode (PR #1728)
amrmelsayed commentedon Sep 28, 2026
Shipped. PR #1728 merged to main 2026-09-28T22:12:41Z as merge commit 2817c2f (owner admin-bypass merge, pr gate approved by the owner at 22:06Z).
What landed:
apps/vscode/package.jsondeclarescapabilities.untrustedWorkspaceswithsupported: "limited", so the extension activates in Restricted Mode. Four settings are markedrestrictedin both the capability block and their property definitions (codev.towerHost,codev.towerPort,codev.workspacePath,codev.autoStartTower), with a test keeping the two lists in sync.virtualWorkspaces: falseis declared explicitly. Manifest plus tests only; no runtime code changed. CI 7/7 green on the merged head.Changelog:
apps/vscode/CHANGELOG.mdUnreleased anddocs/releases/UNRELEASED.mdupdated ondocs/vscode-changelog(983e8f0). Owner-priority for the next extension release.