feat(cli): add --content-file to messages send - #5246
Open
jcg-git wants to merge 1 commit into
Open
Conversation
Sending multi-line or code-containing content through --content or stdin requires shell redirection/pipelines, which some ACP-hosted CLI agents (e.g. Codex) evaluate as separate command segments needing their own interactive approval -- breaking unattended sends entirely. --content-file reads the message body directly from a UTF-8 file, avoiding redirection/pipelines so a single command covers the whole send. Mutually exclusive with --content; existing --content - stdin form is unchanged. Signed-off-by: Vijay Java <molty@molty.local>
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.
Summary
Adds
--content-file <path>tobuzz messages send, reading the message body directly from a UTF-8 file. Mutually exclusive with--content; the existing--content -stdin form is unchanged.Why
--content/stdin both require the caller to either quote the body inline or use shell redirection/a pipeline (printf ... | buzz messages send --content -). Some ACP-hosted CLI agents (Codex, in our case) evaluate each shell pipeline segment as a separate command needing its own interactive approval — so a pre-authorizedbuzz messages sendallow-rule doesn't cover theprintf | buzz messages send -shape at all, breaking unattended sends for any multi-line/markdown content.--content-fileis a single direct command with no redirection or pipeline, so it's covered by a plain command-prefix allow-rule.This came up concretely running a Codex-backed managed agent (Cocky) that needed to post a saved review file — happy to link more context if useful.
Related
content-filedirectly and found no existing duplicate.Testing
cargo test -p buzz-cli— new focused tests: reads UTF-8 verbatim, rejects a missing file as a usage error, rejects invalid UTF-8, rejects supplying both/neither of--content/--content-file.cargo test --manifest-path desktop/src-tauri/Cargo.toml— Nest/skill-doc tests updated to cover the new example.rust-tests,desktop-tauri-checks) passing locally.--content-fileand it posted correctly.🤖 Generated with AI assistance (Claude Code + Codex), reviewed before submission per this repo's AI-assisted PR policy.