Pi coding agent: "Error: --tools: tool names cannot be mixed with +name or -name entries"
Error: --tools: tool names cannot be mixed with +name or -name entriesTool: Pi coding agent (pi). Versions: Affected: 1.1.0 and later; last version without this error: 1.0.4; we reproduced it on 1.0.4, 1.1.0. Exit code 1.
Cause: Pi 1.1.0 (released 2026-10-07) added +name and -name tool modifiers to --tools to adjust default tools instead of replacing them, but requires an argument to be either entirely plain tool names or entirely modifiers.
Fix: Pass either a full comma-separated list of plain tool names or only +name/-name modifier entries.
# replace default tools with an explicit allowlist
pi --tools read,bash,codemode -p "<prompt>"
# or modify default tools by adding or removing individual tools
pi --tools +codemode -p "<prompt>"
pi --tools -bash -p "<prompt>"When --tools contains any entry starting with + or -, Pi treats the flag as modifier mode and applies additions and deletions to its default tool selection (read, bash, edit, write). Mixing plain tool names (an allowlist) with modifier entries in the same --tools or -t flag is rejected by argument validation.
The same cause also prints:
Error: -t: tool names cannot be mixed with +name or -name entriesHow did we reproduce the Pi coding agent error?
A fresh Debian 13 VM from bin/sandbox-run (Node.js 24, root, online, no credentials for any service), destroyed after the run. Run on . Failing command: pi --tools read,+codemode -p "test".
Before: plain list allowed (without modifiers, +codemode treated as literal name) (Pi coding agent 1.0.4):
$ pi --tools read,+codemode -p "test"
No API key found for the selected model.
Use /login to log into a provider via OAuth or API key. See:
/opt/pi-1.0.4/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md
/opt/pi-1.0.4/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md
# exit 1After: mixed tool names and modifiers rejected (Pi coding agent 1.1.0):
$ pi --tools read,+codemode -p "test"
Error: --tools: tool names cannot be mixed with +name or -name entries
# exit 1Short flag form: -t produces the same error (Pi coding agent 1.1.0):
$ pi -t read,+codemode -p "test"
Error: -t: tool names cannot be mixed with +name or -name entries
# exit 1Fix verified (allowlist): full plain list accepted and passes argument parsing (Pi coding agent 1.1.0):
$ pi --tools read,bash,codemode -p "test"
No API key found for the selected model.
Use /login to log into a provider via OAuth or API key. See:
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md
# exit 1Fix verified (modifiers): +name modifier accepted and passes argument parsing (Pi coding agent 1.1.0):
$ pi --tools +codemode -p "test"
No API key found for the selected model.
Use /login to log into a provider via OAuth or API key. See:
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md
# exit 1Fix verified (modifiers): -name modifier accepted and passes argument parsing (Pi coding agent 1.1.0):
$ pi --tools -bash -p "test"
No API key found for the selected model.
Use /login to log into a provider via OAuth or API key. See:
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md
/opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md
# exit 1Why does Pi coding agent print this error?
Pi 1.1.0 added +name and -name entries to --tools to adjust default tools instead of replacing them (such as pi -t +codemode). Validation in getToolListError enforces that any list containing modifier entries must contain only modifiers and no wildcard patterns. (Pi coding agent 1.1.0 release notes)
Related Pi coding agent fixes and pages
Error: Unknown provider "azure-openai-responses". Use --list-models to see available providers/models.(Pi coding agent 1.0.3 and later)- Pi coding agent tool page: Mixing plain tool names with +name or -name in --tools fails with validation error
- All fix pages
Sources
- Pi coding agent 1.1.0 release notes (read 2026-10-10)
- earendil-works/pi commit ddaa0a03: accept +name/-name entries in --tools (read 2026-10-10)
- Pi settings-manager source at v1.1.0 (read 2026-10-10)
- Pi CLI args parser source at v1.1.0 (read 2026-10-10)
- Pi coding agent 1.0.4 release notes (read 2026-10-10)
Last verified: 2026-10-10.