All pages

Lesson 2.3 · Work with the agent · 14 min

Safety and approvals

Postures, approval rules, the audit log, and how to undo a change.

Listen

The agent can run commands and change files, so TRMNLY gives you several layers of control. In this lesson you set how much the agent may do on its own, write standing rules, read the audit log, stop everything at once, and undo a change.

Time: 14 minutes · Works on: macOS app

Choose a posture

The posture chip in the agent header sets how much the agent does without asking. Click it, or press ⇧⇥ in the composer, to cycle through three postures:

Posture What happens
Approve The default. Write tools wait for your approval. Read tools run on their own.
Auto-accept Every tool runs without asking.
Observe Read-only. Writes and commands are blocked outright.
  1. Click the chip and watch it move from Approve to Auto-accept to Observe.
  2. Set it back to Approve for now.

Some guards still fire on Auto-accept. The next sections cover them.

Try a dry run

Dry run lets the agent work through a task without running shell commands. File writes still ask for approval and still happen when you approve them.

  1. Open the agent's gear menu and choose Project agent settings….
  2. Set Mode to Dry run (echo commands) and save.
  3. Ask the agent to do something that needs a command. Its shell commands come back as echoes instead of running. The posture chip reads Dry-run.
  4. Set Mode back to Full access when you're done.

Observe (read-only) is also in this list. It's the same as the Observe posture.

Write standing rules

Approving the same safe command fifty times is tedious. Turn an approval into a rule instead.

  1. When an approval card appears, open Always… on the card.
  2. Pick how wide the rule should be:
    • Allow this tool or Deny this tool covers every call to that tool in this project.
    • Allow this path or Allow this directory covers only the file or folder this call touches. A rule on proj never covers proj-secrets.
    • Allow on or Deny on a host covers calls to that web host.
  3. The rule is saved for the project. The more specific rule wins: a host rule beats a tool rule for the same call.

To force a card for one tool even on Auto-accept, open the Safety panel's Tools tab and turn on Always prompt for that tool.

The guards that always ask

Two guards fire even on Auto-accept.

Destructive commands. The first time in a session that the agent tries an irreversible command, such as rm -rf, git reset --hard, git push --force or DROP TABLE, you get a prompt. Approve it once and that command follows your normal posture for the rest of the session. The Safety panel's Session tab can Re-arm the prompts.

Protected branches. On main, master, prod, production, release or any release/ branch, irreversible commands such as force pushes and hard resets need two confirming clicks within 8 seconds. Miss the window and you start over.

Open the Safety panel

  1. Click the shield icon at the top right of the agent sidebar. A number on it counts tool calls in the last five minutes.
  2. Look through the tabs: Audit Log, Allowed Folders, Command Rules, Tools, Network, Detectors and Session.
  3. In Audit Log, find a tool call you approved earlier. Every call, approval, denial and rule change is recorded here. Revoke on a row locks that tool for the project and clears the rules that allowed it.
  4. In Session, press Verify integrity. The log is signed as a chain, so this checks that nothing in it was changed.
  5. Also in Session, Session read-only blocks every approval-gated tool for just this chat.

The Network tab controls which web hosts the agent may fetch and browse to.

Stop everything

  • ⌘. stops the current turn.
  • ⇧⌘. is the panic key. It stops the turn, cancels pending approvals, and locks the agent. A banner above the composer says the agent is locked; press Resume when you're ready to continue.

Undo a change

TRMNLY snapshots a file before the agent writes it.

  1. After the agent edits files, find the Snapshots list in the transcript. It names each file the agent wrote.
  2. Click the restore arrow beside a file. TRMNLY asks first, naming the file and the write it will undo.
  3. Confirm. The file goes back to how it was before that write. A file the agent created is deleted instead.

You can also ask the agent to revert its own snapshot.

Check yourself

  • The posture chip cycles with ⇧⇥ in the composer.
  • You created an Always… rule and saw it apply to the next call.
  • You restored a file from the Snapshots list.
  • ⇧⌘. locked the agent and Resume unlocked it.

Go further