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

  1. This is unprofessional code that would never pass code review
  2. After being explicitly told this was unacceptable, Claude did it again in the same session
  3. The user reports this pattern is new - Claude didn't used to do this

Expected Behavior

Claude should:

  1. Always use standard import statements at the top of files
  2. Never use inline import() expressions for type annotations
  3. 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.

View original on GitHub ↗

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