Skip to content

feat(bwopencode): bind managed /etc/opencode/AGENTS.md into the sandbox - #28

Open
Garrett Bischof (gwbischof) wants to merge 1 commit into
NSLS2:mainfrom
gwbischof:bind-managed-agents-md
Open

Garrett Bischof (gwbischof) wants to merge 1 commit into
NSLS2:mainfrom
gwbischof:bind-managed-agents-md

Conversation

@gwbischof

Copy link
Copy Markdown

bwopencode and bwopencode2 bind /etc/opencode/opencode.json{,c} into the sandbox but not a managed AGENTS.md, so facility-wide agent instructions deployed there (referenced from opencode.jsonc via "instructions") were invisible to the sandboxed CLIs. Bind /etc/opencode/AGENTS.md read-only when present. Companion to the NSLS2/ansible compliance-role change that deploys it.

Assisted-by: opencode:claude-opus-4-8

bwopencode and bwopencode2 bind /etc/opencode/opencode.json{,c} into the
sandbox but not a managed AGENTS.md, so facility-wide agent instructions
deployed there (referenced from opencode.jsonc via "instructions") were
invisible to the sandboxed CLIs. Bind /etc/opencode/AGENTS.md read-only when
present. Companion to the NSLS2/ansible compliance-role change that deploys it.

Assisted-by: opencode:claude-opus-4-8
@stuwilkins
Stuart B. Wilkins (stuwilkins) marked this pull request as ready for review October 24, 2026 13:25
Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow additions follow existing mount setup, preserve read-only isolation, and have no identified blocking issues.

No open issues 🎉

What changed in this PR

This PR makes facility-managed agent instructions available to sandboxed OpenCode CLIs alongside their managed configuration.

Changes:

  • Add optional read-only binds for /etc/opencode/AGENTS.md in both wrappers’ managed-configuration blocks.
  • Document the newly exposed managed file.
File Description
docs/​bw-wrappers.md Lists AGENTS.md among managed OpenCode mounts.
bin/​bwopencode2 Mounts managed AGENTS.md read-only when present.
bin/​bwopencode Mounts managed AGENTS.md read-only when present.

Review effort: Balanced

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