Problem
The non-interactive / print-mode paths run Claude without attaching stdin:
- Persistent container, existing:
exec docker exec -u claude -w "$HOST_PATH" "$container_name" claude ... (dclaude:1820)
- Persistent container, fresh: same pattern (dclaude:2043)
- Ephemeral: TTY flags are derived from
[[ -t 0 ]], so piped stdin (not a TTY) yields no -i either
So the canonical scripting integration silently gets empty stdin:
git diff | dclaude -p "review this diff" # Claude sees no input
cat error.log | dclaude -p "explain" # same
The TTY-detection table in CLAUDE.md describes exactly these scenarios, but the implementation conflates "stdin is not a TTY" (skip -t, skip tmux) with "don't attach stdin at all" (skip -i).
Fix
-i (attach stdin) and -t (allocate TTY) are independent. Stdin should be attached whenever it's a TTY or a pipe/redirect — effectively always for docker exec/docker run in these paths. Only -t should depend on TTY detection:
docker exec -i $([[ "$STDOUT_IS_TTY" == "true" ]] && echo -t) ...
(Only fully detached/background use would want to drop -i, which dclaude doesn't have.)
Found during a full-project code review.
Problem
The non-interactive / print-mode paths run Claude without attaching stdin:
exec docker exec -u claude -w "$HOST_PATH" "$container_name" claude ...(dclaude:1820)[[ -t 0 ]], so piped stdin (not a TTY) yields no-ieitherSo the canonical scripting integration silently gets empty stdin:
The TTY-detection table in CLAUDE.md describes exactly these scenarios, but the implementation conflates "stdin is not a TTY" (skip
-t, skip tmux) with "don't attach stdin at all" (skip-i).Fix
-i(attach stdin) and-t(allocate TTY) are independent. Stdin should be attached whenever it's a TTY or a pipe/redirect — effectively always fordocker exec/docker runin these paths. Only-tshould depend on TTY detection:(Only fully detached/background use would want to drop
-i, which dclaude doesn't have.)Found during a full-project code review.