Skip to content

Agents window (Claude): background agents stay "Working" after they complete #344508

Closed as duplicate

Description

@gogetenk

VS Code 1.143.1 (e646868), Windows 11, Agents window, Claude provider with an Anthropic account (Sonnet), Bypass Permissions. Reproduced on a fresh --user-data-dir.

Repro:

  1. In the Agents window, new Claude session, send this prompt:
Use the Agent tool to launch two subagents in the background (run_in_background: true), in one message. Subagent A runs one shell command that writes the text a to the file a.txt in the current folder, then replies done. Subagent B does the same with b and b.txt. Do not wait for them: right after launching both, end your turn with the single word launched.
  1. Do not send anything else. Wait a few minutes.

Observed:

  • a.txt and b.txt are written at 08:09:22. The Claude transcript gets a <task-notification> with <status>completed</status> for both (Agent "Write a.txt" finished, Agent "Write b.txt" finished).
  • The session shows "launched", then a "Write a.txt" row that keeps counting ("Working for 3m 45s" and on), with printf 'a' > a.txt still shown as Running.
  • "Write b.txt" never gets a row.

agenthost.log for that session:

08:09:21.409 [AgentSideEffects] Starting subagent turn: ahp-chat:/a2179e1d-… (parent=ahp-chat:/cb9446a2-…, toolCallId=toolu_015sPDjKrUdNdEqjx3n186pN)
08:09:21.477 [Claude:b95926f3-…] result for sdkUuid=request_de10ba81-…
08:09:24.222 [Claude:b95926f3-…] result for sdkUuid=undefined
08:09:26.472 [Claude:b95926f3-…] result for sdkUuid=undefined

toolu_015sPDjK… is the tool use id of the completed "Write a.txt" notification. Nothing ever closes the turn started on that line, and no such turn is started for the second tool call.

Expected: each background agent gets a row, and the row moves to done when its completion notification arrives.

Same thing in a long working session: four background agents finished in under 30 minutes and still showed "Working for 839m" the next morning.

Possibly related: #339309, #332073.

Activity

  1. habib-rehman-dev commented on Oct 27, 2026

    @habib-rehman-dev

    Hi If you dont want to see errors then shift to linux OS.

  2. gogetenk commented on Oct 27, 2026

    @gogetenk
    Author

    Duplicate of #332073.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions