Skip to content

Autonomous AI sales agent powered by Claude Code or Codex. Finds prospects, writes cold emails, sends campaigns, handles replies, books meetings. No API keys needed — runs on your Claude or Codex subscriptions.

Merge pull request #3 from keepuahead/fix/windows-long-prompt-stdin-v2

Ethan+7940da41b5ac
diff --cc harvey/brain.py
index 57685d3,305ac17..44fbe6f
--- a/harvey/brain.py
+++ b/harvey/brain.py
@@@ -56,17 -57,16 +57,22 @@@ class Brain
``agent``/``task`` label the call in the usage_events ledger so the
dashboard can attribute tokens and cost to specific work.
"""
- cmd = [
- "claude", "-p", prompt,
+ # Windows caps a command line at ~32k chars and surfaces the overflow
+ # as FileNotFoundError (WinError 206), so long prompts go via stdin.
+ prompt_via_stdin = len(prompt) > _MAX_ARGV_PROMPT_CHARS
+ cmd = ["claude", "-p"]
+ if not prompt_via_stdin:
+ cmd.append(prompt)
+ cmd += [
# JSON output carries exact token/cost accounting per call.
"--output-format", "json",
- "--dangerously-skip-permissions",
+ # No tools at all: Harvey only ever needs text back, and prompts
+ # carry untrusted text (prospect replies, scraped pages). With no
+ # tools, an injected instruction has nothing to act with.
+ # --tools "" removes the built-in tools; --strict-mcp-config stops
+ # the operator's own MCP servers and connectors from loading.
+ "--tools", "",
+ "--strict-mcp-config",
]
if session_id:
# The CLI only accepts UUIDs for --session-id; callers pass