Skip to content

docs(design): add path locations design doc - #461

Merged
zastrowm merged 6 commits into
strands-agents:mainfrom
zastrowm:docs/path-locations-design
Nov 17, 2026
Merged

zastrowm merged 6 commits into
strands-agents:mainfrom
zastrowm:docs/path-locations-design

Conversation

@zastrowm

@zastrowm zastrowm commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the design doc for path locations: team/designs/0006-path-locations.md.

Today a filesystem rule can only point at a directory by spelling out its path, so a rule like "the agent may write its project" holds that project's path. A tool that sets up boxes for many directories can't ship one policy for all of them. It has to generate those rules on every run, where the operator can't see or edit them.

The doc proposes a [locations] table in box.toml that names directories, and a locations field on every fs:* action. A rule then says context.input.locations.project, and the same policy file works for every project. A location only labels paths. It gives no access.

The doc covers what the operator writes, how Box matches a file to its locations, five key decisions, limitations, and open questions. Review on this PR is the design review.

Related Issues

None.

Type of Change

Documentation update

Testing

Docs-only change; no code touched, so just check doesn't apply.

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new warnings

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Lets a policy name a directory without spelling its path. box.toml
gains a [locations] table, and every fs:* action gains a locations
input field, so one policy works for every project.

@ferdingler ferdingler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm generally in favor of having this kind of functionality to make policies more reusable. My only concern is what does this implicate for the user? Will they have to define these locations in their Box CLI profile? And if so, does that make their profile not reusable across workspaces? e.g. I may want to launch my agent in ~/foo but also in ~/bar with the same profile, but now I can't because their named locations won't match?

I think my concern would be mitigated if there was a way to reference a dynamic location such as the location from which the user spawned the box run. e.g. workspace should become a default location that is dynamic.

The other concern is the fact that policy logs location names instead of actual paths. I don't like that. The location name isn't useful, so users are losing useful information. Why is that the case?

@zastrowm

Copy link
Copy Markdown
Member Author

@ferdingler

Will they have to define these locations in their Box CLI profile?

The Box CLI already has the ability to use variables like {{ workspace }} which is how I expect we'd get the dynamic-ism. I could imagine a world in which we expand the # of directories/variables that are in use.

So to that end, I'd say Box Core gets the new primitive for tagging locations, but it's the Box CLI/user-facing apps that decide what locations are tagged.

The other concern is the fact that policy logs location names instead of actual paths. I don't like that.

Reworded this - On logging, nothing replaces the path: every record keeps the full path, and locations is an extra field next to it.

Comment thread team/designs/0006-path-locations.md Resolved
Comment thread team/designs/0006-path-locations.md Resolved
@github-actions

This comment has been minimized.

A time-based rule can't check whether a list holds a name, so a budget on one location undercounted. One true-or-false field per location can be matched on its own. Also describe the portable has form.
Comment thread team/designs/0006-path-locations.md Resolved
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Assessment: Approve (re-review at 5e62635)

The change since 102eafe is that limitation 2 and the §6 history test now say an event recorded before a location was declared, including by an earlier release, isn't in that location. So a budget on a new location starts counting from the declaration. I found nothing new to flag. My earlier optional suggestion, refusing a has-guarded forbid on an undeclared location at load, is still open.

Checked and held at this head
  • The new limitation follows from the design's own rule that locations holds "the names the path was in at the time". It matches the policy crate's existing behaviour for fields a later build adds: crates/policy/AGENTS.md says a predicate on ip4/ip6 doesn't match events an earlier build recorded.
  • The undercount is now written down instead of hidden, and only lasts one window after the declaration. Policy edits already apply only from the edit on: decisions.md says "an unmatched identity starts empty". The budget rule on a new location is usually added in the same edit, so it would start empty anyway.
  • The revised §6 test now pins both sides: older events still count toward budgets that don't name a location, and don't count toward budgets that do.
  • The rest of the doc is unchanged from 102eafe, so my earlier checks still apply.

@zastrowm
zastrowm merged commit e8b4ced into strands-agents:main Nov 17, 2026
13 checks passed
freeqaz added a commit to freeqaz/box that referenced this pull request Nov 18, 2026
Brings the containment fix that permits kill and rt_sigtimedwait for a
workload that runs an init such as tini (dc1d8e8). Without it a workload
started under tini dies at start.

The fix branch sits on upstream 5ed679f (the v0.2.3 release commit), so
this merge also brings in the four upstream commits after 941fd27, the
base of dogfood/main:

- e8b4ced docs(design): add path locations design doc (strands-agents#461)
- aa18761 test(shell): pin that `sh FILE` is decided as `shell:exec` on
  `sh` (strands-agents#472)
- 1ccd68a feat: add Linux x86-64 release downloads (strands-agents#475)
- 5ed679f feat: add Linux filesystem policy operations (strands-agents#193)

No conflicts. Git merged crates/box/{AGENTS.md,Cargo.toml},
crates/box/src/command/run.rs, crates/box/src/record/config/mod.rs,
crates/box/src/run/contain/boundary.rs, crates/box/src/run/hosted.rs and
docs/user/native-filesystem-policy.md automatically.
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