# Human in the loop or on the loop: where a person belongs

[Learn](/learn) › How agents work

# Human in the loop or on the loop: where a person belongs

“Human in the loop” means a person approves each action before it takes effect. “Human on the loop” means the system acts and a person watches, with the power to stop or undo it. For an AI agent that changes your code, the first is where you start and the second is where you can end up, once each change comes with proof you did not have to produce yourself.

## The two positions

In the loop

On the loop

The agent

Proposes

Acts

The person

Approves each change

Is told, and can stop or reverse

The cost

Your time on every change

The risk of a change you would have refused

It suits

New tools, sensitive code, anything with no proof

Routine work with strong automatic checks

Neither is safer in the abstract. A person approving forty changes a day stops reading them. A person on the loop with no way to undo is not really on it.

## What makes “on the loop” responsible

Three things have to be true before an agent should act without approval.

1.  **Each change is proven by something other than the agent.** A test that failed before and passes after, and your own CI.
2.  **Everything is visible.** Every change is a pull request with its reasoning, and every action is logged.
3.  **Anything can be undone.** One step takes a change back out.

Without all three, keep a person in the loop.

## What should always stay in the loop

Some decisions should not be delegated however good the checks are:

-   Changes to how people sign in.
-   Changes to security code.
-   Upgrades that cross a major version.
-   Changes to infrastructure.
-   Anything involving a secret.

## How Bugstack does it

Bugstack does [autonomous software maintenance](/autonomous-software-maintenance), and it makes the position a setting on each repository.

-   **Suggest and Review are “in the loop”.** Bugstack writes the fix or opens the pull request, and nothing merges until you merge it. Every repository starts on Review.
-   **Autopilot is “on the loop”.** Bugstack merges a change once the repository’s proof setting is met, and you hear about it afterwards. A merged change is watched for a day, and if the problem returns Bugstack opens a pull request that reverts it.

The list above stays in the loop by default at every level, and you choose what else does. You can ask for any merged change to be undone, which opens a revert pull request.

## Choosing for your team

-   **Start in the loop.** You learn how the agent works and what its mistakes look like.
-   **Move routine work on the loop** when you find yourself approving without changing anything.
-   **Keep sensitive paths in the loop** permanently.
-   **Check the undo works** before you rely on it.

## Questions

### Is human in the loop always safer?

Only if the person is really reviewing. Approval that has become a reflex gives you the delay of review without the protection. Fewer, better-evidenced approvals are safer than many unread ones.

### What is the difference between in the loop and on the loop?

In the loop, nothing happens until a person says yes. On the loop, the system acts and a person supervises, able to stop it or undo what it did.

### Can I change my mind after moving to Autopilot?

Yes. The level is a setting per repository and can be changed at any time. The level in force when a change is ready to merge is the one that applies.

## Related

-   [Autonomy levels for AI agents: suggest, review, autopilot](/learn/ai-agent-autonomy-levels)
-   [How to review a pull request an AI agent opened](/learn/review-ai-pull-request)
-   [What is agentic coding, and what is a background agent?](/learn/agentic-coding)
-   [What is autonomous software maintenance?](/autonomous-software-maintenance)

## See it work on your own code.

$100 a month

Includes $100 of usage credit every month. Start with a 14-day trial: $50 of credit and a first security audit on us. A card is required.

[Get started](https://dashboard.bugstack.ai/login) [Book 15 minutes with the founder](https://cal.com/mason-bachmann-1atgdq/15min)