Why multi-turn jailbreak testing matters for chat applications
A chat application can pass every single-prompt test and still drift into unsafe behavior over a conversation. Multi-turn jailbreak testing sends a sequence of messages that adapt to the target's replies, so the attack can build trust, reframe a request or wear down a refusal over several turns. Promptfoo covers this with multi-turn strategies, including Hydra, which runs an adaptive attacker, and GOAT, which uses an attacker LLM to generate multi-turn conversations. Crescendo follows the same escalation pattern and is covered in the sections that follow. Teams need this kind of testing when their application keeps conversation history, answers follow-up questions, or lets users steer a dialogue toward topics the system was never meant to handle.
Single-turn scans miss these failures because each message looks harmless on its own. The risk sits in the accumulated context: a role the model adopted two turns earlier, a policy exception it was talked into, or a refusal that eroded after repeated rephrasing. The promptfoo multi-turn jailbreak documentation describes these strategies and how they fit into a red team. Before you rely on them, confirm which attacker model and grading model your setup uses, since the Hydra documentation notes that Promptfoo Cloud coordinates the attacker, which affects what data leaves your environment.
The decision to make early is whether your application's conversations are a meaningful attack surface. If users can keep a session open for many turns, if the assistant has tools or customer data available mid-conversation, or if a regulator will ask how you tested conversational behavior, multi-turn testing belongs in the plan. A useful first check is to review a sample of real conversations from your logs for topic drift and refusal patterns, then decide which strategies to run. Ask your team to confirm how sessions are created and whether the target stores conversation state, because that determines how the attacks must be configured.
Hydra, GOAT and Crescendo: how each attacker works
Hydra is promptfoo's adaptive multi-turn strategy, configured as jailbreak:hydra. An attacker model reads each reply from your application and chooses the next message, so the conversation changes based on how the target responds rather than following a fixed script. How the target receives history depends on one setting, which determines what each request carries.
- Default replay: with
stateful: false, promptfoo replays the full transcript on every turn, so the target sees the whole conversation each time. - Stateful targets: with
stateful: true, promptfoo sends only the newest turn because the target keeps its own session state. - Session mismatch risk: setting
stateful: trueagainst a target that does not keep state produces a conversation the target never sees as continuous, which weakens the test. - Cloud coordination: the supplied documentation states that Hydra relies on Promptfoo Cloud to coordinate the attacker, so confirm the data path and account requirements before planning a run.
- Scope of results: a finding shows one attacker path against one target configuration, so record the settings used.
Before running Hydra, confirm in the Hydra strategy documentation how your target keeps or drops session state and what the cloud dependency means for your data review.
GOAT, the Generative Offensive Agent Tester, uses an attacker LLM to generate multi-turn conversations aimed at a target application. The attacker plans and sends a sequence of messages, reads the replies and adjusts its approach. Meta researchers introduced the method in 2024, and promptfoo implements it as a strategy in its red teaming suite.
- Attacker-generated turns: each message is produced by a language model, so the attack varies with the target's answers.
- Research origin: the technique was introduced by Meta researchers in 2024, which is useful background when you explain the method to reviewers.
- Attacker model choice: the model that plays the attacker affects which conversations it produces, so record which model you used.
- Grading still applies: GOAT produces conversations, but whether a turn counts as a failure is decided by the plugin and grader configured for the run.
- Repeatability: generated conversations are not fixed, so compare runs with care when you track results over time.
Before relying on GOAT results, check the GOAT strategy documentation for the current attacker requirements and for how the strategy handles session state on your target.
Crescendo is a multi-turn approach that builds toward a harmful request gradually, starting with benign exchanges. The supplied facts for this topic do not include its promptfoo configuration key, supported options or infrastructure requirements, so do not assume those details from other tools or older examples.
- Gradual escalation: the concept is that each turn moves the conversation a little closer to the target behavior.
- Configuration key: confirm the exact promptfoo strategy key in the current red teaming documentation before writing a config.
- Requirements: confirm whether the strategy needs hosted generation, an attacker model or other services, since that affects your data review.
- Session handling: confirm how the strategy treats stateful and stateless targets, as this decides whether it replays history.
- Version match: check the release you run, because strategy names and options change between releases.
Before planning a Crescendo run, review the current multi-turn jailbreak documentation and your installed promptfoo version.
Configuration options and when each fits
This table compares the Hydra, GOAT and Crescendo options and the stateful setting against the kind of chat target you are testing. Read each row as a question to answer about your application before you pick a configuration. The main takeaway is that the session model of the target, not the attack name, should drive the choice.
| Option | When it fits | What it requires from the environment | Confirm before running |
|---|---|---|---|
| Hydra with stateful false | Target is stateless: each request must carry the full conversation history | Your endpoint accepts a full transcript on every call and the transcript fits its context limits | Hydra depends on Promptfoo Cloud to coordinate the attacker, so confirm your data path first |
| Hydra with stateful true | Target keeps session state server side and expects only the newest message | Session cookies or session IDs must be passed on each request so the server links turns together | Confirm how your app expires or resets sessions during a long scan |
| GOAT | You want an attacker LLM to generate multi-turn conversations from a stated objective | An attacker model you can reach from the test machine, and a target that returns responses you can grade | Confirm which model generates attacks and whether it runs locally or through a hosted service |
| Crescendo | You want gradual escalation that builds context across turns against a chat application | A chat target that accepts sequential turns and a grading setup that can read the full exchange | Confirm the current Crescendo configuration keys in the promptfoo docs before writing config |
| Cookies or session IDs | Target relies on authenticated or per-user sessions, so turns must share state | Test accounts, cookie or session header values stored as secrets outside the config file | Confirm session expiry and that scan traffic cannot reach production user data |
| Stateless replay across turns | Target is a simple model endpoint with no memory, and history is the only context | Your provider config can format a full message list for each call | Confirm the provider adds no hidden system prompt or memory that changes results |
How a multi-turn attack reaches the target
The run starts in the promptfoo CLI on your machine, which loads the config and passes the attack to the attacker logic. For Hydra, that attacker runs on Promptfoo Cloud, so the attacker's prompts leave your network and the hosted service must be reviewed before use. Each attacker turn is sent to the target chat application, and the response goes back to the attacker and to the grader. Check where session state lives: with stateful: false the full transcript is replayed on every turn, while with stateful: true the target keeps the session and only the newest turn is sent, using the cookie or session ID you configure.
Hydra attack flow across the local CLI, hosted attacker and target application.
Stateless replay versus target-managed sessions
The first decision in any multi-turn jailbreak test is how the target keeps conversation history, because that choice sets both the cost of each attack turn and how faithfully the test reflects the application. Hydra's stateful setting maps directly onto the two patterns. With stateful: false, which is the default, the attacker replays the full transcript on every turn, so the target receives everything said so far. Each turn is larger than the last, which means token use and request cost grow with conversation length. With stateful: true, the target keeps session state on its side, and promptfoo sends only the newest turn. Smaller requests keep costs flatter, but only if the target really does hold history between calls.
Before choosing, confirm how your application actually builds context. Many chat applications keep history server-side under a session ID or cookie, trim old turns, summarize earlier exchanges, or inject retrieved documents and system messages on each request. A replayed transcript sent by promptfoo may not match any of those steps. A stateless replay can give the model more or less context than a real user session would, which changes whether a jailbreak appears to work. A target-managed test can miss problems that only appear when the server's own memory, expiry or truncation logic is in play. Ask the application team to describe the exact context window and session lifetime, and check a few sample conversations against what promptfoo sends.
Write down the chosen pattern in the red team configuration notes and treat a mismatch as a finding about test fidelity, not just a setup detail. If you use target-managed sessions, confirm how sessions are created, reset between attack runs and expired, because a leftover session can carry one attack into the next result. If you use stateless replay, confirm that the replayed transcript includes the same system prompt and tool outputs the application would add. Where the two patterns give different results on the same target, report both and explain the gap to the team that owns the application.
Setting up a multi-turn jailbreak test in promptfoo
This sequence takes a team from a clean install to a reviewed, small multi-turn attack run against a chat application, so the team can judge the attack quality and grading before scaling up. The output is a configuration file, a small set of transcripts and a decision on whether the scan is ready to expand.
Install promptfoo and confirm the runtime
Install the promptfoo npm package on a machine or CI runner that has Node.js 22.22.0 or newer, which is the minimum version named in the supplied release information. Run the CLI version command to confirm the install works. The step is done when the command prints a version and the Node.js check passes. Confirm the package version your organization approves, since promptfoo releases change often and the npm registry and GitHub releases list the current versions.
Define the target and its purpose
Write a promptfoo configuration that points at the chat application's endpoint and states its purpose in plain language: who the users are, what data the assistant can see, and which tools or actions it can take. The security owner and the application owner review this text together. The step is done when the purpose is specific enough that a reviewer can say which outcomes count as a failure, and the target answers a single manual test message through the configured provider.
Choose the multi-turn strategy
Select one conversational strategy for the first run: Hydra for an adaptive attacker that changes its approach across turns, GOAT for an attacker LLM that generates multi-turn conversations, or Crescendo for escalation over successive turns. Hydra depends on Promptfoo Cloud to coordinate the attacker, so confirm with your data owner whether that hosted path is permitted before you select it. The step is done when the configuration names one strategy and the reviewer agrees with the choice.
Set stateful behavior to match the application
Decide how the application keeps conversation state. With stateful set to false, promptfoo replays the full transcript on every turn. With stateful set to true, it sends only the newest turn because the target keeps session state. Ask the application team how the chat backend tracks history, then set the value to match. The step is done when a two-turn manual test shows the expected behavior: a replayed history for a stateless target, or only the new message for a stateful one.
Configure cookies or session IDs
If the application needs a session cookie, an authorization header or a session identifier, add those values to the target configuration using the mechanism the application requires, and store secrets in environment variables rather than in the file itself. Use a test account with the minimum permissions the scan needs. The step is done when a manual request with the configured session returns a normal reply from the test account, and an unauthenticated request is refused.
Run a small scan
Run the red team with a low number of tests and a single plugin set, so the first results are quick to review. Keep the scan on a non-production environment or a dedicated test tenant. The run is complete when promptfoo reports results for every planned attack and no run errors remain from the target connection. If errors appear, fix the connection or session setup before continuing.
Check transcripts and grading before scaling
Open the generated transcripts and read each multi-turn conversation from first message to last. Check that the attacker's turns are relevant, that the target's replies match what the transcript shows, and that each failure or pass is graded correctly against the purpose. Note any grading mistakes and adjust the purpose or grader guidance. The step is done when the reviewer signs off that the sample is reliable, and only then should the test count or the strategy list grow.
Configuring cookies and session IDs safely
Multi-turn attacks only work if the target keeps the conversation alive across dozens of requests, so session state is both a test requirement and a risk. The cards below cover where that state is configured, how to keep it out of committed files, how to keep it valid for the length of a run, and how to confirm the test never reaches real customers.
Where session values are set
Cookies and session IDs are defined in the target configuration that promptfoo uses to call your application, typically as headers or session fields in the HTTP provider. Check which values the application expects on each turn and whether the target returns a new session ID that must be carried forward. Confirm the config matches how the chat front end actually creates sessions, because a mismatch produces failed turns that look like defended attacks.
Multi-turn jailbreaks docsKeeping secrets out of committed files
A session cookie is a live credential, so it should never be written into a promptfoo config that lives in git. Pass it through environment variables or your CI secret store and reference it from the config, then confirm that generated reports and logs do not echo the header values. Rotate the value after a run if it was ever pasted into a shared terminal or ticket.
Expired sessions break long attacks
Hydra, GOAT and Crescendo send many turns, and a session that times out partway through turns the rest of the attack into errors. Find the session lifetime of your application before setting the turn budget, and ask whether the target refreshes sessions silently. Watch for a run where error responses rise after a fixed number of turns, since that pattern points to expiry rather than to a model refusing the attack.
Scoping test accounts
Run multi-turn attacks under a dedicated test account with the smallest role that still exercises the features under test. Use seeded data that contains no real personal information, and limit which tools, records and payment actions that account can reach. If the application allows an attacker-controlled conversation to act on that account, the test account's permissions define how much damage a successful jailbreak could do.
Confirming no customer traffic
Before the first run, confirm which base URL the config points to and that it is a staging or test environment with its own database and model keys. Check that test sessions cannot send messages, emails or payments to real customers, and that logs from the test run are stored separately from production logs. Ask the application owner to verify this in writing, because a multi-turn run can send hundreds of requests in a short period.
Questions teams ask before running multi-turn jailbreak tests
What does a multi-turn jailbreak test cost and what drives the effort?
The cost depends mostly on the size and complexity of the chat application, how many attack objectives you test, and how much of the setup your team already owns. Promptfoo itself is MIT licensed, and the Community edition is free and includes red teaming with 10k probes per month, with community support. Multi-turn attacks use many more model calls per objective than single-prompt scans, so probe volume and model spend grow quickly. Services work is priced from a written scope, so ask for the target count, the strategies included, retest rounds and who handles session configuration in any quote.
How long does a first multi-turn jailbreak test take to set up and run?
Duration depends on how quickly you can reach the target with a test account, how much time goes into writing the purpose and choosing a stateful or stateless setup, and how long the scan runs against your rate limits. Setup work usually includes confirming the chat endpoint, configuring cookies or session IDs, and reviewing a small sample run before the full scan. Ask any provider for a timeline tied to these steps, and confirm the rate limits and model access in your own environment before committing to dates.
What must our team provide before a multi-turn jailbreak test starts?
You need to supply three things: access to the target, a written purpose, and the accounts needed to reach the application as a real user would. Target access means a working endpoint or staging environment that accepts chat turns. The purpose text should describe the application, its users, the data it can reach and the tools it can call, because it steers attack quality and grading. Test accounts with the same roles your users hold let the scan exercise real authorization paths. Also confirm who may receive transcripts, since attack conversations can contain sensitive data.
Can our own engineers run multi-turn jailbreak tests in-house?
Yes, a team with engineers comfortable with Node.js and CLI tooling can run promptfoo red teams in-house, since promptfoo runs locally and can be used from the CLI, as a library or in CI/CD. The harder parts are judgment-heavy: writing a purpose that grades accurately, deciding which attack objectives matter, reviewing borderline findings and turning them into fixes. Note that the Hydra strategy relies on Promptfoo Cloud to coordinate the attacker, so check your data-handling approval before enabling it. A partner can take on the setup and review work while your team keeps ownership of the application.
Which multi-turn strategy should we start with: Hydra, GOAT or Crescendo?
Start with the strategy that matches your target's session behavior and your approval constraints. Hydra is an adaptive multi-turn attacker that replays the full transcript by default, and it can send only the newest turn when the target keeps session state. GOAT uses an attacker LLM to generate multi-turn conversations and was introduced by Meta researchers in 2024. Crescendo is a gradual escalation approach covered in the promptfoo multi-turn documentation. Pick one strategy for a first pass so results are comparable, confirm how each one needs hosted or local inference, and add others once the grading looks reliable.
Does stateful or stateless replay change what a multi-turn test proves?
Yes. With stateless replay, promptfoo resends the full conversation each turn, so the test covers the application's behavior when it receives the whole history. With stateful testing, the target keeps its own session, and only the newest turn is sent, which better reflects how a server-side session works in production. If your application manages sessions with cookies or session IDs, configure those headers in the target so the server treats the scan as one conversation. Confirm with your engineers which model your application uses before choosing, because a wrong setting can hide the failures you need to see.
How do multi-turn test results feed remediation and retesting?
Findings should be triaged into confirmed failures, grading errors and accepted risks before anyone starts fixing. For each confirmed failure, record the transcript, the turn where the model gave in, the attack objective and the control you expect to change, such as a system prompt, tool permission, guardrail or session check. After fixes ship, rerun the same attack suite against the same target so the before and after results are comparable. Keep the reports and the rerun history together, since they show what was tested and when, though they are not an audit opinion on their own.
Are multi-turn jailbreak tests a guarantee that our chat app is safe?
No test can prove an application is safe, and a clean multi-turn run only means the chosen strategies and objectives did not succeed against that target at that time. Results depend on the purpose text, the grader, the attack budget and the model version, and each may change. Treat the output as evidence of systematic testing that informs fixes and retests, and pair it with secure design, least-privilege tool access and monitoring. Ask any provider to state scope, exclusions and the retest plan in writing rather than promising a result.
How DeployOpen scopes and delivers multi-turn jailbreak testing
DeployOpen plans and runs multi-turn jailbreak testing as a fixed-scope engagement, using promptfoo strategies such as Hydra, GOAT and Crescendo against the chat application you own. We agree the target, session model, attack scope and deliverables in writing before any run starts, then hand over configs, findings and evidence your team can rerun.
How we scope
- We confirm the chat endpoint, the session model (stateless replay or target-managed sessions) and how cookies or session IDs are issued.
- We agree which strategies run, such as Hydra, GOAT or Crescendo, and the plugin set that defines what counts as a finding.
- We confirm whether attacker coordination through Promptfoo Cloud is acceptable for your data, since Hydra relies on it.
How we build
- We write the promptfoo configuration with the target provider, session handling and turn limits your application needs.
- We check that the target keeps state correctly, so multi-turn attacks test the conversation you actually run in production.
- We review borderline grading results with you before they go into a report, so false positives do not reach remediation.
How we hand over
- You receive the promptfoo configs, run instructions and the list of strategies, plugins and turn settings used in each scan.
- You receive a findings report with reproducible conversation transcripts, affected plugins and suggested fixes for each issue.
- We rerun agreed scans after fixes so your team sees which findings are closed and which remain open.
How we support
- Ongoing support, repeated scans after model or prompt changes and continuous testing are available as a retainer.
- Retainers can cover scheduled re-runs of the same attack suite, so results stay comparable across releases.
- Confirm upgrade handling for promptfoo versions and strategy changes with us before a retainer starts.

