# panic: proto: field number 3 in message pb.Order is already used by "id"

- **ID:** `go/proto-duplicate-field-number`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two fields in the same proto message were assigned the same field number. This is a proto schema error caught at init time by the generated code.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| google.golang.org/protobuf 1.31+ | active | — | — |

## Workarounds

1. **** (97% success)
   ```
   Assign unique field numbers in the .proto file and regenerate:
message Order {
  int64 id = 1;
  string sku = 2;
  int32 qty = 3;  // not another 3
}
// then: protoc --go_out=. order.proto
   ```
2. **** (92% success)
   ```
   Run buf lint in CI to catch duplicate field numbers before build:
buf lint && buf breaking --against '.git#branch=main'
   ```

## Dead Ends

- **** — The panic is triggered by the proto field numbers in the generated descriptors, not by Go field names; renaming Go fields does not change the descriptor. (90% fail)
- **** — The panic occurs during package init before main runs; recover cannot intercept init-time panics. (95% fail)
