[BUG] tqdm does not work inside Claude Code terminals.

Resolved 💬 2 comments Opened Apr 6, 2026 by davies-w Closed May 16, 2026

Preflight Checklist

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

What's Wrong?

When I try to use tqdm to track a long task, tqdm doesn't work, just prints a line per iteration. I asked Claude to fix it, and it could not. It looks like because the Claude Code terminal overlay strips out any escape sequences that might allow a consistent tqdm animation

What Should Happen?

tqdm should produce animated progress bars inside claude code terminals.

Error Messages/Logs

Steps to Reproduce

import time
from tqdm import tqdm, trange

Method 1: Wrapping an existing iterable

Perfect for lists, dictionaries, or custom iterators

items = ["apple", "banana", "cherry", "date", "elderberry"]

print("Processing items list:")
for item in tqdm(items, desc="Fruit Progress"):
time.sleep(0.5) # Simulate a time-consuming task
# Do work with 'item' here

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗