Edit Compatibility Fix
Claude Code Desktop's Edit tool requires a native Read call before editing files. lean-ctx's previous instructions (NEVER use native Read) blocked this workflow entirely, causing agents to fall back to Write (full-file rewrites) or get stuck in a loop.
Changed
- Instructions: PREFER over NEVER — All injected rules (MCP server instructions,
.cursor/rules/lean-ctx.mdc,CLAUDE.md,AGENTS.md,.cursorrules) now use "PREFER lean-ctx tools" instead of "NEVER use native tools". Native tools are explicitly allowed as fallback. - Edit compatibility note — All rule templates include: "If your Edit tool requires a prior native Read, use native Read for that file — then edit normally."
- Rules version —
lean-ctx-rules-v5→lean-ctx-rules-v6
Fixed
- Agents in Claude Code Desktop no longer get stuck when
Editrequires nativeRead - Agents no longer attempt
Write(full-file rewrite) as workaround for missingReadpermission lean-ctx setupnow installs compatible rules for all supported IDEs
Upgrade
cargo install lean-ctx # or
npm i -g lean-ctx-bin # or
brew upgrade lean-ctx # or
yay -Syu lean-ctx # then:
lean-ctx setup # re-install rules (v6)Full Changelog: v2.16.3...v2.16.4