Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

retake.toml reference

Retake reads retake.toml from the current directory, or the file given by --config FILE / RETAKE_CONFIG. Every key is optional; unknown keys are an error, and a file that does not load stops the run before the command starts (exit 2). The file has no version key. Its JSON Schema is retake-toml.schema.json; see Editor support.

TableWhat it setsDetails
[redact]Built-in redaction patterns on or off (builtins, disable)Redaction
[[redact.patterns]]Your own patterns: name, regex, max_lenRedaction
[headers]Extra request and response headers to record (request, response)Redaction
[match]Arrays compared in any order (unordered)Normalization rules
[match.builtins]Built-in normalization rules on, off or re-scopedNormalization rules
[[match.rules]]Your own normalization rulesNormalization rules

A file using every table:

[redact]
builtins = true                      # false turns every built-in pattern off
disable  = ["google-api-key"]        # or turn some off by name

[[redact.patterns]]
name    = "employee-id"              # a-z, 0-9 and `-`; used in the placeholder
regex   = 'EMP-[0-9]{6}'             # Rust `regex` syntax
# max_len = 64                       # bytes; required when the regex is unbounded

[headers]
request  = [{ name = "x-tenant", match = true }]   # `match` is required
response = [{ name = "x-ratelimit-remaining" }]

[match]
unordered = ["/metadata/tags"]       # raw paths of arrays compared in any order

[match.builtins]
iso-date  = true                     # turn an off-by-default built-in on
temp-path = false                    # or one off
uuid = { select = ["tool_results", "tool_call_args"] }   # or re-scope it

[[match.rules]]
name    = "prompt-date"
select  = "system"
pattern = '\d{4}-\d{2}-\d{2}'
replace = "DATE"                     # becomes <DATE_1>, <DATE_2>, ...
tests   = ["tests/agent/test_booking.py::*"]   # optional

Changing [match] affects every existing take at its next replay, since rules run at replay time. Changing [redact] affects new recordings, and retake check re-scans committed takes with the current patterns.

Command-line options and their environment variables are listed in the CLI reference.