# chdir /wrong/path: no such file or directory

- **ID:** `go/os-chdir-error`
- **Domain:** go
- **Category:** io_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Calling os.Chdir with a non-existent directory path, causing the current working directory to remain unchanged.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.19 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   if err := os.Chdir(path); err != nil { return fmt.Errorf("failed to change dir: %w", err) }
   ```
2. **** (95% success)
   ```
   Use os.Stat to verify directory exists before chdir
   ```

## Dead Ends

- **** — Working directory remains old, leading to file access issues (70% fail)
- **** — Relative path may still be invalid (60% fail)
