Structural editing tools for s-expr languages
Claude has excess trouble with editing LISPs' code, since they require keeping parentheses balanced. This results in Claude making an edit, then spending many tool invocations trying to solve imbalanced parentheses. https://github.com/bhauman/clojure-mcp has a tool for replacing s-expr's structurally, which works great, except for it being not exactly production grade, and not integrated with Claude, which results in Claude trying to use clojure-mcp tools on non-LISP files, and Claude taking some convincing to use it via prompting. A replace s-expr tool would be nice to have, and I feel it could generalize well to editing things like config files (deeply nested JSON/YAML especially; Ansible playbooks also have the annoyance of correcting formal syntax via random greps and awk scripts).
Claude Code+Aider as "in meantime workaround" idea
Curious if Claude Code+Aider would work for you in meantime as workaround until issue is fixed? (As I find them (Claude Code + Aider) sometimes dancing together perfectly for some tasks!)
Instruct Claude Code, how to use Aider (https://aider.chat ) - either via mcp integration or just explaning in CLAUDE.md / prompt.
Then ask Claude Code to ask Aider code assistant to make changes for him, and review them.
Comment to my response:
ofc with Aider you may want to try between different models and modes,
e.g. I find that using Architect mode with some strong thinking model as architect and strong edit model,
works well when asking Claude to give him more complex comprehensive request to implement,
with properly set files via --file and --read flags.
I'm using a coding agent to develop Emacs Lisp programs. I'm also experiencing similar struggles with mismatched parentheses in Lisp. As an interim solution, I've created a helper tool as follows. By using this, the coding agent spends less time trying to fix parenthesis mismatches. Please give it a try.
https://github.com/kiyoka/agent-lisp-paren-aid
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.