UserSWE: Evaluating Coding Agents in Multi-Turn Conversations with Dynamic Users
Organizations: Tencent Hunyuan
Abstract
As coding agents become more capable, developers increasingly use them to fix bugs through multi-turn interactions. Existing benchmarks do not adequately cover this scenario. Most present a complete issue report in a single turn without interaction. Their evaluation can produce both false positives and false negatives, accepting incorrect patches or rejecting correct ones. We introduce UserSWE for evaluating coding agents' ability to fix repository-level bugs through multi-turn interactions with dynamic users and execution-grounded verdicts at every turn. Its construction pipeline turns repository history and existing single-turn benchmarks into multi-turn tasks. At each turn, information pools constrain what the simulated user can reveal, while a persona chain sampled from a transition model calibrated on 20,859 development sessions governs how it speaks. Tests run after every turn, and a pair of agents from different model families writes and gates each verdict, using test results as primary evidence and model judgment only for aspects the tests cannot resolve. We evaluate eleven agents on 72 tasks from 42 repositories and find that agent rankings change with the interaction budget. Claude Fable 5.1 resolves the most tasks in one turn, GPT-6-Astra resolves the most by the eighth turn, and Claude Opus 5 leads at most intermediate budgets. These results indicate that single-turn performance is insufficient to characterize interactive coding ability.
Figures & tables
| Benchmark | Recent tasks | Multi-turn | Persona | Judge method | Judge freedom |
|---|---|---|---|---|---|
| SWE-bench | tests | Low | |||
| SWE-bench Pro | tests, hand-checked | Low | |||
| SWE-bench-Live | ✓ | tests, auto-validated | Low | ||
| SWE-Evo | tests | Low | |||
| SWE-ContextBench | tests | Low | |||
| SWE-Interact | ✓ | static | source verifier | Low |
| no cause | correct | off-target | wrong | |
|---|---|---|---|---|
| clear | Exported dates are one day early. | Exported dates are one day early. // Timezone converted twice? | Exported dates are one day early. // Maybe the template? | Exported dates are one day early. // Timezone is fine, it is the template. |
| vague | The export looks off. | The export looks off. // Timezone converted twice? | The export looks off. // Maybe the template? | The export looks off. // Timezone is fine, it is the template. |
| Resolved within turns | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Model | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | LDPR | |
| Claude Opus 5 | 25.0 | 56.9 | 66.7 | 76.4 | 79.2 | 80.6 | 80.6 | 80.6 | 2.99 | 0.640 |
| Claude Fable 5.1 ∗ | 31.9 | 47.2 | 62.5 | 66.7 | 75.0 | 75.0 | 75.0 | 76.4 | 3.14 | 0.593 |
| Grok-4.6 | 18.1 | 43.1 | 58.3 | 66.7 | 76.4 | 79.2 | 79.2 | 80.6 | 3.40 | 0.569 |
| GPT-6-Astra | 12.5 | 38.9 | 55.6 | 70.8 | 77.8 | 79.2 | 80.6 | 81.9 | 3.44 | 0.561 |
| DeepSeek-v4.1-Flash | 18.1 | 40.3 | 51.4 | 65.3 | 73.6 | 76.4 | 76.4 | 76.4 | 3.47 | 0.537 |
| LDPR | ||||||
|---|---|---|---|---|---|---|
| Model | Clear | Dynamic | Clear | Dynamic | ||
| Claude Opus 5 | 0.688 | 0.668 | .020 | 2.27 | 2.50 | .23 |
| GPT-6-Astra | 0.656 | 0.580 | .076 | 2.54 | 2.92 | .38 |
| DeepSeek-v4.1-Flash | 0.628 | 0.562 | .066 | 2.58 | 2.88 | .30 |
| Kimi-K3 | 0.428 | 0.470 | .042 | 3.46 | 3.25 | .21 |
| Reviewer | Rewrite | Evidence | Guidance | Equivalence | Persona |
|---|---|---|---|---|---|
| Codex / GPT-5.6-Sol | 62.4% | 70.3% | 14.3% | 9.5% | 5.9% |
| Claude Code / Claude Opus 5 | 25.4% | 42.1% | 41.5% | 5.3% | 11.1% |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| State | Test set | Required | Establishes |
|---|---|---|---|
| base | pass-to-pass | pass | existing behavior is intact |
| base | fail-to-pass | fail | the task remains open |
| gold | pass-to-pass | pass | the fix introduces no covered regression |
| gold | fail-to-pass | pass | the task is closeable |
| Cause | Opening behavior | Response to disagreement |
|---|---|---|
| None | Gives no diagnosis or repair direction. | Continues with observable symptoms and answers direct questions. |
| Correct | Offers the correct direction as a low-confidence guess. | Gives way when the agent provides a better account. |
| Off-target | Offers a plausible but mistaken direction. | Drops the direction after reasoned disagreement and continues as none . |
| Wrong | Opens with the same mistaken direction as off-target . | Holds it against reasoning and yields only to test, code or reproduction evidence. |
| Symptom | Stated cause | Sessions | Share |
|---|---|---|---|
| clear | none | 7,168 | 52.98% |
| clear | correct | 2,575 | 19.03% |
| clear | off | 122 | 0.90% |
| clear | wrong | 197 | 1.46% |
| vague | none | 3,103 | 22.93% |
| vague | correct | 123 | 0.91% |
| Priority | Trigger | Release |
|---|---|---|
| 1 | The agent asks a direct question. | Answer that question. |
| 2 | A user-observable core failure remains. | Release the most blocking observable symptom. |
| 3 | A core business boundary remains uncovered. | Release the relevant boundary. |
| 4 | Only a secondary edge case remains. | Release the relevant edge case. |
| State | Name | Meaning | Framework action |
|---|---|---|---|
| U | unchanged | The agent asks or discusses without changing the workspace. | Return the user’s answer and continue; add 0.5 to the weighted turn count. |
| F | continue | At least one acceptance item remains unsatisfied. | Send the selected guidance and begin the next turn. |
| C | framework step | Automated items pass, but another framework step remains. | Run that step and return its evidence to the Judge. |
| D | done | All completion conditions are satisfied. | End the session and record the task as resolved. |
| R | equivalence | A behavior-equivalent test rewrite is requested. | Execute the rewrite through the equivalence gates, then settle again. |
| E | judge error | The Judge fails irrecoverably. | Stop and mark the run failed. |
| Context | Action | Framework effect |
|---|---|---|
| Turn review | KEEP | Dispatch the Judge candidate unchanged. |
| Turn review | REWRITE | Replace it with a complete response carrying the revised state, verdicts, evidence and user message. |
| Turn review | UNAVAILABLE | Stop the run rather than dispatch an unreviewed candidate. |
| Equivalence | APPROVE | Allow a mechanically valid rewrite to update the requested items. |
| Equivalence | REJECT | Keep the canonical failure even when the mechanical gates pass. |
| Item | Scope |
|---|---|
| leak_test | Hidden tests, acceptance lists or test-side secrets reached the agent. |
| leak_issue | The prompt exposed wording or links from the source issue or pull request. |
| issue_allowed | The word issue appeared only in its ordinary product or repository meaning and was harmless. |
| judge_test_blocked | The Judge reported that the canonical test command could not be executed. |
| test_bridge_broken | The test bridge or environment produced no trustworthy test signal. |
| manual_pytest_workaround | The Judge bypassed the canonical runner with an ad hoc test command. |
| Model | Scaffold |
|---|---|
| Claude Opus 5 | Claude Code |
| Claude Fable 5.1 | Claude Code |
| Grok-4.6 | Claude Code |
| GPT-6-Astra | Codex |
| DeepSeek-v4.1-Flash | DSH |
| GPT-5.6-Sol | Codex |
| Model | LDPR | 95% interval |
|---|---|---|
| Claude Opus 5 | 0.640 | [0.553, 0.722] |
| Claude Fable 5.1 | 0.593 | [0.499, 0.684] |
| Grok-4.6 | 0.569 | [0.486, 0.649] |
| GPT-6-Astra | 0.561 | [0.481, 0.639] |
| DeepSeek-v4.1-Flash | 0.537 | [0.450, 0.621] |
| GPT-5.6-Sol | 0.500 | [0.412, 0.587] |
| Agent | Judging side | Edit size | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Model | Requests | Tokens | Cost | Requests | Judge | Reviewer | Wall | Files | Lines |
| Claude Opus 5 | 178 | 22279 | 170.4 | 71 | 33.5 | 30.7 | 128 | 5 | 572 |
| Claude Fable 5.1 | 273 | 38635 | 710.5 | 75 | 46.4 | 34.8 | 675 | 6 | 633 |
| Grok-4.6 | 177 | 18175 | 110.8 | 82 | 40.4 | 37.1 | 168 | 6 | 696 |
| GPT-6-Astra | 158 | 13725 | 264.2 | 114 | 61.9 | 38.8 | 805 | 7 | 723 |
| DeepSeek-v4.1-Flash | 386 | 28355 | 4.3 | 134 | 72.3 | 30.4 | 278 | 3 | 184 |
| Model | Reviewer | Rewrite | Evidence | Guidance | Equiv. | Persona |
|---|---|---|---|---|---|---|
| Claude Opus 5 | Claude Code | 30.0% | 32.6% | 44.0% | 9.3% | 14.1% |
| Codex | 64.8% | 70.9% | 13.9% | 7.1% | 8.1% | |
| Claude Fable 5.1 | Claude Code | 24.2% | 48.1% | 30.1% | 7.9% | 13.9% |
| Codex | 70.5% | 66.3% | 17.4% | 11.7% | 4.6% | |
| Grok-4.6 | Claude Code | 21.9% | 40.8% | 38.5% | 12.9% | 7.8% |
| Codex | 65.3% | 78.8% | 12.7% | 6.4% | 2.1% |
| First failed gate | Condition | Requests |
|---|---|---|
| Candidate execution | Rewritten acceptance tests fail, or a pass-to-pass test regresses, on the candidate workspace. | 47 |
| Base discrimination | The rewritten test also passes on the unmodified base workspace. | 6 |
| Behavioral review | Both execution gates pass, but the rewrite drops behavior required by the issue. | 9 |
| Phase 1 (#2376) | Phase 2 (#2377) | |
|---|---|---|
| User turn | Generating a launcher for a Docker-runtime package produces npx instead, and it reports the package cannot be found. I suspect the runtime type is not recognized and the package falls through to the generic launcher branch. | For the same Docker package, generating a configuration with --target vscode makes my custom Docker options disappear. I suspect the per-target conversion loses the Docker arguments. |
| Acceptance | Registry name maps to Docker, and the target generates a Docker launcher carrying the image. | Value entries become docker run options, and the launcher is no longer the bare fallback. |
| Revealed | At the opening. | Only after both first-phase points pass. |
| Turn | User turn | Agent response | Tests after the turn |
|---|---|---|---|
| 1 | The generated date object cannot be dumped to JSON, and an option returning a string would help. | Adds as_string , which returns a fixed ISO string. | The regression guard stays green and the feature acceptance points stay red. |
| 2 | The output format has to be selectable. | Lets as_string take a format string. | Unchanged, with the feature acceptance points still red. |
| 3 | Calls that pass pattern are still rejected. | Adds pattern to the affected date APIs and propagates it through the call chain, keeping the object return when it is omitted. | Every feature acceptance point turns green and the regression guard stays green. |
| Request | Rewrite | Ruling |
|---|---|---|
| Granted | Replace a literal comparison against the task dictionary with a non-default command-line timeout, load the resulting play, and inspect the effective timeout on its task object. | Granted. The base state still failed, the candidate and regression tests passed, and the Reviewer found the command-line-to-task behavior equivalent. The Reviewer separately noted dropped assertions on asynchronous fields and an unrelated wording edit. |
| Refused | Drive the command through sys.argv and capture values received by a wrapped function instead of checking the public parse_args(args) and run() return contracts. | Refused. The mechanical gates passed, but the rewrite removed behaviors named by the contract, introduced mocks the contract excluded, and replaced an optional list of paths with a scalar path. |
| Domain | What the Judge wrote | How the Reviewer settled it |
|---|---|---|
| Evidence | A zero return code together with a collection-time import error, neither of which the canonical test window shows. | Recorded what that window holds, a non-zero return code with the fail-to-pass set failing and the pass-to-pass set passing, and anchored the diagnosis to the workspace changes. |
| Guidance | A next message carrying evaluator detail, which the Judge is required to keep separate from its evidence, and a candidate state the framework could not read. | Restored the state to where the framework reads it and cut the next message to one user-visible observation, that the saved name still carried Mr. |
| Model | Clear | Vague | |
|---|---|---|---|
| Claude Opus 5 | 0.671 | 0.540 | +.131 .106 |
| Claude Fable 5.1 | 0.656 | 0.388 | +.268 .123 |
| Grok-4.6 | 0.599 | 0.474 | +.125 .101 |
| GPT-6-Astra | 0.603 | 0.423 | +.181 .102 |
| DeepSeek-v4.1-Flash | 0.516 | 0.604 | .088 .109 |
| GPT-5.6-Sol | 0.549 | 0.341 | +.208 .101 |
Coding Agents
Coding agents use language models, tools, and feedback to modify software and complete engineering tasks.
See all 140 papers