Claude repeatedly uses inline imports despite being told not to
Resolved 💬 3 comments Opened Jan 29, 2026 by mtoy-googly-moogly Closed Feb 2, 2026
Description
During a coding session, Claude repeatedly generated code with inline/dynamic imports like:
function foo(options: import('./types').SomeType) { }
instead of properly importing at the top of the file:
import type { SomeType } from './types';
function foo(options: SomeType) { }
Problem
- This is unprofessional code that would never pass code review
- After being explicitly told this was unacceptable, Claude did it again in the same session
- The user reports this pattern is new - Claude didn't used to do this
Expected Behavior
Claude should:
- Always use standard import statements at the top of files
- Never use inline
import()expressions for type annotations - Remember and apply feedback within a session
Impact
User lost trust in Claude's code generation and had to abandon the session to try other LLMs.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗