Your first session
This page walks you through one full session, end to end, in a real repository. If you’ve never used a coding agent before, do this first. Everything else in the docs makes more sense once you’ve seen the loop in action.
You’ll need:
- The
coderbinary installed and a BridgeApp account (install, sign in) - A small Git repository to experiment in — your own, or
git clonesomething you don’t mind editing
1. Start in your repo
Section titled “1. Start in your repo”Open a terminal, cd into the repo, and run:
coderA few things happen:
- If you haven’t signed in yet, the browser sign-in flow runs first. Once signed in, Magic Coder enters the TUI.
- Magic Coder resolves the current shell directory to the nearest Git/worktree root, so even if you started in a subdirectory you’ll get the right workspace root.
- The status line at the bottom shows the active model, your sign-in email, and the workspace root.
You’re now looking at an empty conversation. The cursor is in the input box at the bottom.
2. Trust the workspace (one-time)
Section titled “2. Trust the workspace (one-time)”The first time Magic Coder sees a new workspace, it asks whether you trust it. Trust matters because:
- Untrusted: Magic Coder can run, but project-local skills, rules, and any remembered command-permission decisions are ignored, so most operations will prompt for approval every time.
- Trusted: project permission rules are honored, and you can use
--automagicfor hands-off runs.
Trust the workspace if it’s your own repo. If you’re auditing a stranger’s repo, leave it untrusted — you’ll just approve operations one by one.
You can also trust up front by passing --trust on the command line:
coder --trust3. Ask Magic Coder to do something
Section titled “3. Ask Magic Coder to do something”Type a real task into the input box and press Enter. Make it concrete — agents work better with specific goals than with vague exploration.
Good first prompts:
“Read the project, summarize the architecture in 5 bullet points, and tell me which files do most of the work.”
“Find the main entry point, run the tests, and report whether they pass.”
“Add a
--dry-runflag to the CLI that prints the plan instead of executing it.”
You’ll see the agent start to think. It will:
- run
list_dirto see what’s at the root, - read interesting files with
read_file, - run
grepfor patterns, - and start either summarizing or making changes.
4. Approve or reject tool calls
Section titled “4. Approve or reject tool calls”When Magic Coder wants to run a shell command or apply a diff that isn’t already pre-approved, it stops and asks. You’ll see a prompt like:
Run shell command: cargo test[a] approve once [A] approve & remember [d] deny [D] deny & rememberThree things to know:
- “Approve & remember” records the decision so the same kind of command runs without asking next time. Useful for
cargo test,npm run build, and other commands you trust your agent to run repeatedly. - “Deny & remember” writes a deny rule. Useful for blocking specific destructive commands.
- File edits use the same gate. Magic Coder shows the unified diff before asking.
Take a moment with the first few prompts to understand what’s being asked. After a couple of “approve & remembers” the loop quiets down.
5. Watch the work loop
Section titled “5. Watch the work loop”A real task takes several rounds. Magic Coder will read more files, edit, run tests, see failures, fix them, and keep going. You don’t need to do anything during this — just read along. Useful tips while it’s running:
- Scroll the transcript with the mouse wheel,
PageUp/PageDown, orUp/Downwhen the input is empty. - Right-click a message (in terminals that forward right-click to the TUI) to copy just that block — works on user messages, reasoning steps, assistant text, and individual tool calls.
- Press Ctrl+C to stop the agent if it’s heading the wrong direction. You’ll get the input line back and can redirect with another message.
- Queue follow-ups while it works. Just type and press Enter — your message goes into a follow-up queue and runs after the current turn finishes. You can have multiple queued;
↑enters the queue to edit (e) or delete (d) items. - Slash commands are available at any time: type
/helpto see the keyboard shortcut overlay,/modelto switch model,/reasoning-effortto dial how hard the model thinks.
6. Wrap up
Section titled “6. Wrap up”When the task is done, Magic Coder stops talking and yields control back to you. At this point you can:
- Keep going — type a follow-up message. The conversation continues with full context.
- Switch model — run
/modelto pick a different one for the next message. - Start fresh — run
/clear(or/reset) to start a clean conversation in the same workspace. - Exit —
Ctrl+Dor/exit.
When you exit, Magic Coder prints a hint like:
Continue on any device:coder --continue 8a3f2b1e-...-7d9cSave that thread ID. You can resume the session later, possibly from a different machine, with coder --continue <uuid>. The conversation, the workspace context, and your sign-in all reconnect.
Going further
Section titled “Going further”Now that you’ve done one session, the rest of the docs will make sense:
- Plan mode — make Magic Coder propose a plan before touching code
- Automagic — non-interactive runs for tasks you don’t want to babysit
- Workspaces & trust — the trust model in detail
- Permission rules — pre-approve or block commands by pattern
- Project context (AGENTS.md) — give Magic Coder a permanent briefing about your repo