Try the demo

The '<' operator is reserved for future use

A bash heredoc, run in PowerShell. Agents write them out of habit.

The error

PS> python - <<'EOF'
At line:1 char:11
+ python - <<'EOF'
+           ~
Missing file specification after redirection operator.
At line:1 char:10
+ python - <<'EOF'
+          ~
The '<' operator is reserved for future use.

Windows PowerShell 5.1 prints both messages. PowerShell 7 finds the same two, but its default error view shows only the first: ParserError: Missing file specification after redirection operator.

Why it happens

<<'EOF' is bash syntax for "feed the following lines to the command". PowerShell has no heredoc, and it doesn't use < for input at all. It reads the first < as an operator it hasn't implemented, and the second as a redirection with no file after it. Coding agents trained mostly on bash reach for a heredoc whenever they want to run a few lines of Python.

The fix

PowerShell's equivalent is a here-string, piped to python -:

@'
name = "world"
print(f"hello, {name}")
'@ | python -
  • @' and '@ must each sit on a line of their own, with '@ at the start of its line.
  • The single-quoted form keeps $ and backticks as they are, as <<'EOF' does in bash.
  • Avoid python -c @'...'@: PowerShell 7 passes it through, but Windows PowerShell 5.1 strips the double quotes inside, and Python stops with SyntaxError: '(' was never closed.
  • Windows PowerShell 5.1 also pipes text to programs as ASCII by default, so é or → arrives as ?.

For anything longer, or with non-ASCII text, write the code to a .py file and run the file. Nothing on the way rewrites a file.

How DMN learned it

It came up, and was fixed, in 2 of our own sessions. DMN kept the fix as one line: PowerShell has no bash heredoc (<<'EOF'); pass Python code via python -c @' ... '@ (a here-string) or write a .py file, instead of python - <<'EOF'. Checking it for this page showed the python -c form breaks in Windows PowerShell 5.1, hence the pipe above.

DMN reads your agents' past sessions on your machine. When the same error is fixed the same way in two or more of them, it keeps the fix as a one-line lesson. When the error turns up again, Claude Code is told the fix straight away, and any agent can search what earlier sessions found. How DMN keeps what agents learn.

Stop fixing the same error twice