Skip to content

build run prints shell output and reflects exit code, add pop command#7

Merged
simonw merged 2 commits intomainfrom
claude/shell-output-undo-command-NVl87
Feb 8, 2026
Merged

build run prints shell output and reflects exit code, add pop command#7
simonw merged 2 commits intomainfrom
claude/shell-output-undo-command-NVl87

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Feb 8, 2026

build commands that run shell should return the output from the shell that was added to the document as their output - they should also reflect the exit code of that shell

This will allow the agent to see what happened while it is writing the document

There should be a new command called undo which takes the name of the document and simply removes the most recent added entry - then if a build command returns an error the agent can decide to remove that error from the in progress document (though in some cases the error may be a deliberate demonstration of an error in which case the agent could chose to leave it)

Explain this new feature in both the README and the –help text

Use showboat to demo the new feature too

build run now prints the captured shell output to stdout and exits with
the same exit code as the executed command. This lets agents see what
happened during execution and react to errors - the output is still
appended to the document regardless of exit code.

New pop command removes the most recent entry from a document. For run
or image entries this removes both the code block and its output. For
commentary it removes the single block. Useful when a build command
produces an error that shouldn't remain in the document.

Closes #7

https://claude.ai/code/session_01P6XzyUuxBJZctdB3UccVMC

build run now prints the captured shell output to stdout and exits with
the same exit code as the executed command. This lets agents see what
happened during execution and react to errors - the output is still
appended to the document regardless of exit code.

New pop command removes the most recent entry from a document. For run
or image entries this removes both the code block and its output. For
commentary it removes the single block. Useful when a build command
produces an error that shouldn't remain in the document.

Closes #7

https://claude.ai/code/session_01P6XzyUuxBJZctdB3UccVMC
Add pop and build run examples to --help text so agents can learn
the new features from help output. Redo the demo document to show
actual showboat commands running against /tmp/demo.md.

https://claude.ai/code/session_01P6XzyUuxBJZctdB3UccVMC
@simonw simonw merged commit b68d4ee into main Feb 8, 2026
2 checks passed
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