# delete_temp_artifact

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/auto_mode/AutoModeHITLMiddleware/__init__/delete_temp_artifact)

Delete one exact OS-temp artifact created for this request.

## Signature

```python
delete_temp_artifact(
    file_path: Annotated[str, Field(description='Exact path returned by `create_temp_artifact`.')],
    runtime: ToolRuntime[Any, AutoModeState],
) -> Command[Any]
```

## Returns

`Command[Any]`

A tool message reporting exact cleanup or a fail-closed denial.

---

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