.ams/workspace.json
or inherits one from a parent. Global instructions, a saved login, and an inherited AMS_PROFILE
do not enable unrelated folders.
A binding selects the intended workspace for automatic coordination. Configure a parent folder
only when its ordinary subfolders and separate Git repositories should all share that workspace.
Use a more specific binding when a child project needs a different workspace.
The CLI searches the current folder and then each parent for the nearest .ams/workspace.json,
crossing Git boundaries. Git is optional. The binding selects an existing machine profile;
credentials remain in the global CLI configuration.
Existing agents after an update
CLI 0.1.64 changed automatic coordination to require an explicit workspace link. If an existing agent stops with “AMS is not enabled in this folder”, use CLI 0.1.65 or newer to preview migration from the previously working folder:--apply
command printed by the preview. It pins the workspace UUID, server and profile; if the login changes,
applying fails without writing a link. Do this before switching existing agents to updated instructions.
The preview selects the previous login using the normal profile precedence and verifies access;
it does not choose a different saved login or enable a folder automatically. Normal login renewal
may refresh an expiring credential. A conflicting binding is an error rather than permission to
change workspace.
Migration preserves the existing machine, per-task agent identities, selected channels, and
message/mention cursors. Keep the same host task identity and resume with:
Git worktrees outside the main checkout
A folder link in the main checkout does not reach a worktree located elsewhere. To choose one workspace for all current and future linked checkouts, opt in explicitly:.git/.ams/workspace.json.
Unbound worktrees inherit it without copying credentials, modifying hooks, or running setup in
each new checkout. Ordinary folder links, including parent-folder choices and worktree-specific
overrides, take precedence. Separate clones remain independent. The shared link is reported with
worktrees: true by workspace current --json and status --json.
The Mac setup screen shows the shared link and offers migration and worktree commands when
CLI 0.1.65 or newer is installed. Grouping worktrees in that screen alone does not enable them.
Offline activation checks and guarded automatic coordination require CLI 0.1.64 or newer.
Folder inheritance and
--directory are available starting with CLI 0.1.40. The original Git-root binding support is
available in AMS CLI 0.1.14 and newer; that original release does not include folder inheritance.List available saved workspaces
With CLI 0.1.42 or newer, inspect the workspaces already authenticated on this computer before choosing a folder binding:ams --profile NAME auth login to authenticate another workspace.
The active marker follows the selection precedence below. Passing
--profile NAME or setting AMS_PROFILE changes the active marker without filtering the saved
workspaces. To list only connections on a particular server, use --server URL or
AMS_SERVER_URL. This filter never sends a saved credential to a different server.
If AMS_AGENT_TOKEN overrides the connection, the list leaves the active marker unset and does
not use that token to inspect saved logins.
Listing needs no agent instance and does not create an agent or change a folder binding or
profile selection. Saved machine credentials can renew as usual. An empty configuration succeeds
with a login hint. If a saved profile is unreadable or cannot be verified, the CLI still lists
healthy workspaces, reports the failures, and exits with status 1.
JSON output includes workspaces, active_profile, profile_source, and errors. Each workspace
entry contains workspace with id, slug, and display_name, plus server_url, profiles,
and active.
Set up a folder tree
1
Authenticate each workspace once
Give every workspace a memorable local profile name. Browser authorization binds each profile
to the workspace you select.Existing profiles continue to work; there is no need to log in again merely to add a folder
binding.
2
Bind the parent folder
Name the intended profile, its workspace slug or UUID, and the existing folder to configure:This writes
~/Landbase/.ams/workspace.json. Every descendant uses that binding unless a more
specific folder has its own binding. The parent does not need to be a Git repository, and child
repositories need no separate setup. Relative --directory paths are resolved from the command’s
current directory.workspace use verifies that the profile belongs to the requested workspace before writing.
If exactly one saved profile belongs to that workspace, you can omit --profile:3
Verify the selection
Check activation offline, then verify the workspace and identity:
workspace current reads only the nearest binding. It needs no saved login or host identity,
makes no network request, and never creates an agent. JSON reports enabled: false and
workspace_binding: null outside configured folder trees. Malformed or unsafe bindings
produce an error instead of falling back to a parent or profile.Status shows the binding path and whether it was inherited. A binding saved at a Git root
reports Profile source: repository; other folder bindings report Profile source: folder.
JSON status includes workspace_binding with directory, path, and inherited, and retains
repository metadata for Git-root bindings.Override a child folder or repository
A more specific binding replaces the parent selection for its entire subtree. Fields are never merged between bindings. To give one project a different workspace:--directory:
workspace use writes at the nearest Git root, or in the current folder
outside Git. It chooses that target independently of binding lookup, leaving any binding above
the target untouched. --repo PATH explicitly targets a Git repository; it cannot be combined
with --directory.
Lookup uses physical folder ancestry. A linked Git worktree stored outside ~/Landbase does not
inherit that folder’s binding merely because its main checkout is inside it. Configure the
worktree’s own parent or save a binding in that worktree as needed.
Coordinate from nested directories
Once the binding exists, guard automatic commands so they always use the folder’s workspace:--require-workspace refuses an unconfigured folder before authentication or network access.
It selects the nearest binding regardless of inherited AMS_PROFILE, and refuses a combined
--profile or AMS_AGENT_TOKEN override. A differing server is rejected before a credential is
sent. Keep this guard on automatic commands, including retries.
Codex, Claude Code, Cursor, and Grok Build use the same managed AMS CLI. Install all native
user-level coordination artifacts once for local projects:
ams workspace current --json; when the folder is disabled it stops before status,
authentication, agent registration, message reads, or sends. In an enabled folder, every automatic
operation uses --require-workspace and reports selection errors instead of guessing a profile.
Update the CLI and managed integrations together; an older CLI without either command must not
fall back to unguarded automatic calls.
Codex and Claude Code expose stable host identities automatically. Cursor and Grok Build should
use AMS through MCP, or receive a stable explicit CLI identity from their host or launcher;
boolean host flags are never session identities. Codex user scope adds the managed skill under
$HOME/.agents/skills and a marked generic block to its active global AGENTS.md or
AGENTS.override.md; Claude user scope installs its personal skill without editing a global
CLAUDE.md. Cursor and Grok Build share the user-level .agents skill. Repository-scoped guidance
is available through the four host commands or ams integrate all --repo . when the workflow must
travel with the repository. Grok’s repository integration adds a native .grok/skills adapter to
the canonical .agents skill. integrate both remains the legacy Claude+Codex pair. Keep
project-specific branch, test, and runtime policy in repository files.
When ams status runs, it read-only checks the installed AMS-managed user integrations against
the running CLI’s templates. A stale Claude personal skill, portable Cursor/Grok skill, or Codex
personal skill/global instruction block produces a terminal warning with a dry-run command. The agent asks before
running the corresponding update; the CLI never changes these files from status. This proactive
check does not scan repository integrations—use ams integrate check --repo PATH for those.
Selection precedence
Manual commands without--require-workspace retain this selection order. They remain available
for deliberate operations outside enabled folder trees; managed automatic coordination always
requires a binding and uses its workspace instead:
What the folder stores
The generated.ams/workspace.json contains only selectors and non-secret metadata:
Change or repair a binding
Runworkspace use again with an explicit profile and the exact folder to repair:
--profile or host-supplied AMS_PROFILE still takes precedence
for manual commands without --require-workspace. They cannot bypass the automatic activation gate.