Skip to content

1.8.8-6: debugging by AI agents, program check - #1

Closed
NikolaiRadke wants to merge 9 commits into
mainfrom
agent-commands
Closed

NikolaiRadke wants to merge 9 commits into
mainfrom
agent-commands

Conversation

@NikolaiRadke

Copy link
Copy Markdown
Owner

What

  • ardudebug-bridge run: stops the sketch at a line and reads variables, for AI agents on the command line (Claude Code, Codex, ...). Same options, report and exit codes as agentuino-debug, but no Node needed: the bridge is already in the board package. It starts the bridge a second time as GDB server, exactly as the IDE does.
  • ardudebug-bridge serial: reads the Serial output for a fixed time, also during a debug session, and survives a board restart (Leonardo after a debug run).
  • ardudebug-bridge --help prints an overview instead of starting the GDB server.
  • run takes arduino-cli from the PATH, otherwise the one of the Arduino IDE.
  • Program check: platform.txt passes the debug build (ardudebug_elf). Once the stub answers, the bridge compares 17 chunks of flash with the ELF file and stops with an error if the board runs another program. Without the argument (older platform.txt) nothing changes.
  • Windows: the bridge no longer ends the run process that started it.
  • skills/ardudebug/SKILL.md: skill for Claude Code.
  • Version 1.8.8-6, README, NEWS.

Without run, serial or --help as first argument the bridge works as before (IDE, VS Code, Agentuino).

Tested

  • Linux, Uno and Leonardo: IDE debugging unchanged, run with and without debug build, --upload, --restore, --send, serial with normal and debug build and during an IDE session, program check (same program, changed sketch, after upload).
  • Claude Code with the skill found a bug on the board (line end \r vs \n) with a breakpoint before changing the code.
  • Windows, Leonardo: run with the IDE's arduino-cli, serial.
  • Unit tests, including the program check against a program built with avr-gcc.

Not tested: Mega, macOS.


Generated by Claude Code

"ardudebug-bridge run" lets an AI agent stop the sketch at a line and read
variables, "ardudebug-bridge serial" reads the Serial output for a fixed
time. They work like agentuino-debug and agentuino-serial of Agentuino
(same options, report and exit codes), but need no Node: the bridge is
already in the board package. "run" starts the bridge a second time as GDB
server, exactly as the IDE does, so the server code is unchanged.

Without "run" or "serial" as first argument the bridge works as before
(IDE, VS Code, Agentuino).

skills/ardudebug/SKILL.md tells Claude Code and other agents how to find
and use the commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
…erver

Skill: call the bridge only with run or serial.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Waits for a port that is not there yet, opens it again when it disappears
while reading and sends the input again, and says so in the output. DTR and
RTS are switched on as in the IDE's Serial Monitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Before, this was reported as a missing board package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
With the IDE's configuration (~/.arduinoIDE/arduino-cli.yaml) unless
--cli-config is given. Skill updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
killOldBridges ended every other ardudebug-bridge.exe, including the
"run" process waiting for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
platform.txt passes the debug build (ardudebug_elf, an argument of its own
so paths may contain spaces). Once the stub answers, the bridge reads 17
chunks of flash through it and compares them with the ELF file. If they
differ, it stops with an error instead of debugging another program, e.g.
after an upload to another port. Without the argument (older platform.txt)
nothing changes. run reports it as exit code 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197bdW9zCNq2tQswvmLQxG9
@NikolaiRadke
NikolaiRadke deleted the agent-commands branch December 2, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants