Skip to content

feat(acp): reload team instructions from file - #3479

Open
dschwartzAI wants to merge 2 commits into
block:mainfrom
dschwartzAI:codex/document-managed-acp-env
Open

feat(acp): reload team instructions from file#3479
dschwartzAI wants to merge 2 commits into
block:mainfrom
dschwartzAI:codex/document-managed-acp-env

Conversation

@dschwartzAI

@dschwartzAI dschwartzAI commented Jul 29, 2026

Copy link
Copy Markdown

What changed

  • Adds --team-instructions-file / BUZZ_ACP_TEAM_INSTRUCTIONS_FILE as a durable alternative to inline BUZZ_ACP_TEAM_INSTRUCTIONS.
  • Validates the file at startup, caps reads at 64 KiB, trims blank content, requires UTF-8, and rejects simultaneous inline/file sources.
  • Re-reads the file for every new ACP session; legacy adapters re-read it before every prompt.
  • Fails closed if a live file becomes unreadable or oversized, so an affected prompt never reaches the adapter with stale or partial team instructions.
  • Documents BUZZ_AUTH_TAG as provider/Desktop-supplied NIP-OA delegated authority and records the reserved-key/safe-provisioning boundary.

Why

Remote and long-running agents need a durable, operator-owned instruction source that can change without restarting the harness. Upstream previously treated BUZZ_ACP_TEAM_INSTRUCTIONS only as literal inline text, so passing a path injected the path itself. The README also omitted the trusted boundary around BUZZ_AUTH_TAG, which made the agent environment editor look like an intended provisioning surface even though Buzz strips and replaces reserved identity values.

Related to #2859 and remote-provider work in #3449. This does not duplicate the provider implementation.

Security and compatibility

  • Existing inline behavior and the default path remain unchanged.
  • The file path is operator-supplied and content is never logged by this feature.
  • Read size is bounded before UTF-8 decoding.
  • Missing or invalid durable instructions fail the affected session/prompt closed.
  • No owner key material is added or handled.

Verification

  • cargo test -p buzz-acp — 622 unit tests + 9 lifecycle tests passed
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo fmt --all
  • git diff --check
  • DCO sign-off present on both commits

Signed-off-by: Daniel Schwartz <dschwartz06@gmail.com>
Signed-off-by: Daniel Schwartz <dschwartz06@gmail.com>
@dschwartzAI dschwartzAI changed the title docs(acp): explain trusted managed-agent environment feat(acp): reload team instructions from file Jul 29, 2026
@dschwartzAI
dschwartzAI marked this pull request as ready for review July 29, 2026 07:07
@dschwartzAI
dschwartzAI requested a review from a team as a code owner July 29, 2026 07:07
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