Claude Code and Codex on your serial port

A coding agent that opens a serial port itself tends to hang. In NeuroTerm the port stays open in a serial tab, and the agent reads the boot log there and types only when you allow it.

The agent hangs on /dev/tty*

Ask Claude Code to check the board and it reaches for the port itself, with cat /dev/ttyUSB0, screen or a short Python script. Users have reported what happens next in Claude Code’s own issue tracker. Issue #6237 (August 2025) reads: “Freezes terminal most of the time when trying to access anything remotely related to tty devices.” Issue #11790 (November 2025) reports freezes on continuous output from serial ports, and #17068 (January 2026) an EBUSY error opening /dev/ttyACM0.

Why it happens

A serial port is a stream that never ends. Reading a file stops at its end; reading /dev/ttyUSB0 waits for the next byte, so a tool call that reads it does not come back. And while your own terminal holds the port, the agent’s attempt to open it can fail as busy.

How NeuroTerm handles it

Your serial tab keeps the port open and keeps the log. Terminal Use, NeuroTerm’s MCP server, lets the agent work in that tab instead of opening the port. It reads the tab’s new output as plain text, with the errors, warnings and boot stages NeuroTerm marked. When it runs a command at a U-Boot or shell prompt, it waits up to 55 seconds for the prompt to come back; a command still running by then comes back as running, with a place to read on from.

Reading needs no approval. Before the agent runs a command, types or resets the board, the tab shows the request and waits for Allow or Deny; no answer in 45 s means no. Allow for this session lets that agent type into that tab without asking again until you press Revoke; Allow automatically, in Settings, lets commands and typing go ahead in every tab, and each one is still marked in its tab. To flash, the agent asks to borrow the port: NeuroTerm closes it so the agent’s own esptool, west or pio can use it, and reopens it in the tab when the agent gives it back; reopening may reset the board.

An approval request at the bottom of a serial tab, with Allow and Deny
The request in the serial tab: Allow, or the arrow for this session or every tab. The board is simulated in the demo.

Codex works the same way

NeuroTerm registers its MCP server with Claude Code and Codex for you. Start codex in a NeuroTerm Local or WSL tab and it gets the same tools and asks the same way, in the tab it wants to use. On Windows, start Codex from a WSL tab: a Codex started natively on Windows can miss the tab it runs in. A Codex that was already running needs a restart to see the server; a running Claude Code needs /mcp.

Set up in a minute

Open Settings → Coding agents → Setup, choose Set up… in the row of the host where your agent runs, then Set up… next to Terminal Use. Then start claude or codex in a Local or WSL tab (Codex on Windows: a WSL tab) and ask, for example, “Read the boot log in my serial tab”.

It works on Windows and Linux, for an agent started in a NeuroTerm Local or WSL tab. An agent started over SSH runs on the remote host and cannot reach NeuroTerm. Terminal Use (MCP) setup and tools