---
title: "Clear a reviewed agent touch"
method: POST
path: "/v1/agent/touched/clear"
tags: ["Agent"]
---

# Clear a reviewed agent touch

`POST /v1/agent/touched/clear`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/agent/touched/clear`
- Auth: HTTP bearer

Prune a file (or a whole run) from the agent-touched set once it has been
reviewed (Phase 3 of the agent-touch decorations). `path` clears one
file's touch — the review action — narrowed to a single `runId` when both
are given; `runId` alone dismisses the whole run. At least one of the two
is required. Each removed entry emits a `cleared:true`
`agent.file-touched` on `GET /v1/events` so open `/code` trees drop the
badge, and drops from the `GET /v1/agent/touched` replay. Idempotent:
clearing an unknown or already-cleared touch returns `cleared:0`, never a
404 — a review dismissal is never a conflict.

## Request body

- object
  - `path` string: Absolute path of the reviewed file to clear
  - `runId` string: Session id — clears every touch of that run (or, with `path`, narrows the clear to it)

## Response `200`

The touch(es) were cleared (or nothing matched)

- object
  - `ok` boolean
  - `cleared` integer: How many touched entries were removed (0 = already clear / unknown)

## Other responses

- `400`: Neither path nor runId provided, or an invalid runId

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
