# Your first session

[View as human](https://replume.dev/docs/your-first-session/)

One task from start to finish, with the real output of Replume 0.2.17. The repository is a small cart with a bug: the SAVE10 coupon takes 10 off instead of 10%.

## Set up once

Install Replume and check the version:

```sh
npm install -g replume-cli
```

```sh
replume --version
```

From the repository root, run:

```sh
replume init
```

Init writes `.replume/` and the hooks for the coding agent it finds. It also prints a line that says the model review is on; in default mode that review does not run at Stop. It ends with a `Next:` block:

```text
Next:
  1. Commit first, so the first report shows only the agent's work: git add .replume/.gitignore .replume/config .claude/settings.json .agents/skills/replume/SKILL.md .claude/skills/replume/SKILL.md && git commit -m "Add Replume"
  2. Start a new agent session in this folder (quit and reopen it if one is already open): claude. Your first message is the task.
  3. Using Codex here? Run: replume init --codex
  4. Using Cursor here? Run: replume init --cursor
```

Run the commit command it gives you. Then the report shows only the agent's work.

## Check the tests before the task

This step is optional:

```sh
replume init --check
```

It runs your test command once on the current code, in an isolated copy, and installs nothing. Here one test was already failing, which is the bug the task is about:

```text
Baseline check:
  RED BEFORE TASK — 2 tests ran, 1 failed before the agent task: SAVE10 takes 10% off
```

A red test before the task is fine when the task is to fix it. Replume checks it again after the task.

## Give the agent one task

Start a new agent session in the same folder. A session that was already open does not load the new hooks. The first message is the task:

```text
Fix the SAVE10 discount in src/cart.js: it should take 10% off.
```

Replume turns that message into a contract. Here it allowed `src/cart.js` and new test files, protected the existing test `test/cart.test.js`, and set the definition of done to `npm test` passing.

## Watch the steps

In a second terminal:

```sh
replume watch
```

Each line is one recorded step. These are the steps of this session, with two repeated lines left out:

```text
11:11:04  START        auto contract task-2026-11-22-001
11:11:08  OK           Read src/cart.js
11:11:09  OK           Read test/cart.test.js
11:11:15  OK           Edit src/cart.js
11:11:17  TEST         npm test - PASS (2 pass, 0 fail)
11:11:21  GATE         npm test passed at Stop
11:11:21  STOP         agent finished
11:11:21  REPLUME      auto_finish: verifying session 0dd95700 in the backgrou…
11:11:21  REPLUME      the final check runs in the background: not waited for…
```

The agent read the code and the test, fixed `src/cart.js`, and ran the tests. When it tried to finish, Replume ran `npm test` itself (GATE). Then it checked the work in an isolated copy in the background and wrote the report.

## When the agent tries to finish

In default mode, Replume does not send the agent back. If the tests fail or a test was weakened, the report says so with the evidence. In strict mode, Replume blocks the Stop and sends the agent back on high-confidence findings, at most `auto.max_retries` times, and the watch view shows RETRY lines. See [Default and strict mode](https://replume.dev/docs/modes/).

## Read the saved report

```sh
replume report --session
```

```text
status: PASS
class: none
tree: cdd54945d76b1fd153af70f895b156f898139726
report: .replume/reports/0dd95700-e925-4e1c-b9c2-50a626ae8f83.md
```

Open the report file. This is the whole short report:

```text
Verdict: PASS
Status: PASS (verify PASS; steered 0 times, 0 blocked)
Next: review the diff and commit it, then start a new agent session for the next task.

What changed:
- src/cart.js (+1, −1)
Tests: npm test: passed (exit 0; verify, isolated copy); 2 passed, 0 failed, 0 skipped.

Full report: .replume/reports/0dd95700-e925-4e1c-b9c2-50a626ae8f83.full.md (or `replume report --session 0dd95700-e925-4e1c-b9c2-50a626ae8f83 --full`)
```

The full report starts with **What was asked**:

```text
- Task: Fix the SAVE10 discount in src/cart.js: it should take 10% off.
- DONE — test\_command: \`npm test\` exit 0
- DONE — done: npm test: \`npm test\` exit 0 (definition of done, re-run here)
- OBSERVED — src/cart.js changed and seen by the hooks: checked by test\_command and observed steps; no scenario
```

Further down in the full report, **What was NOT checked** lists one gap:

```text
- the runtime check is off (auto.runtime: off)
```

And **Assumptions Replume made** shows how it read the task:

```text
- The task is the confirmed contract task-2026-11-22-001: "Fix the SAVE10 discount in src/cart.js: it should take 10% off.". Scope = allow \[src/cart.js, test/\*\*\], protected \[test/cart.test.js, .env, .env.\*\].
```

[Reading the report](https://replume.dev/docs/report/) explains every section.

## What to do next

The verdict is PASS and nothing was left unchecked except the runtime check. Read the diff, then commit:

```sh
git diff
```

For the next task, start a new agent session. Its first message is the new task.
