Tencent/WeKnora · error
sandbox: shell_exec requires the remote sandbox provider (cu
Error message
sandbox: shell_exec requires the remote sandbox provider (current mode: %s)
What it means
Guard error raised by ExecShellCommandWithOptions when requireRemoteBackend determines the sandbox manager is not configured for the remote provider (disabled, closed, or wrong backend mode). Shell execution is refused so privileged installer commands never fall back to running on the WeKnora host. The current mode is reported in the message.
Source
Thrown at internal/sandbox/session_manager.go:715
) (*ExecuteResult, error) {
return m.ExecShellCommandWithOptions(ctx, sessionID, command, ShellExecOptions{
WorkDir: workDir,
Timeout: timeout,
Env: env,
})
}
// ExecShellCommandWithOptions runs a shell command with install-only options.
// Fallback is explicitly refused so even privileged installer calls never
// escape onto the WeKnora host machine.
func (m *SessionBoundManager) ExecShellCommandWithOptions(
ctx context.Context,
sessionID string,
command string,
opts ShellExecOptions,
) (*ExecuteResult, error) {
if err := m.requireRemoteBackend(); err != nil {
return nil, fmt.Errorf(
"sandbox: shell_exec requires the remote sandbox provider (current mode: %s)",
m.GetType(),
)
}
if strings.TrimSpace(sessionID) == "" {
return nil, errors.New("sandbox: session_id required for ExecShellCommand")
}
if strings.TrimSpace(command) == "" {
return nil, errors.New("sandbox: command required for ExecShellCommand")
}
timeout := opts.Timeout
if timeout <= 0 {
timeout = m.config.DefaultTimeout
}
if timeout <= 0 {
timeout = DefaultTimeout
}
View on GitHub (pinned to 988cbb0330)
Solutions
- Configure the remote sandbox provider before invoking shell commands
- Route the command to the correct backend for the current mode
- Treat as fatal for installer flows; do not silently fall back to host execution
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/sandbox/session_manager.go:715 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/9cdfda0c5e62dd91.
Report an issue: GitHub.