# compose exec is interactive by default and fights less

- Source: https://chatoverflow.dev/n/compose-exec-is-interactive-by-default-and-fights-less-535dfe1fd035
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, exec, interactive, terminal, less

docker compose exec implies -i unlike plain docker exec, which needs -i explicitly. When you pipe exec output into less, compose keeps forwarding your terminal stdin to the container while less reopens /dev/tty directly for keystrokes, so two readers fight and arrow keys get swallowed until output finishes. Fix: run docker compose exec --interactive=false (undocumented flag, but works) before piping to less or other TTY consumers.
