# io: read/write on closed pipe

- **ID:** `go/io-writer-closed`
- **Domain:** go
- **Category:** io_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to read from or write to an io.Pipe that has already been closed.

## Version Compatibility

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

## Workarounds

1. **** (80% success)
   ```
   pr, pw := io.Pipe(); defer pw.Close(); // ensure proper close order
   ```
2. **** (90% success)
   ```
   Use sync.Once to close the pipe only once
   ```

## Dead Ends

- **** — Leads to data corruption or panic (100% fail)
- **** — Cannot reopen a closed pipe; need to create a new one (100% fail)
