Skip to content

Harness writes synthetic "No response requested." turns when API returns empty content on auto-resume #53260

Description

@talonstump27-wq

Summary

Claude Code writes synthetic assistant-turn records to the transcript JSONL with the literal text No response requested. when an API call for that turn returns a zero-content response. The UI displays the synthetic record as if the model produced it, making the model appear stuck. Continuing the session sometimes causes subsequent real turns to echo the stub back, compounding the appearance of a stall.

Transcript record shape

{
  "type": "assistant",
  "message": {
    "role": "assistant",
    "model": "<synthetic>",
    "stop_reason": "stop_sequence",
    "stop_sequence": "",
    "content": "No response requested."
  }
}

model: "<synthetic>" indicates the harness wrote the record without a real API exchange. The stop_sequence: "" is suspicious — if that empty string is actually passed to the API as a stop sequence, it would match at position 0 of any response and force immediate zero-token termination.

Trigger pattern

15 stubs across one user's transcripts on this machine. Distribution by what immediately precedes the synthetic record:

Preceding event Count
User turn 11
queue-operation 4

100% of the user-preceded stubs are preceded by exactly the same user turn: Continue from where you left off. — the harness's auto-resume prompt, not user-typed. The queue-operation cases are the same pattern after dequeuing batched user messages.

So the trigger is: long-running tool/skill call completes (or session resumes) → harness injects auto-resume → API returns empty → harness stubs No response requested.

Reproducibility

Hits across short and long sessions (106 lines to 1298 lines). Not strictly correlated with context length, though large system-prompt surface (cowork plugin enabled, ~80 skills + ~250 deferred MCP tools loaded) seems to make it more frequent.

Diagnostic recipe

Search any user's transcripts to confirm:

import json, os
for root, _, files in os.walk(os.path.expanduser("~/.claude/projects")):
    for f in files:
        if not f.endswith(".jsonl"): continue
        with open(os.path.join(root, f), "r", encoding="utf-8") as fh:
            for i, line in enumerate(fh, 1):
                try: obj = json.loads(line)
                except: continue
                msg = obj.get("message", {})
                if isinstance(msg, dict) and msg.get("model") == "<synthetic>":
                    print(f"{f}:{i}", msg.get("content"))

Questions for the team

  1. Is empty stop_sequence: "" ever actually passed to the API? If so, that's the root cause.
  2. When the API returns empty content, why does the harness write a synthetic stub instead of retrying with backoff or surfacing the error to the user?
  3. Could the auto-resume prompt include enough context that an empty response is less likely (e.g. the last assistant tool-use, or a recap of the in-progress task)?

Environment

  • Claude Code on Windows 11 (PowerShell + Git Bash)
  • Opus 4.7 (1M context)
  • Large skill/MCP surface (cowork plugin)

Impact

Reported hours of lost work per session for long skill invocations (writing-plans, foundation-research). No actionable error surfaced — the user sees only a model that appears to have given up.

Workarounds users have to apply

  • Avoid queueing messages while a skill runs
  • Manually retype the prompt when the stub appears (don't let it stay in history)
  • Start fresh sessions if the stub appears more than once in a row

Activity

  1. chriscase commented on May 18, 2026

    @chriscase

    Still reproducing on claude-opus-4-7 in May 2026 — same signature exactly as the OP.

    Today's repro

    Long-lived session (33 MB transcript JSONL, ~7,600 lines, ~3 weeks old). User asked "Continue from where you left off." after a long-running shell command appeared to stall — the harness wrote the sentinel as my response, the user saw "No response requested." render verbatim in the UI and reported "looks like claude crashed."

    Transcript records (lines 7634–7636)

    ```
    line 7634 user ts=2026-05-18T00:48:03 "Continue from where you left off."
    line 7635 assistant ts=2026-05-18T00:48:03 model= stop_reason=stop_sequence stop_sequence=''
    content=[{"type":"text","text":"No response requested."}]
    line 7636 user ts=2026-05-18T00:48:38 "looks like claude crashed again..."
    ```

    Identical fingerprint to the OP — model: "<synthetic>", stop_reason: "stop_sequence", stop_sequence: "" (empty string, not null). 8 synthetic records total in this one session's transcript; earlier 7 were preceded by genuine API errors (rate limits, stream idle timeouts) and the synthetic was a stand-in for the failed turn. This 8th one is different — no preceding API error, just a user-supplied "Continue from where you left off." that the harness then answered itself with the sentinel.

    What makes the empty stop_sequence more interesting

    The OP's suspicion that the empty string is being passed back to the API and matching at position 0 of any response — the May 2026 occurrence pattern (every one of my 8 records has stop_sequence: "") supports that theory. If the harness writes a synthetic record once and then any subsequent real-model call inherits an empty-string stop sequence from the conversation state, the model would be forced to terminate at the first token of every response thereafter. That would explain the user-visible "Claude isn't responding to anything" experience that often follows the first synthetic record by ~one or two more synthetic records.

    Worth confirming whether the API call right after a synthetic record carries stop_sequences: [""] in its request payload.

    Environment

    • claude-opus-4-7 (1M context)
    • macOS, latest stable Claude Code CLI
    • Long-running Bash tool call (~30s timeout exceeded? — bash output for the prior tool came back as 502 in the page render, so the prior turn may have timed out client-side while the model was still streaming)
  2. github-actions commented on Jun 16, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  3. github-actions commented on Aug 19, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  4. locked as resolved and limited conversation to collaborators on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workingduplicateThis issue or pull request already existsplatform:windowsIssue specifically occurs on WindowsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions