claude-code - 💡(How to fix) Fix [BUG] Bash tool hangs and executes as background tasks in VSCode Copilot harness [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52933Fetched 2026-04-25 06:16:51
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Description:

The Bash tool hangs when invoked through the Claude SDK/VSCode Copilot harness. All bash commands are spawned as background tasks instead of executing synchronously and returning output.

Environment:

  • Platform: Linux (EL 8.10)
  • Claude Code via: VSCode Copilot extension (Claude SDK agent harness)
  • Settings: Minimal (only theme and attempted sandbox config)

Actual Behavior:

Every bash command returns immediately with a background task ID instead of executing. The task output file exists but remains empty. No errors appear in VSCode developer console.

Diagnostics:

  • File tools (Read, Write, Glob, Grep) work correctly
  • Bash tool always hangs, regardless of command
  • No console errors in VSCode
  • settings.json changes don't help
  • Disabling sandbox doesn't help

Related Issues:

#52917, #52910, #52920

What Should Happen?

Bash commands execute synchronously and return output immediately.

Error Messages/Logs

Steps to Reproduce

  1. Search for files in this directory beginning with the letter a

Result: Command running in background with ID: [id]. Output is being written to: /tmp/.../tasks/[id].output

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

claude-haiku-4-5-20251001 VIA github.copilot-chat 0.45.1

Platform

Other

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

Using VSCode copilot extension handing off to claude code SDK

extent analysis

TL;DR

The Bash tool hanging issue in the Claude SDK/VSCode Copilot harness may be resolved by investigating the asynchronous execution of Bash commands and the handling of task output files.

Guidance

  • Investigate the Claude SDK/VSCode Copilot harness configuration to determine why Bash commands are being spawned as background tasks instead of executing synchronously.
  • Verify that the task output file is being properly written to and that its contents are being returned as the command output.
  • Check the settings.json file for any configuration options related to command execution or output handling that may be causing the issue.
  • Consider testing the Bash tool with a simple command to see if the issue is specific to certain commands or if it's a general problem with the tool.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue may be related to the way the Claude SDK/VSCode Copilot harness handles asynchronous command execution or the configuration of the Bash tool. Further investigation is needed to determine the root cause of the issue.

Recommendation

Apply workaround: Investigate and modify the Claude SDK/VSCode Copilot harness configuration to ensure synchronous execution of Bash commands and proper handling of task output files, as the current version of the software does not seem to provide a straightforward solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Bash tool hangs and executes as background tasks in VSCode Copilot harness [1 participants]