[Bug] Claude Code generates invalid Python 3.14 PEP 758 exception syntax and fails validation

Resolved 💬 1 comment Opened Jun 8, 2026 by waterworthd-cim Closed Jul 14, 2026

Bug Description
I'm getting constant issues with Python 3.14 PEP 758 exception syntax (i.e. when catching multiple exceptions, no longer need to surrond then in brackets). The agent keeps using PEP 758 syntax, then running code review it rejects the syntax as Python 2.7 then spends ages looking up, verifying and "discovering" that it's correct (but then still misunderstanding how it works). It's make use of Py3.14 with claude infeasible). I've added to memory.md etc but it's not helping

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.168
  • Feedback ID: 71d42a27-c9fb-4340-a610-cae232e900b8

Errors

[]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗