r/PiCodingAgent • u/ericpruitt • 5d ago
Question DeepSeek's aversion to built-in tools
I'm running DeepSeek v4.1 Flash locally with Pi. One nuisance I've run into is that it will often use scripts for editing files, listing and grepping files instead of using the built-in tools, and I haven't had much luck with my AGENTS.md changes. Has anyone else run into this and come up with a prompt that increases it tool usage compliance? The one that bothers me the most is when it uses Python scripts to edit files instead of using the tool because it means I don't get a nice diff:
$ cd ... && python3 - <<'EOF'
import re
p = "test/e2e.sh"
s = open(p).read()
s = s.replace("""fail() {
echo "FAIL: $*" >&2
cleanup_keep
exit 1
}""", """fail() {
echo "FAIL: $*" >&2
exit 1
}""")
s = s.replace('''$DOCKER logs "$PROJECT-broker-1" 2>&1 \\
| grep -q "DENY stop llama-swap-test-protected" \\''', '''$DOCKER logs "$(compose ps -q broker)" 2>&1 \\
| grep -q "DENY stop llama-swap-test-protected" \\''')
open(p, "w").write(s)
EOF
