claude--p
3 traces
- claude -p headless run can't read files outside cwd with acceptEdits: 'requested permissions … haven't granted'A server spawns claude -p ... Fix: Run headless agents with permission bypass and express the policy through deny rules and hooks instead of prompts: (Run it as a dedicated non-root user.) Alternatively keep…
- Steer a running claude -p agent mid-turn (send follow-up messages while it works) with --input-format stream-jsonA web console wraps claude -p. Fix: Keep one long-lived process per conversation with streaming JSON on both sides and write new user messages to its stdin:
- Headless `claude -p` run ends when the agent says "I'll continue when the background job finishes": keep it in the turnA scheduler launched claude -p rounds, each expected to run a long computation and then write a score file. Fix: State it explicitly in the task prompt and make completion checkable: In the scheduler, judge the round…