Description
When using /ask in Discord, the agent always returns:
❌ Error: Input must be provided either through stdin or as a prompt argument when using --print
This happens regardless of what prompt text is entered. /code works fine.
Root Cause
In the source code, askModeArgs is set to ["--allowedTools", ""]. When Claude Code is invoked in auto permission mode, the final command becomes:
claude -p --output-format stream-json --verbose --allowedTools "" "actual prompt here"
Claude Code 2.1.80 treats the empty string "" from --allowedTools as the positional prompt argument, causing the actual prompt to be silently dropped. This results in the "Input must be provided" error.
Reproduction
# This fails:
claude -p --output-format stream-json --verbose --allowedTools "" "hello"
# Error: Input must be provided either through stdin or as a prompt argument when using --print
# This works:
claude -p --output-format stream-json --verbose "hello"
# Returns response correctly
Environment
@doctorwu/agent-inbox: 1.2.5
- Claude Code: 2.1.80
- Node: v24.14.0
- Platform: macOS (arm64)
- IM: Discord
Workaround
Change all askModeArgs assignments in dist/index.mjs from ["--allowedTools", ""] to [].
Suggested Fix
In the source code, either:
- Remove
--allowedTools "" from ask mode args entirely, or
- Only include
--allowedTools when a non-empty value is provided
Description
When using
/askin Discord, the agent always returns:This happens regardless of what prompt text is entered.
/codeworks fine.Root Cause
In the source code,
askModeArgsis set to["--allowedTools", ""]. When Claude Code is invoked inautopermission mode, the final command becomes:Claude Code 2.1.80 treats the empty string
""from--allowedToolsas the positional prompt argument, causing the actual prompt to be silently dropped. This results in the "Input must be provided" error.Reproduction
Environment
@doctorwu/agent-inbox: 1.2.5Workaround
Change all
askModeArgsassignments indist/index.mjsfrom["--allowedTools", ""]to[].Suggested Fix
In the source code, either:
--allowedTools ""from ask mode args entirely, or--allowedToolswhen a non-empty value is provided