auto-close-duplicates wipes an issue's existing labels when closing it as a duplicate
closeIssueAsDuplicate in scripts/auto-close-duplicates.ts closes the issue with a PATCH /repos/{owner}/{repo}/issues/{number} that includes labels: ['duplicate']:
On that endpoint the labels parameter will "replace the set of labels on this issue" (Update an issue), so every issue closed by the auto-close job loses its existing area/platform/triage labels and keeps only duplicate.
Suggested fix: keep the PATCH for state: 'closed' / state_reason: 'duplicate', and add the label with POST /repos/{owner}/{repo}/issues/{number}/labels ({ labels: ['duplicate'] }), which adds rather than replaces (Add labels to an issue). The workflow already grants issues: write.
A ready commit with this change (+8/−2): https://github.com/gypsy5oul/claude-code/commit/7b12a6f
I tried to open it as a PR, but PR creation is restricted on this repository, so I'm filing it here instead.