Troubleshooting
Both APF services fail closed: a problem stops the service or denies the operation instead of running ungoverned. That makes failures visible, and the message almost always names the cause. Start with the service’s standard error output or journal, then the audit records.
The Build Fails
The Shipped Configurations Do Not Start
The native development task and the systemd units in the repository do not start as shipped.
The Verification Harness Does Not Start
e2e/with-compose-stack.sh and e2e/with-kind-stack.sh check their inputs before they create anything, and a failed check leaves a kept stack as it is. Each step writes its log under e2e/.work/compose/logs/ or e2e/.work/kind/logs/, and a failed step appends the last log lines of every container or pod that is not running and ready.
The Policy Service Does Not Start
Settings Are Ignored
The Policy Gateway Does Not Start
Bundle Rejections
With the local source, and with the HTTP source once a manifest verifies, every verification failure writes a policy_verification record with outcome refused, the reason codes in rejection_reasons, and the full detail in error.message. A failure to record the revision writes a policy_activation refusal instead. A bundle that verifies but fails to compile writes only a successful policy_verification record, and the error appears in the service log, and with the local source in the refresh response.
genfixture itself fails with a missing-placeholder error when the template contains a literal digest. Replace every digest with REPLACE_WITH_DIGEST before you sign.
A bundle whose id does not fit the audit ID format is refused, because the policy service cannot write its verification record. Start the id with a letter or digit, use only letters, digits, and . _ : @ / + - =, and stay within 512 characters. Refer to Bundle Specification.
Sandboxes Are Not Admitted
Look for policy_injection and admission_validation records with "outcome":"refused" in the interceptor audit file. Refer to Sandbox Admission for each reason code. If there is no record at all:
- Confirm the OpenShell gateway’s interceptor registration points at the right address and transport.
- Check that the OpenShell gateway started. It refuses to start if it cannot reach APF or negotiate the extension protocol.
- Check that APF is registered with OpenShell’s default
binding_policy = "dynamic". APF declares three bindings each onCreateSandboxandUpdateConfig, so OpenShell refuses to start withexact, andallowlistcannot include sandbox admission or refresh. Refer to Add APF to OpenShell. - Check for
authenticationrecords, which mean OpenShell’s token did not match the trust profile. Compare the issuer, audience, and key ID.
If OpenShell rejects the injected sandbox policy, check endpoint tls and landlock.compatibility values. OpenShell 0.1.x rejects tls: terminate, tls: passthrough, and the Landlock values required and disabled, which the APF JSON Schemas allow. Omit tls or set skip, and use best_effort or hard_requirement for Landlock, even though the schema check flags skip and hard_requirement. A provider with a rejected value fails provider profile reconciliation instead. Refer to Sandbox Policies.
Requests Are Denied Unexpectedly
Find the authorization record and read its reason. Refer to Investigate a Denied Request. Common causes:
- An MCP tool call has no grant. The grant names a different action. On the OpenShell middleware path the action is the MCP tool name exactly, such as
APF::Action::"github_repo_read", and the request carries no user subject. Grants written forAPF::Action::"<tool>::<capability>"or for a principal apply only toEvaluationServicecalls that send averb; anEvaluationServicecall with the tool name asresource.classand noverbevaluates the same action the middleware does. - A grant exists, but its conditions failed. The reason is usually
no grant for <action>in this case too. The more specific<rule>: conditions not met for <action>appears only when the rule’s name contains the tool name. When you seeno grant, also check the conditions of the grants for that tool. Refer to Capability Grants. - A body patch cannot be applied. The request is not JSON, or lacks the patched path. The reason code is
middleware.effect_application_failed.
Requests Are Not Evaluated
If a request reaches its destination without an APF record, the sandbox policy did not route it to APF. Check that a network_middlewares entry with middleware: apf-content-policy includes the destination host, that the OpenShell middleware registration is named apf-content-policy, and that the sandbox was admitted or refreshed with that policy.
Policy Updates Do Not Take Effect
Next Steps
- For every error code, refer to Error Reference.
- For what APF does not inspect or enforce, refer to Enforcement Coverage and Limitations.
- To report a problem, refer to Support.