Skip to content

docs: ingress relay design - #245

Open
rvkandury wants to merge 1 commit into
strands-agents:mainfrom
rvkandury:docs/ingress-relay-design
Open

rvkandury wants to merge 1 commit into
strands-agents:mainfrom
rvkandury:docs/ingress-relay-design

Conversation

@rvkandury

@rvkandury rvkandury commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds Ingress Relay Feature for Strands Box.

Type of Change

New feature

Testing

NA. Doc change

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.

@github-actions github-actions Bot added Area - Egress/Creds documentation Improvements or additions to documentation labels Oct 30, 2026
@rvkandury
rvkandury force-pushed the docs/ingress-relay-design branch 2 times, most recently from af196fb to a6269a9 Compare October 30, 2026 19:45
Comment thread team/designs/0002-ingress-relay.md Resolved
Comment thread team/designs/0002-ingress-relay.md Resolved
Comment thread team/designs/0002-ingress-relay.md Resolved
Comment thread team/designs/0002-ingress-relay.md Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Request Changes

The agent-ingress path holds up. Two blockers remain:

  • The way a tool runs today cannot keep the devserver example alive past the Shell's 30-second command timeout.
  • The "Who can reach" tables are wrong for a leaf with contain_egress = false.

The doc also needs to say which frozen surface and which premise it changes, and the PR description is still the empty template.

Checked and held
  • The agent always runs on the gateway (network is refused on [agent]), so its Linux sandbox always has its own netns, and the pair exists.
  • The macOS default leaf profile allows outbound only to Box's ports. That holds for every leaf except native-egress ones.
  • D4 holds: every listener comes from the operator, and none comes from the workload.
  • The design is in team/designs/ under the next free number, as the README asks.

The per-connection relay with socket hand-off is a clean way to keep the sandbox outbound-only.

Comment thread team/designs/0002-ingress-relay.md Resolved
Comment thread team/designs/0002-ingress-relay.md Resolved
Comment thread team/designs/0002-ingress-relay.md Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Request Changes

The agent ingress path (relay in the TCB, and on Linux a PID 1 connect over the existing pair) fits well with how Box works today. The tool half of the design assumes a tool lifetime and a network posture that Box does not provide yet.

Review Categories
  • Correctness / scope: Tool ingress depends on a long-lived tool process and a namespace per tool. Neither holds for today's buffered leaf runs (30 s Shell limit) or for contain_egress = false leaves.
  • Repository rules: The new ingress field is an addition to a frozen surface. It needs explicit approval, the config page, and a startup disclosure.

Checked and held:

  • Every listener comes from box.toml and is bound before untrusted code runs (D4).
  • The agent cannot reach the host-network case, because [agent] network is refused at load.
  • On Linux, PID 1 is Box code that drops its capabilities before it supervises (namespace/mod.rs).
  • The egress pair already crosses the namespace for an agent that uses the gateway (Network::Localhost).
  • On macOS, other sandboxes cannot connect to workload_port, because their profiles allow outbound connections only to Box ports.

Note: the branch was force-pushed (af196fb → a6269a9). Apart from moving the diagrams inline, the content did not change, so this review covers both.

The load-test data is a good basis for D6.

@rvkandury
rvkandury force-pushed the docs/ingress-relay-design branch from a6269a9 to 2e37643 Compare October 30, 2026 20:36
@rvkandury rvkandury changed the title docs: Ingress Relay Design docs: ingress relay design Oct 30, 2026
Comment thread team/designs/0002-ingress-relay.md Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Request Changes (one item)

Re-reviewed at 2e37643. The branch was force-pushed and a6269a9 is gone, so I compared by reading the file against the last review.

The update resolves the earlier blockers:

  • A tool that declares ingress now keeps running.
  • ingress is refused with contain_egress = false.
  • The new "Interface changes" section names the added field and the stderr disclosure.

The remaining item is the restart/stop path that the new single-instance rule creates (inline).

Checked and held
  • Every Linux process with ingress has its own netns and its own PID 1: leaves go through the same namespace backend (establish_pid_namespace_and_reaper), and the contain_egress = false case is now refused.
  • The Linux "Who can reach" table holds for every process allowed to declare ingress.
  • Listeners stay operator-only and are bound before untrusted code runs (D4). A tool listener refuses callers while the tool isn't running.
  • The frozen-surface addition and its disclosure are stated (root AGENTS.md). Inbound connections having no policy decision is now an explicit decision (D1).
  • The PID 1 socket closes on exec, and the agent never holds it (launcher keep list in the startup sequence).

The earlier PID 1 suggestion (hand back an unconnected socket so PID 1 never blocks on connect) is still open and remains optional.

Comment thread team/designs/0002-ingress-relay.md Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Approve

Re-reviewed at 1cddecf. The branch was force-pushed and 2e37643 is gone, so I compared by reading the file against the last review.

The new D7 resolves the remaining blocker: no stop or restart in P0, the call returns as soon as the tool starts, and replace-on-start is planned for P1. Each of those is now an explicit P0 decision with a P1 plan. One non-blocking suggestion is inline.

Checked and held
  • D7 matches the failure table: a tool that fails at start exits, so the agent can start it again.
  • D7 matches D4: the agent decides only when a declared tool runs, and it never opens a new listener.
  • D7 matches the stop sequence: a long-running tool's sandbox is stopped with the box.
  • The earlier fixes are still in place: ingress is refused with contain_egress = false, the "Interface changes" section is present, and the stderr disclosure and the no-policy-action decision (D1) are stated.

The P0/P1 split in D7 makes the tool-ingress limits clear to operators.

@github-actions

Copy link
Copy Markdown

Assessment: Approve

Re-reviewed at af7bd37. The branch was force-pushed and 1cddecf is gone, so I compared the file section by section against the last review. The PR still changes only team/designs/0002-ingress-relay.md, and it has the same 406 lines. The only change I found is D7's heading, now "The agent cannot restart a running tool server." The body is the same, including the P1 replace-on-start plan, so I have no new findings.

Checked and held
  • D7 agrees with line 54, the failure table ("A tool exits"), D4, and the stop sequence.
  • The contain_egress = false refusal, the "Interface changes" section, and D1's no-policy-action decision are all unchanged.

On the prefix-matching suggestion: deferring it to P1 is fine. Until then, operators can avoid the problem in P0 by putting ingress on a narrow command prefix, such as ["npm", "run", "dev"].

Comment thread team/designs/0002-ingress-relay.md Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Approve

Re-reviewed at 2b432dc. The branch was force-pushed and af7bd37 is gone, so I compared the file section by section against the last review. The file went from 406 to 404 lines. The only change is D7's body, which is now one paragraph. That paragraph dropped what the agent's call returns, so I left one non-blocking comment inline.

Checked and held
  • D7 still states the P0 limit (no restart, a second start is refused) and plans restart on the same listener for P1. It agrees with line 54, D4, the failure table, and the stop sequence.
  • Everything outside D7 is unchanged from af7bd37: the config rules, the contain_egress = false refusal, both platforms' startup and connect paths, the reach tables, "Interface changes", and D1–D6.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Egress/Creds documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant