Skip to content

run: fail early when a sandbox harness names no policy (OpenShell 0.1) #7849

Closed

Description

@waynesun09

What happens

Since fullsend moved to OpenShell 0.1.2 (#7233), a sandbox harness must name a valid policy. If it doesn't, fullsend run still creates the sandbox, retries 3 times with backoff, and fails with an OpenShell error that doesn't mention the harness's policy: field:

  • No policy:: the sandbox ends in phase Error, with or without providers attached:
    Configuration: ConfigurationInvalid: Effective configuration could not be activated; replace the policy or repair attached providers
    
  • A policy file that declares no fields (for example, only comments): openshell sandbox create fails with failed to decode sandbox policy fields.

Both reproduce on a local 0.1.2 gateway with a dummy-runtime harness and no providers. The same harness with internal/agentnew/templates/policies/base.yaml runs to exit 0. This is what broke the behaviour suite after #7233 (fixed for the suite in #7847).

fullsend ships and layers no default policy on purpose (#7266), so a harness has to name one. The CLI should say so before it creates a sandbox.

Where

  • Harness.Validate requires agent and role but not policy.
  • ValidateFilesExist skips an empty path. Its fix guidance for a missing policy file only fires when policy: is set.
  • sandbox.go omits --policy when the policy is empty, so the sandbox is created with none.
  • Nothing reads the policy file's content before create, so an empty or comment-only file is only caught by OpenShell.

Proposed

  1. Fail before sandbox creation when a harness that runs in a sandbox has no policy:. Reuse the guidance ValidateFilesExist already gives: commit a copy of the fleet policy from fullsend-ai/agents, or set policy: to its URL with a #sha256= hash under allowed_remote_resources. For a new agent, point to fullsend agent new. Check the composed harness, after base: inheritance, so a child that inherits its base's policy passes.
  2. Optionally, parse a local policy file and reject one that declares no fields, naming the path.
  3. Docs:
    • docs/cli/run.md: the probe-timeout example harness has no policy:, so a user who pastes it as-is hits the error above.
    • running-agents-locally.md explains why a custom harness needs policy: policies/base.yaml through "the sandbox image's default policy". On 0.1.2 a harness with no policy doesn't start at all, so the reason should say that.

Whether a missing policy should get a default instead is a separate question. #7266 decided against shipping one, and a reviewer on #7847 questioned that decision. This issue only asks for a clear, early error under the current rule.

Activity

  1. fullsend-ai-triage commented on Sep 30, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:31 AM UTC · Completed 1:34 AM UTC

    Commit: 3bd9c6f · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.34

  2. added
    type/bug
    component/harness
    component/sandbox
    priority/medium
    ready-to-code
    on Sep 30, 2026
  3. fullsend-ai-triage commented on Sep 30, 2026

    @fullsend-ai-triage

    Investigated related history: #7266 (merged) intentionally removed fullsend's shipped default policy, so this issue correctly treats 'no default policy' as settled and out of scope, and only asks for a clear, early error. #7847 (open) fixes the internal behaviour test suite's own instance of this same OpenShell 0.1.2 regression by committing real policies into test harnesses -- it explicitly calls out this issue as the separate, general CLI-side fix, so it neither resolves nor blocks this issue. No open issue duplicates this report, and no PR currently implements the validation change described here.

    Classified as a bug (medium severity, component/harness + component/sandbox): the symptom, root cause, and reproduction are all clearly documented with exact file/line references, and the proposed fix is concrete enough to implement without further clarification. The docs impact is limited to two named files, not CI/workflow configuration.


    Labels: Matches this repo's convention of pairing type/bug + bug with the relevant component labels (harness validation and the OpenShell sandbox it targets) and a medium priority given the workaround (naming a valid policy) is simple and already documented.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  4. fullsend-ai-coder commented on Sep 30, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:36 AM UTC · Completed 2:33 AM UTC

    Commit: 3bd9c6f · View workflow run →

    Runtime: pi · Model: xai/grok-4.6 · Effort: high · Cost: $43.63

  5. added a commit that references this issue on Oct 12, 2026
  6. added a commit that references this issue on Oct 13, 2026
  7. added 5 commits that reference this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponent/harnesscomponent/sandboxpriority/mediumready-to-codetype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions