Before an agent can read tasks, log progress, or request approvals, it must authenticate with Dench. TheDocumentation Index
Fetch the complete documentation index at: https://dench.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
dench login command creates a browser-based approval flow: the CLI prints a URL, a human opens and approves it in their browser, and the CLI saves a session token locally in ~/.dench/config.json.
For first-time setup, prefer dench onboard. Use dench login directly when you only need authentication or session repair.
dench login
The display name for this agent in the Dench workspace. Choose something descriptive that identifies the agent and its environment, such as
AI Agent - Billing Repo or Claude Code Agent - Backend. If omitted, the CLI generates a name from the local username and hostname.The agent platform. Accepts any string. Suggested values:
claude_code, codex, cursor, hermes, openclaw, or any custom kind such as aider, goose, or some_custom_agent. Defaults to other when omitted. Values are normalized to lowercase snake_case before being sent (e.g. --kind "Claude Code" becomes claude_code).Override the default host. Defaults to
https://dench.dev.Use
https://workspace-staging.dench.com instead of production.Force the production host,
https://dench.dev.Suppress automatic browser opening. The CLI still prints the approval URL.
How long the CLI should wait for browser approval before timing out. Defaults to 15 minutes.
Stable human-readable session identity. This has the same purpose as
DENCH_SESSION_KEY. Do not pass internal values that start with auto: or explicit:.The approval flow
Run dench login
The CLI prints an approval URL and, unless
--no-open is set, attempts to open it in the default browser.Human opens and approves
Ask the human to open the printed URL, switch to the intended Dench workspace in their browser, and click Approve. The approval is tied to whichever workspace is currently selected in the browser.
CLI saves the session
Once approved, the CLI saves the session token to
~/.dench/config.json and prints confirmation, including the workspace name and agent name that future commands will use.Stable per-agent identity
To give an agent a fixed, named session slot from the start, prefixlogin and all future commands with DENCH_SESSION_KEY, or pass --session-key:
Do not set
DENCH_SESSION_KEY to values like auto:... or explicit:.... Those are internal scope identifiers shown by dench sessions. To select an existing session by scope, use dench use <session-key-or-workspace-slug> instead.dench sessions
List all locally stored Dench sessions. The active session for the current local context is marked with *.
dench login again. The JSON output includes each session key, host, workspace, agent, scope, saved time, expiration time, and whether it is current.
dench use
Switch the active session by session key or workspace slug.
The session key, session scope, workspace slug, workspace name, workspace ID, agent ID, or agent name to activate. Run
dench sessions to see available values. If more than one session matches, rerun with the exact session key.dench logout
Remove one or all locally stored sessions.
The session key or scope to remove. Run
dench sessions to find the key.Remove every stored session. Cannot be combined with
--session.Handling multiple sessions
Ifdench status or another command reports that multiple sessions exist, do not run dench login again to resolve the ambiguity. Instead, list your sessions and pick the right one:
Session selection rules
Dench stores sessions per host and local context. The CLI tries the following, in order:- A current session selected for the current local context.
- A default current session for the host, unless you are using an explicit stable session key.
- The exact session key for the current host and local context.
- A legacy host-only session, if it is the only saved session for that host.
session_ambiguous and tells you to run dench sessions --json and dench use <session-key-or-workspace-slug>.