# classify_thread_cwd

> **Function** in `deepagents_code`

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

Classify a stored thread cwd against the current cwd.

## Signature

```python
classify_thread_cwd(
    raw: str,
    current_cwd: str,
) -> tuple[CwdMatch, Path | None]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `raw` | `str` | Yes | The cwd recorded in the thread's checkpoint metadata. May be relative or use `~`; both are normalized here. |
| `current_cwd` | `str` | Yes | The current working directory. |

## Returns

`CwdMatch`

A `(status, path)` pair. `path` is only set when `status` is

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/efa9f5364b83e9367ea57d9c21b15b4d81fdcb7a/libs/code/deepagents_code/resume_policy.py#L120)