Comment by bckr
2 days ago
Claude has been adding PYTHONPATH to test commands, and for some reason, the “don’t ask again” doesn’t stick for these types of commands. So I’ve been trying to get it to use make commands, which can modify the environment, and don’t trigger the same permission issues. Just now I finally put it in CLAUDE.md “always use make commands to run tests”. Haven’t seen yet whether it will stick.
I hate to be pessimistic but this is something that CC doesn't seem good at: forgetting the tools that it loves and using the ones you want it to. You might want to try "disallowing" that command(?) explicitly (in addition to adding to CLAUDE.md and/or prompt).
I'm not sure what command is being called to set PYTHONPATH. If my assumption that it relates to a specific command is incorrect the above probably isn't helpful.
Good luck!
haven’t used claude code directly, but at least through copilot ive seen it read my makefile, extract the command, and run it directly after modifications. telling it to use make helped, but wasn’t perfect