Getting started
Usage
The slash commands that drive a session, from picking a model to leases, the bash filter, the code index and goal mode.
Starting a session
notagent
notagent opens as a TUI in the current directory. The startup card shows the directory, the git branch and the active model. Send /help at any time for the list of commands.
Commands
| Command | What it does |
|---|---|
/login |
Pick a provider and store an API key or run an OAuth flow |
/logout |
Remove a stored credential and deactivate that provider |
/model |
Pick a model with fuzzy search; /model <provider>/<model> also works |
/leases on|off |
Atomic file leases (default: off) |
/bash-filter on|off |
Shell-output compaction (default: off) |
/index on|off |
The local codebase index |
/goal <objective> |
Goal mode: keep pursuing an objective across turns, with optional turn and token budgets |
/btw <question> |
Ask a side question without adding it to the conversation |
/fork, /clone, /tree |
Branch and navigate the session tree |
/export, /import |
Write the session as HTML or JSONL; resume from JSONL |
/mcp |
List, add, inspect and authenticate MCP servers |
/compact |
Compact the context by hand |
/thinking |
Set the reasoning effort for models that support it |
/settings |
Everything else |
Leases
With /leases on, every mutating file tool takes an advisory, time-bounded lease before it writes. The leases live in .notagent/leases in the workspace. Only one holder may modify a file at a time, a content hash taken at reservation detects a file that changed underneath the holder before the commit, and leases expire on their own so a crashed agent never blocks a file. Several agents working in one checkout stop overwriting each other.
Bash filter
/bash-filter on compacts shell output before it enters the context. The compaction is conservative and process-free: whenever a result would be empty, larger than the raw output or uncertain, the raw output passes through untouched. Verbose build, test and package-manager output shrinks to what the agent actually needs.
Minified tools
read_minified returns a compact view of a source file: comments removed, blank lines dropped, indentation collapsed to one space per nesting level. patch_minified and multi_patch_minified edit through that same view. A source map translates each edit back to the real file, and nothing is written until every edit succeeds. Surveying and navigating code costs a fraction of a full read.
Local code index
/index on builds a tree-sitter symbol index of the workspace. The agent queries it through a dedicated tool instead of grepping blindly.
Goal mode
/goal <objective> sets an objective the agent keeps pursuing across turns. Optional turn and token budgets stop the loop when they are reached. The footer shows the goal’s status, the turns used and the tokens spent on its own line, so a running loop stays readable at a glance.
Session tree and remote sessions
/fork, /clone and /tree branch and navigate a session. /export writes HTML or JSONL, /import resumes from JSONL. Remote sessions use a CBOR binary protocol, a Unix-socket session server and SQLite session storage, so a session can outlive the terminal that started it.