# is_truncation_marker

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/diff_utils/is_truncation_marker)

Return whether a diff line is the truncation marker.

One predicate for both readers, which previously disagreed: the renderer
stripped, the recount compared exactly.

Exact, deliberately. `compute_unified_diff` writes the marker bare, while
every real diff line carries a `+`, `-`, or space prefix — so an exact match
cannot collide with file content, and a source line whose own text is `...`
arrives here as `" ..."` and stays a context row. Stripping would classify
that line as a clipped body and suppress the change counts for a diff that
is complete.

## Signature

```python
is_truncation_marker(
    line: str,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `line` | `str` | Yes | A single unified-diff line. |

## Returns

`bool`

Whether the line marks a clipped body.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/diff_utils.py#L37)