# format_shadowed_dcode_fix_command

> **Function** in `deepagents_code`

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

Return a session-scoped shell command to prefer the upgraded shim.

The command targets the shell that matches the current platform: PowerShell
on Windows (where `_uv_tool_bin_dir` can resolve `%USERPROFILE%/.local/bin`
and `export`/`hash` are not valid), and POSIX `sh`/`bash`/`zsh` elsewhere.

## Signature

```python
format_shadowed_dcode_fix_command(
    shadow: ShadowedDcode,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `shadow` | `ShadowedDcode` | Yes | The shadowing-binary description returned by `detect_shadowed_dcode`. |

## Returns

`str`

A copy-pasteable shell command that updates only the current terminal
session and, on POSIX, clears the shell's command-path cache.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/7794b61a6e76230e8c7a49bdce808b3728305914/libs/code/deepagents_code/update_check.py#L1695)