Tencent/WeKnora · error
sandbox: stat %s: %w
Error message
sandbox: stat %s: %w
What it means
Wrapping error in listFilesRecursive when m.client.Stat on a directory fails with an error other than remote-not-found (not-found is treated as an empty listing). Listing of session files therefore fails with the provider's stat error wrapped, e.g. permission or connectivity problems on that directory.
Source
Thrown at internal/sandbox/session_manager.go:926
}
if handle == nil || handle.ID() != binding.SandboxID ||
handle.Provider() != m.client.Provider() {
return nil, false, errors.New("sandbox: remote handle does not match binding")
}
return handle, true, nil
}
func (m *SessionBoundManager) listFilesRecursive(
ctx context.Context,
handle RemoteSandboxHandle,
dir string,
) ([]RemoteDirEntry, error) {
stat, err := m.client.Stat(ctx, handle, dir)
if err != nil {
if IsRemoteNotFound(err) {
return nil, nil
}
return nil, fmt.Errorf("sandbox: stat %s: %w", dir, err)
}
if stat == nil {
return nil, nil
}
stack := []string{dir}
var files []RemoteDirEntry
for len(stack) > 0 {
cur := stack[len(stack)-1]
stack = stack[:len(stack)-1]
entries, err := m.client.ListDir(ctx, handle, cur)
if err != nil {
return nil, err
}
for _, entry := range entries {
if entry.Path == "" {
entry.Path = path.Join(cur, entry.Name)View on GitHub (pinned to 988cbb0330)
Solutions
- Check the wrapped provider error for the failing directory
- Retry listing on transient errors
- If the directory genuinely vanished mid-walk, treat as not-found and skip
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/sandbox/session_manager.go:926 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/787532a953687f59.
Report an issue: GitHub.