---
title: "被拦下时怎么办 · 文档"
description: "yokoten 拦下命令时是什么意思：怎么看 Why、Instead、More 三行，要跟 agent 说什么，觉得拦错了又该怎么办。"
canonical: https://yokoten.app/zh/docs/stopped
lang: zh-CN
---

> For AI agents: the documentation index is at https://yokoten.app/llms.txt. To set up yokoten in a project, follow https://yokoten.app/agents.md.

# yokoten 拦下一条命令时

yokoten 在命令运行之前就拦下它，并写明原因。命令没有执行，所以没有什么要撤回的。下面是一次真实的拦截：

```text
$ git push -f origin main

yokoten stopped this: git push -f forces the push [force-push]

  Why       A plain force push can throw away work that someone else pushed.

  Instead   Use --force-with-lease, which stops when the remote has work you
            have not seen.

  More      https://github.com/yokoten-labs/yokoten/blob/main/docs/guide.md#the-core-rules
```

## 怎么看拦截信息

每次拦截都有同样的四部分：

- `yokoten stopped this:`: 要运行的命令、它会做什么，方括号里是规则的名字。
- `Why`: 可能出什么问题。
- `Instead`: 安全的做法，或者该由谁来做。
- `More`: 这条规则在哪里有详细说明。

## 要跟 agent 说什么

通常什么都不用说。agent 读到的是同样几行，会自己改走 Instead 那条路。

如果 Instead 那一行说只有你能做，比如发布，agent 会停下来，把这一步留给你。等你准备好了，自己来做。

## 它保护什么

yokoten 保护五样东西。跑过 `npx yokoten` 后，五项保护在每个项目里都开着，不用再设置。

- **你的工作**：强推、硬重置（hard reset）、删除 `.git`，以及其他会丢掉工作的操作。
- **你的秘密**：提交里加了密钥、私人邮箱或 IP 地址。
- **你的发布**：新建标签、发包、把仓库改成公开。什么时候发版，只由你决定。
- **你运行的代码**：让程序直接运行没人看过的下载内容。
- **守卫本身**：跳过提交检查，或者把它关掉。

## 觉得拦错了

到 GitHub 上开一个 issue，贴上以 `yokoten stopped this:` 开头的那一行。别贴密钥、邮箱和服务器名。

[开一个 issue](https://github.com/yokoten-labs/yokoten/issues/new)
