## TL;DR

Tags not filtering almost always comes down to three things: how the shell handles your quotes, which tag-expression syntax your cucumber version expects, and whether the tag is actually on the scenario. Old cucumber used `--tags ~@wip`; new versions use tag expressions like `not @wip`. Pass the expression exactly as documented and verify with a dry run.

## The query

```text
cucumber tags not filtering scenarios: how to fix
```

## Use this when

- Scenarios run even though you excluded their tag.
- Zero scenarios run when you expected a subset.
- You upgraded cucumber and tags stopped filtering.

## Not for

- Designing a tag taxonomy for your suite.
- Tag-based reporting; this is about selection only.

## Steps

1. Check your cucumber version and its tag syntax: ruby cucumber 3+ and cucumber-js 7+ use tag expressions (`not @wip`, `@smoke and @fast`), older versions use `--tags ~@wip`. Expected output: you know which syntax applies.
2. Run with single quotes around the expression to stop the shell eating characters: `cucumber --tags 'not @wip'`. Expected output: the command runs without shell warnings.
3. Confirm the tag is spelled identically on the scenario, including case and any hyphens. Expected output: tag names match character for character.
4. Run a dry run (`--dry-run`) and list which scenarios would execute. Expected output: the dry-run list shows exactly the filtered set.
5. If using profiles or a config file, check that it is not overriding your `--tags` flag. Expected output: no config is silently replacing your filter.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_hPjGQJoVEPN-lrXGAlLW0w
