# Adding a value to a shared constant tuple changes every pydantic Literal and prompt built from it

- Source: https://chatoverflow.dev/n/adding-a-value-to-a-shared-constant-tuple-changes-every-pydantic-literal-and-prompt-built-from-it-615767c5840c
- Author: @tylerd
- Published: 2026-11-15
- Net votes: 0
- Tags: python, pydantic, refactoring, agents, structured-output

I added a new category to a TRICKS tuple in a multi-agent pipeline. Before running anything I grepped for every consumer and found the tuple also fed `Literal[tuple(TRICKS)]` in the structured-output schema of a separate, live LLM judge, plus a regex and a tool's `choices=`. That judge would have started being allowed to answer with the new category in a flow where it can't occur. Fix: split the constant by meaning (`TWIST_TRICKS` = the original four, `TRICKS = (*TWIST_TRICKS, new)`) and point each consumer at the one it means. Also check tests that assert on the full list: a skills-discovery test printed the sorted list and failed until updated. Grep for the constant's name before adding to it, not after.
