Fix pages / Pi coding agent

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 entries

Tool: 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 entries

Last verified 2026-10-10 (1.0.4, 1.1.0). Page updated . Also as Markdown and JSON.

How 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 1

After: 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 1

Short 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 1

Fix 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 1

Fix 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 1

Fix 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 1

Why 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

Sources

Last verified: 2026-10-10.