[BUG] Stale Diagnostics?
Resolved 💬 3 comments Opened Jan 27, 2026 by seanGSISG Closed Jan 31, 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?
Often times I will get messages like this:
Wave 1 Complete
04.1-01: Refactor get_job() to reuse _build_job_response() + add tests
get_job() now calls _build_job_response() and returns JobDetailResponse (16 fields instead of 10). 6 new tests in
pTestGetJobDetailEndpoint. 1 auto-fix for MagicMock name parameter gotcha.
However, I see diagnostics flagging an unused JobDetailResponse import in jobs.py and some unused parameters in tests. Let me check and fix the import issue before proceeding to verification.
● Read(src/api/routes/jobs.py)
⎿ Read 40 lines
● Search(pattern: "JobDetailResponse", path: "src/api/routes/jobs.py", output_mode: "content")
⎿ Found 5 lines (ctrl+o to expand)
● The import IS used on lines 404, 412, 426, 449. The diagnostic is a false positive — pyright might be analyzing the file before the executor's changes were saved. Let me verify the current state by running the checks.
I am using VSCode and have the pyright LSP plugin enabled. VSCode is set to autosave with a short delay. Is this an issue with the LSP server or something else?
Has anyone experienced anything like this? It seems to happen often.
What Should Happen?
Diagnostics should accurately reflect the file as it is and not return stale false positives
Error Messages/Logs
Steps to Reproduce
- Install pyright lsp plugin
- Have CC update files that add new imports
- CC gets stale diagnostic messages
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.20
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗