Skip to content

Context-filter guidance, Brex framing, and read-only/--allow-write fix - #3

Merged
soderlind merged 1 commit into
mainfrom
docs-brex-context-filter
Jul 16, 2026
Merged

Context-filter guidance, Brex framing, and read-only/--allow-write fix#3
soderlind merged 1 commit into
mainfrom
docs-brex-context-filter

Conversation

@soderlind

Copy link
Copy Markdown
Owner

Summary

Follow-up on the Brex "give agents bash" writeup. Two doc additions plus a real accuracy fix discovered while verifying against the CLI.

1. Context-filter use case (skill)

The skill sold just-bash purely as a safety dry-run. Brex highlights a second win: even for non-destructive work, running inside a workbench keeps large raw output out of the model context. Added guidance + examples to prefer just-bash for read-only exploration that would otherwise flood the conversation — reduce it in the sandbox (grep, jq, wc) and return only the rows that matter.

2. "Why just-bash (and where this fits)" (README)

New section distinguishing the two adoption models, so readers don't expect behavior this project doesn't provide:

  • Safety layer (this project) — steer coding agents to sandbox generated/untrusted shell via the CLI.
  • Workbench layer (product agents) — embed the just-bash library for context reduction. Cites the Brex post (P90 tokens ~3M → ~600–700k, P95 latency ~halved) and the benchmark repo.

It explicitly notes the one-shot CLI does not give the persistent workbench (files-as-memory) behavior — overlay writes are discarded per invocation.

3. Accuracy fix: read-only by default

While verifying the examples I found the CLI is read-only by default — writes fail with EROFS unless you pass --allow-write (writes then go to an in-memory overlay and are discarded). The old docs claimed "writes stay in the overlay and are discarded" without the flag, which is wrong. Fixed across the skill, AGENTS.md, and .github/copilot-instructions.md, and added --allow-write to the write/dry-run examples.

Verification

All documented commands were run against just-bash v3.1.0 (CLI reports 1.0.0):

  • Read-only filters (grep … | wc -l, jq … | length) work with no flag.
  • Scratch-file and find … -delete dry-runs work only with --allow-write; the host file was confirmed unchanged after an in-sandbox delete.
  • node scripts/validate.mjs passes.

Adds a "context filter" use case: prefer just-bash to reduce large read-only
output inside the sandbox (grep/jq/wc) and return only what matters, instead of
dumping full payloads into the conversation.

Adds a README "Why just-bash (and where this fits)" section that distinguishes
the safety layer this project provides (steer coding agents to sandbox generated
shell) from the in-process workbench layer for product agents (embed the
just-bash library), citing the Brex writeup and benchmark repo. Notes that the
one-shot CLI does not provide persistent-workbench state.

Also corrects the write semantics across the skill, AGENTS.md, and
copilot-instructions.md: the CLI is read-only by default (writes fail with
EROFS) and requires --allow-write for in-memory, discarded writes. Verified
against just-bash v3.1.0 (CLI 1.0.0); all documented examples were run.

Co-authored-by: Copilot App <[email protected]>
@soderlind
soderlind merged commit 8c914f3 into main Jul 16, 2026
1 check 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.

1 participant