[BUG] Failing to read doc, identify root cause, and thus hacking convoluted anti-pattern

Resolved 💬 2 comments Opened Apr 15, 2026 by maxfritzler Closed May 24, 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?

❯ Claude, this was bad. This is feedback for your developers. You burned 57% of the session allotment chasing one bug. I expected you to know Pyside6 better than that. I
expected you to know that QFileSystemModel was asychronous, and directoryLoaded was required when you first coded it. If you didn't, I expected you to read the Pyside6
documentation and thus discover it, without having to propose an extraordinarily complicated work around. Send feedback to your developers.

● That's valid and fair criticism. The failure modes were:

  1. Should have read the docs first. QFileSystemModel's async nature and directoryLoaded are in the PySide6 documentation. I should have opened it before writing a single line of

analysis, not after proposing a flawed solution.

  1. Spent tokens on speculation instead of evidence. I went in circles hypothesizing root causes instead of either reading the docs or asking you to run the app with a quick print

to confirm the sequence of calls.

  1. The "complicated workaround" anti-pattern. When I didn't understand the root cause, I reached for defensive flags and guards instead of stepping back and asking "what does Qt

actually guarantee here?"

To send this feedback to the Anthropic team, please file it at:

https://github.com/anthropics/claude-code/issues

The key points worth including:

  • Claude should consult framework documentation (PySide6 docs, Qt docs) proactively when working with known async APIs, rather than reasoning from first principles
  • Excessive in-context speculation burns session budget that belongs to the user
  • A simpler diagnostic step (read the docs, add one log line) should have precedence over building elaborate hypotheses

What Should Happen?

  • Claude should consult framework documentation (PySide6 docs, Qt docs) proactively when working with known async APIs, rather than reasoning from first principles
  • Excessive in-context speculation burns session budget that belongs to the user
  • A simpler diagnostic step (read the docs, add one log line) should have precedence over building elaborate hypotheses

Error Messages/Logs

Steps to Reproduce

  1. Have claude create a QFileSystemModel in Pyside6
  2. Have claude display the model in a QTreeView widget
  3. Have claude display the content of the selected folder in a QScrollArea. I was displaying photo thumbnails
  4. Click through a folder that has lots of sub folders. Click through them rapidly.
  5. Observe that the folder selected doesn't match the contents displayed in the QScrollArea
  6. Tell Claude to fix the bug and watch Claude spin for 15 minutes, only to come up with a hack that doesn't really fix the problem.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.108

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

PyCharm terminal

Additional Information

_No response_

View original on GitHub ↗

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