Troubleshooting Network Connectivity Issues in Sandbox Environments
This guide provides a systematic approach to troubleshooting and resolving network connectivity issues within sandbox environments. It covers distinguishing between control plane and execution plane networking, performing minimal network validation, checking sandbox permissions and configurations, and resolving issues related to proxies, DNS, certificates, and virtualized environments. A troubleshooting matrix and security best practices are also included.
1. Distinguish Between Two Types of Networking
Many sandbox network issues are not a single failure but a confusion between two layers:
- Control Plane Networking: The intelligent programming tool, acting as a client, can access the model service or API gateway to complete login, authentication, chat, and code generation. Success at this layer only indicates that the path from the client’s environment to the API address is reachable, and that keys, tokens, and network egress are generally functioning.
- Execution Plane Networking: When the intelligent programming tool executes tasks inside the sandbox, whether processes within the sandbox are allowed to access the network. Examples include installing dependencies, pulling code repositories, requesting public test addresses, or accessing internal package mirrors. This layer is affected by sandbox permissions, network policies, proxy configurations, domain name resolution, certificate trust, and runtime environment isolation.
Therefore, successful API login does not mean sandbox commands automatically have network permissions. If the control plane and model chat work fine, but dependency installation or code pulling fails inside the sandbox, prioritize troubleshooting the execution plane. Conversely, if network requests inside the sandbox work fine, but model chat reports unauthorized or access denied, it is more likely an issue with the API address, keys, token groups, or model permissions—not a sandbox network problem.
When troubleshooting, adhere to one principle: First, use a minimal request to confirm the failure boundary, then check permissions, proxies, resolution, certificates, and authentication layer by layer. Avoid modifying a large number of configurations initially, as this can easily compound permission, proxy, and authentication issues.
2. Step One: Perform Minimal Network Validation
The purpose of minimal validation is to answer one question: Can the sandbox actually make network requests?
You can initiate a read-only, public, and stable network request in the sandbox terminal, such as accessing a public test address and reading only the response headers. Avoid using addresses that require login, data uploads, or may cause side effects. When observing the results, focus on distinguishing the following scenarios:
- Host machine terminal can access, but sandbox request fails: Likely a sandbox permission, network policy, un-inherited proxy, DNS, or certificate trust issue.
- Host machine browser can access, but sandbox terminal fails: Indicates the target address is not globally unavailable, but there is a difference between the terminal or sandbox environment.
- Sandbox request times out: Commonly caused by blocked egress, unreachable proxy address, DNS resolution failure, or firewall policies not allowing the traffic.
- Sandbox request returns a certificate error: The enterprise proxy certificate may not be trusted by the sandbox, or the runtime environment lacks the certificate chain.
- Sandbox request returns an authentication failure: Indicates the network layer might be fine, and the problem shifts to keys, tokens, API base addresses, or permission groups.
It is recommended to record the validation results using a fixed template for easy comparison:
Environment: Host / Sandbox Task / Subsystem or ContainerRequest Type: Read-only public address / Internal API addressResult: Success / Timeout / Resolution Failure / Certificate Error / Authentication FailureProxy: Configured? Effective in sandbox?Permissions: Sandbox network access enabled?
If the minimal request fails but the host browser can open the same type of address, do not continue to suspect the model service itself; check sandbox permissions and terminal proxies first. If the minimal request succeeds but the business request fails, continue checking the target address, authentication headers, certificates, and target service access controls.
3. Check Sandbox Permissions and Environment Settings
Most intelligent programming tools treat “whether the sandbox is allowed to access the network” as a task-level or environment-level permission. After modifying permissions, note: Old tasks do not necessarily inherit new permissions. Many tools freeze the sandbox policy when a task is created, and subsequent changes to global settings will not retroactively affect already running tasks.
Therefore, follow these steps:
- In the permission or environment settings for a new task, confirm whether network access is allowed.
- If the tool offers modes like “workspace write”, “read-only”, or “fully isolated”, verify whether the current mode implicitly disables network.
- After modifying permissions, completely exit the tool, reopen it, and create a new task for testing.
- Do not repeatedly retry in old tasks and draw conclusions, as old tasks may still be using the old policy.
- If the team uses a unified policy, check if an administrator-enforced sandbox policy overrides personal settings.
Emphasize the principle of least privilege: do not keep “unrestricted network access” on permanently just to troubleshoot. A safer approach is to temporarily allow network access, narrow the accessible scope, and restore the default policy once finished. For enterprise environments, manage risk through whitelists, proxy auditing, and task-level authorization rather than simply disabling sandbox isolation.
4. Check Sandbox and Network Switches in Configuration Files
If the tool supports configuration files, check whether they contain settings for sandbox mode, network access, proxy, etc. Field names and hierarchies differ across tools, so refer to the actual documentation rather than copying fields from web articles. Focus on:
- Whether the sandbox mode is set to allow workspace writing or task execution.
- Whether the network access switch is explicitly turned off.
- Whether multiple configuration files are overriding each other.
- Whether project-level configuration overrides user-level configuration.
- Whether the tool was completely exited and restarted after modification.
- Whether newly created tasks still read old caches or old session policies.
After modifying configurations, do not verify only in the old session. The correct approach is: save the configuration, completely exit the process, restart, create a new task, and then execute the minimal network request. If it still fails, temporarily use the diagnostic output or log levels provided by the tool to confirm the actually effective configuration items, rather than relying solely on the text of the configuration file.
5. Troubleshoot Proxies, DNS, and Certificates
Failed network requests inside the sandbox are often caused not by “no network at all”, but by “un-inherited proxy” or “DNS resolution failure”.
Regarding proxies: The host machine might access the internet via a system proxy or environment variables, but the sandbox process may not inherit these settings. You need to confirm whether proxy-related environment variables exist inside the sandbox, whether the proxy address is reachable from within the sandbox, and whether the proxy port only listens on the host’s local address. If the proxy is only bound to the host’s loopback address, containers or subsystems usually cannot access it directly; you need to switch to a listening address accessible by the sandbox or use port mapping.
Regarding DNS: Domains that the host can resolve may not use the same resolution configuration in the sandbox. Check inside the sandbox whether the target domain can be resolved and whether the result matches the host. If enterprise intranet addresses rely on specific DNS, ensure the sandbox environment uses the same resolution policy.
Regarding certificates: Enterprise proxies often use self-signed or man-in-the-middle certificates. The host browser might already trust them, but the sandbox runtime environment may lack the certificate chain, resulting in a certificate error. The solution is to have the sandbox trust the enterprise certificate or configure the certificate path through compliant methods. Do not use disabling certificate validation as a long-term solution, as it introduces security risks.
6. Additional Checks for Virtualization, Containers, and Remote Dev Environments
If the intelligent programming tool runs inside a virtual machine, container, remote development environment, or subsystem, pay special attention: The host being able to connect to the network does not mean the runtime environment has inherited the proxy and network configuration.
When troubleshooting, test inside the actual runtime environment where the task is executed, rather than only testing on the host. Focus on:
- Whether the runtime environment has an independent network namespace.
- Whether the container uses an isolated network or restricted egress.
- Whether port mapping only mapped service ports without mapping proxy ports.
- Whether the proxy listening address allows connections from the runtime environment.
- Whether DNS and certificates in the runtime environment match the host.
- Whether firewalls or security groups only allowed the host and not the runtime environment.
- Whether there are environment variables that only apply to interactive terminals but not to task processes.
Many host machines that “appear to have internet” actually lack proxy variables and corresponding DNS configurations in their subsystems. Therefore, a read-only request validation must be performed in the exact same environment where the sandbox executes tasks to obtain a reliable conclusion.
7. Distinguish Sandbox Network Issues from Control Plane Authentication Issues
If the minimal network request inside the sandbox succeeds, but the model chat still reports unauthorized, access forbidden, or model unavailable, do not continue adjusting sandbox permissions. The problem is more likely in the control plane:
- Is the API base address correctly filled in, or does it point to the wrong environment?
- Is the API key valid, expired, or disabled?
- Is the token bound to the correct model group or permission scope?
- Does the account or project lack permissions to call the target model?
- Is the request being rewritten or intercepted after passing through a proxy?
- Are there quota limits, rate limiting, or IP whitelist restrictions?
The typical characteristic of these issues is: the network layer is reachable, but the server returns an authentication or permission error. When handling this, verify the keys, addresses, model permissions, and groups, rather than repeatedly toggling sandbox network access.
8. Troubleshooting Matrix and Resolution Suggestions
| Symptom | More Likely Cause | Verification Method | Resolution Direction |
|---|---|---|---|
| Host accessible, sandbox request times out | Sandbox egress restricted or proxy un-inherited | Read-only request inside sandbox | Enable task network permissions, check proxy |
| Sandbox request indicates DNS resolution failure | Inconsistent DNS configuration | Compare host and sandbox resolution | Configure identical DNS or intranet resolution |
| Sandbox request indicates certificate error | Missing certificate chain or untrusted proxy certificate | Check certificate error details | Install compliant certificate, avoid disabling validation |
| Old tasks still fail after permission change | Old task did not inherit new policy | Test in a newly created task | Fully restart and create a new task |
| Sandbox request succeeds but chat auth fails | API address, key, or model permission issue | Check control plane return info | Verify keys, addresses, groups, and quotas |
| Fails in container/subsystem, succeeds on host | Network namespace or port mapping isolation | Test inside the runtime environment | Adjust mapping, proxy listening, and firewall |
9. Security and Best Practices
When fixing sandbox networking issues, it is not recommended to use a “permit all” policy long-term. More professional practices include: temporary task-level authorization, allowing only necessary targets, using controlled proxies, logging network access, using trusted mirrors or caches for dependency installation, and using least-privilege credentials for code pulling. Always validate by creating a new task after modifying any permissions, and restore the default isolation level after the issue is resolved.
In summary, when a sandbox cannot connect to the network, first distinguish whether it is a control plane or execution plane issue. Then use a minimal read-only request to confirm the boundary. Subsequently, check task permissions, configuration files, proxies, DNS, certificates, and runtime environment inheritance. Finally, address API authentication issues. Troubleshooting in this order prevents misjudging permission issues as model service issues and reduces unnecessary configuration changes.
