Agent Review Loop

Time: 8 minutes. Tangible win: understand how a coding agent can attach to a `tuicr` review session.

The TUI is where the human reviews code. The review CLI is how an agent can discover an active session, read human comments, or add clearly labeled agent findings when that workflow is intended.

Primary source Read the tuicr review workflow skill and Review Session CLI docs. They define session selection, comment JSON, and agent safety rules.

The loop

human opens TUI
  -> tuicr creates a persisted review session
  -> agent lists sessions and finds the active slug
  -> human writes comments in the TUI
  -> agent reads comments as JSON
  -> agent fixes, answers, or adds approved findings
  -> human submits or exports the final review

The three CLI moves

tuicr review list --repo .
tuicr review comments --session <slug>
tuicr review add --session <slug> --target-file src/main.rs --line 42 --side new --type issue --username "Codex" "Handle the empty case here."
Boundary rule In a user-led review, the agent reads and acts on the user's comments. It should not impersonate the user's feedback. Agent-authored comments should be explicit and labeled with --username.

Retrieval check

The user says they wrote comments in the active TUI session. What should the agent run first?

Correct. List sessions first so the agent can identify the correct active slug.

Not quite. The agent should identify the active session with tuicr review list before reading comments.

Practice

  1. Open `tuicr` on a safe repo or practice branch.
  2. Add one local comment in the TUI.
  3. Ask the agent to list review sessions and read your comment.
  4. Confirm whether you want the agent to fix code, answer questions, or add labeled findings.
Ask the agent to run a dry-run review loop with you: you write one comment, it reads it, then it explains exactly what action it would take.