# cwd_conflict

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/client/headless_resume/cwd_conflict)

Explain why `target` cannot be resumed from `current_cwd`.

The server refuses a directory change through the thread's workspace
binding; checking first turns that generic refusal into a specific message.

## Signature

```python
cwd_conflict(
    target: ResumeTarget,
    current_cwd: str,
) -> str | None
```

## Returns

`str | None`

A user-facing message, or `None` when the directories match.

---

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