Skip to main content
An outcome is the result of a turn. Sensei reads one on its own from what happens in the session. When you or your pipeline know the answer, report it, and the session carries a verified result. A reported result stands above the one Sensei reads.

What Sensei reads on its own

Sensei looks at the checks the agent ran in the turn: tests, type checks, lints. It reads a final answer shortly after the conversation moves on. A turn that goes quiet in the middle of a tool call is closed later from what the conversation held, and shows as Unfinished when no answer came. These outcomes are labelled Sensei’s read. The Agreed figure on the learning loop says how often the read matched a verified outcome on your own work.

From your editor

A hook for Claude Code and Cursor posts the verdict of the last check when a session ends. Install it once on each machine:
Add claude-code or cursor at the end to set up one of the two. The hook reads the result of checks the editor runs: pytest, vitest, jest, go test, cargo, tsc, eslint, ruff, mypy and pyright. When the session stops it posts one verdict. It sends the verdict, the runner’s name and the pass and fail counts. The command, its output, your files and the conversation stay on the machine. The hook is installed at ~/.local/bin/sensei-hook and keeps the key in ~/.config/sensei/hook.json. sensei-hook uninstall removes it.
Claude Code sends its session id, so the verdict lands on the exact session. Cursor does not. For Cursor, the verdict goes to the session on that key that finished a turn on the same check in the last two minutes, and is dropped when there is none.

From CI or a script

One request marks a session:
The session id is on every response from the endpoint as the x-senselab-session-id header, and on each row of the Sessions page. The reply comes as soon as the result is recorded, and Sensei learns from it in the background.

On the dashboard

Open a session and mark its turns, as described in Sessions. For a run, use Right and Wrong on the run’s page. See Review a run.
The top of a finished run's page, with the Right and Wrong buttons beside its Verified status

What an outcome changes

  • It closes the turn, and Sensei writes the turn’s summary to your Learnings.
  • Learnings the session started with are credited when the turn worked and lose standing when it did not.
  • On a project that keeps turns, a turn that ended in a verified success is kept for the next version of your model. A turn later marked as anything else is removed.
  • It counts toward the project’s readiness to train, and toward the success rates that routing rules can read.