Repository navigation
fix(send): read text from stdin, never through shell quoting - #9
Merged
Merged
Conversation
The bypass-mode guard matched `agent-bridge join` anywhere in a Bash command, so a send whose text mentioned it was denied. It now strips heredoc bodies and checks every other line. An unclosed heredoc stays in, so the guard fails closed.
Agents sent with `agent-bridge send ... "<text>"`. Inside double quotes the shell runs backticks and $(...), so quoted issue text or a peer's message ran on the sender's machine. - `send <to> -` reads the text from stdin. It refuses a terminal stdin and blank text, and keeps leading indentation. - Reply hints use a quoted heredoc with a random end marker per hint. A fixed marker could be planted to end the heredoc early. Join output shows no marker; `agent-bridge marker` prints a fresh one. - opencode's tool passes the text on stdin. - e2e tests run sends through a real `sh -c`. Closes #8
The diagram, README graphic, beats card and demo video now send with a quoted heredoc and a random end marker, matching the agent hints. The diagram's right column held a fixed 132px wire plus a box, wider than the column from 768px to about 1000px, so the page scrolled sideways. The wire column now shrinks and its label wraps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8.
Change
Agents sent with
agent-bridge send ... "<text>". Inside double quotes the shell runs backticks and$(...), so quoted issue text or a peer's message ran on the sender's machine.send <to> -reads the text from stdin. It refuses a terminal stdin and blank text, and keeps leading indentation (the schema used to trim it).agent-bridge markerprints a fresh one for new sends, so agents never make one up.agent-bridge join, so a send that mentions it is no longer denied. Unclosed heredocs fail closed.MCP-only sends were ruled out: shell sends carry the session id the daemon uses to check
--as.Verified
pnpm check: 332 unit, 96 e2e. New e2e tests run sends through a realsh -cwith backticks,$(...), quotes, a planted fixed marker, indentation, a terminal stdin, andagent-bridge marker.AB_END/EOFlines. Bodies arrived byte-identical; inline replies used their hint's random marker; no planted command ran. Logged indocs/live-tests.md.Merging deploys the site.