The REPL (Read-Eval-Print Loop) is the interactive shell available inside teaagent chat / teaagent tui. Commands are entered at the > prompt. A leading / is optional — /help and help are equivalent.
Source: teaagent/tui/_commands.py, teaagent/tui/__init__.py
Display the full command reference.
help
Output: Formatted table of all available commands.
Run the guided interactive setup wizard.
setup
setup write-env claude
| Argument | Description |
|---|---|
write-env |
Write resolved API keys to .env |
provider |
Provider to configure (claude, gpt, gemini, …) |
Check GraphQLite database runtime health.
doctor
Output: Pass/fail for database connectivity, schema version, and migration status.
Set the active LLM provider for this session.
provider claude
provider gpt
provider gemini
provider openrouter
provider ollama
provider vllm
provider workers-ai
provider aigateway
Error cases:
- Unknown provider name →
Unknown provider: <name>. Run 'model providers' to list available. - Missing API key →
API key not set. Set <ENV_VAR> or run 'setup'.
Override the model for the current session.
model claude-opus-4-8
model default
default clears any override, reverting to the provider default.
Enable or disable task-based model routing.
route-model on
route-model off
When on, the router selects a model based on task complexity before each run.
Preview which model the router would select for a task without running it.
route "refactor the auth module"
Output: → claude-opus-4-8 (complexity: high, reason: multi-file refactor)
Score task complexity as high, medium, or low.
complexity "add a docstring to utils.py"
Output:
Complexity: low
Rationale: Single-file, read-only, no branching logic.
Estimate token budget for a task before running.
estimate "migrate the database schema"
Output:
Estimated input tokens: ~4,200
Estimated output tokens: ~1,800
Estimated cost: ~$0.04
Set the workspace root for subsequent runs.
root /Users/me/project
root .
Allow or block destructive tools (file writes, shell commands, patches).
destructive on
destructive off
Enable or disable streaming progress events to the output pane.
progress on
progress off
Enable or disable streaming model output token-by-token.
stream on
stream off
Expose or hide the subagent delegation tool in the active tool set.
subagent on
subagent off
Set heartbeat emission interval. 0 disables heartbeats.
heartbeat 30
heartbeat 0
Set effort throttling for the model.
effort low
effort normal
effort high
effort unlimited
| Level | Description |
|---|---|
low |
Fewer iterations, faster, cheaper |
normal |
Default balanced setting |
high |
More iterations, deeper reasoning |
unlimited |
No iteration cap |
Enable or disable multi-turn chat mode. When on, message history is preserved across runs.
chat on
chat off
Start a new chat session, discarding current history.
session new
List all saved sessions.
session list
Output:
ID Created Messages Label
────────────────────── ─────────────────── ──────── ─────────────────
abc123 2026-06-01 09:14 12 auth refactor
def456 2026-06-02 11:30 3 (untitled)
Switch to a saved session, loading its message history.
session switch abc123
Clear all messages in the current session (does not delete the session record).
session clear
Show details of the current session including message count, focus stack depth, and label.
session show
Set the permission mode for this session.
permission read-only
permission workspace-write
permission prompt
permission allow
permission danger-full-access
See Permission Modes in the CLI spec for mode descriptions.
Approve one in-flight pending tool call by its call ID. This is live JIT/session approval, not the removed --approve-call-id pre-run flag.
approve call_abc123
Remove an in-memory JIT/session approval for a pending call.
unapprove call_abc123
List call IDs approved in the current JIT/session state.
approvals
Show the subagent approval queue.
approvals subagents
approvals subagents approve <id>
approvals subagents deny <id>
approvals subagents approve-all
approvals subagents deny-all
List configured approval presets.
permissions
Score task ambiguity and surface clarifying questions without running the model.
clarify "improve the API"
Output:
Ambiguity score: 8/10 (HIGH)
Clarifying questions:
1. Which API — internal Python API or REST endpoints?
2. What does "improve" mean — performance, readability, error handling?
3. Which files are in scope?
Show routing, memory context, and tool plan for a task without calling the model.
preflight "add pagination to /users endpoint"
Write a plan artifact to .teaagent/plans/ without executing anything.
plan "migrate SQLite to PostgreSQL"
Output: Path to the written plan file.
Show agent readiness, recent runs, harness health, and token budget. Optionally scoped to a task.
daily
daily "auth module work"
Run an agent task from within the REPL. Both are identical.
run "add type hints to models.py"
ask "explain the approval flow"
ask --clarify "refactor the router"
| Flag | Description |
|---|---|
--clarify |
Score ambiguity first; abort if score ≥ threshold |
Output (streaming): Progress events, then final answer.
Show heartbeat liveness status for a running or completed run.
status run_abc123
Re-run a task from a persisted run ID, replaying state up to the checkpoint.
resume run_abc123
Restore workspace files from the undo journal. Defaults to the most recent run.
undo
undo run_abc123
Behavior: Interactive diff shown before restoring. Requires confirmation unless --force was set on original run.
Add a memory entry.
memory add "Use pytest-asyncio for all async tests"
List recent memory entries.
memory list
Full-text search over memory entries.
memory search "async testing"
Show details of a specific memory entry.
memory show mem_abc123
List workspace files available for @-mention auto-complete.
context list
context list src/
Pin a file for live sync — its contents are injected into the context on every run.
pin src/auth.py
Remove a pinned file.
unpin src/auth.py
List all currently pinned files.
pinned
Compact the current session's message history, summarising old exchanges to reduce token usage.
compact
Show accumulated token and cost summary for the current session.
cost
Output:
Session cost summary
Input tokens: 12,450
Output tokens: 3,210
Estimated cost: $0.18
Runs this session: 4
Show remaining token and cost budget for the current session.
budget
List persisted runs for the current workspace.
runs
Show details of a specific persisted run.
show run_abc123
Suspend the current session as a checkpoint and return to the shell.
background
Review later with teaagent agent interactive-review <run_id>; true resume is only
available where the run record supports continuity.
Switch the active GraphQLite database. Use :memory: for an in-memory ephemeral store.
use :memory:
use .teaagent/graph.db
Create a SmokeTest node in the current database to verify connectivity.
smoke
Execute a raw Cypher query against the current GraphQLite database.
query "MATCH (n:Run) RETURN n LIMIT 5"
Start parallel experiment branches with different approaches.
parallel "use SQLAlchemy" "use raw psycopg2" "use Tortoise ORM"
Each branch runs the same task with a different approach hint. Results are shown side-by-side.
After parallel, merge the selected branch into the workspace.
select 2
Cancel active parallel experiments.
cancel
Enter conflict resolution mode for a merge conflict.
conflict
Sub-commands while in conflict mode:
| Key | Action |
|---|---|
o |
Accept current branch (ours) |
t |
Accept incoming branch (theirs) |
n |
Move to next conflicted file |
p |
Move to previous conflicted file |
a |
Abort the merge |
Create a git checkpoint (commit) of the current workspace state.
checkpoint
Print MCP server integration hint.
mcp
Exit the REPL and TUI.
exit
quit
All commands follow the same error format:
Error: <short description>
→ <actionable hint>
Example:
Error: No persisted run found with ID 'run_xyz'.
→ Run 'runs' to list available run IDs.
Commands that fail do not exit the REPL — control returns to the prompt.
Within a run or ask task string, files can be injected by mentioning them with @:
ask "add error handling to @src/auth.py and @src/utils.py"
The file contents are appended to the context before the model call. Tab-completion is available for @ mentions if context list is populated.