# ERR Error claiming pending messages for consumer 'myconsumer' in group 'mygroup': no such consumer

- **ID:** `redis/stream-group-claim-failure`
- **Domain:** redis
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

Attempting to claim pending messages for a consumer that does not exist in the consumer group.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 6.2 | active | — | — |
| Redis 7.0 | active | — | — |
| Redis 7.2 | active | — | — |

## Workarounds

1. **Create the consumer explicitly before claiming: `XGROUP CREATECONSUMER mystream mygroup myconsumer`** (95% success)
   ```
   Create the consumer explicitly before claiming: `XGROUP CREATECONSUMER mystream mygroup myconsumer`
   ```
2. **Use XPENDING to list pending messages and reassign them manually with XCLAIM after ensuring the consumer exists.** (85% success)
   ```
   Use XPENDING to list pending messages and reassign them manually with XCLAIM after ensuring the consumer exists.
   ```

## Dead Ends

- **** — The consumer may have been auto-created by XREADGROUP and then deleted, causing the manual creation to fail if the group is in a bad state. (30% fail)
- **** — This loses all pending messages and consumer offsets, which may be unacceptable in production. (50% fail)
- **** — The error persists if the group metadata is corrupted or the stream is in an inconsistent state. (40% fail)
