Tencent/WeKnora · error
script_path %q is a session workspace file; this skill is no
Error message
script_path %q is a session workspace file; this skill is not installed in the sandbox image, so execute_skill_script cannot attach its environment. Run it with shell_exec, or pass a skill-relative path such as scripts/foo.py
What it means
A session /workspace script can only be run via execute_skill_script when the named skill is installed in the sandbox image, because the run attaches the skill's in-image environment (venv, SKILL_DIR). For preloaded/host-only skills there is no in-sandbox environment to attach, so the call is rejected with guidance to use shell_exec or a skill-relative path.
Source
Thrown at internal/agent/skills/manager.go:503
}, nil
}
// workspaceSkillExecuteConfig runs a session-written /workspace file with the
// installed skill's interpreter. Preloaded (host-uploaded) skills have no
// in-sandbox venv to attach, so those calls are rejected with a shell_exec hint.
func workspaceSkillExecuteConfig(
source SkillSource,
skillName, workspacePath, basePath string,
args []string,
stdin string,
env map[string]string,
sessionID string,
) (*sandbox.ExecuteConfig, error) {
if !IsScript(workspacePath) {
return nil, fmt.Errorf("file is not an executable script: %s", workspacePath)
}
if _, installed := source.(imageSkillSource); !installed {
return nil, fmt.Errorf(
"script_path %q is a session workspace file; this skill is not installed in the sandbox image, so execute_skill_script cannot attach its environment. Run it with shell_exec, or pass a skill-relative path such as scripts/foo.py",
workspacePath,
)
}
skillDir, ok := sandbox.ValidatedImageSkillDir(basePath)
if !ok {
return nil, fmt.Errorf("cannot run workspace script %q for skill %q: no installed skill directory", workspacePath, skillName)
}
env[skillDirEnvVar] = skillDir
return &sandbox.ExecuteConfig{
RemoteScriptPath: workspacePath,
SkillDir: skillDir,
Args: args,
Stdin: stdin,
Env: env,
SessionID: sessionID,
}, nil
}View on GitHub (pinned to 988cbb0330)
Solutions
- Run the workspace script with shell_exec instead of execute_skill_script
- Pass a skill-relative path for a skill that IS installed in the image
- Install/bake the skill into the sandbox image if its environment is required
- Verify with SandboxSkillDir/GetSkillInfo that the skill is image-installed before using workspace paths
Example fix
// before
mgr.ExecuteScript(ctx, "preloaded-skill", "/workspace/run.py", nil, "")
// after
sandboxExec(ctx, "shell_exec", map[string]any{"command": "python /workspace/run.py"}) Defensive patterns
Strategy: fallback
Validate before calling
if _, ok := mgr.SandboxSkillDir(skillName); !ok {
// skill not in image: use shell_exec for /workspace scripts
} Type guard
func skillInImage(m *skills.Manager, name string) bool {
_, ok := m.SandboxSkillDir(name)
return ok
} Try / catch
_, err := mgr.ExecuteScript(ctx, skill, wsPath, args, stdin)
if err != nil && strings.Contains(err.Error(), "session workspace file") {
return shellExec(ctx, "python "+wsPath) // fallback
}
return err Prevention
- Use skill-relative paths for skills; shell_exec for ad-hoc workspace scripts
- Verify image-install status before workspace-path execution
- Bake required skills into the sandbox image when their venv is needed
- Keep prompt/tool docs clear about the preloaded-vs-image distinction
When it happens
Trigger: Calling execute_skill_script with a /workspace/... script path while the referenced skill resolves to a preloaded (non-imageSkillSource) source — e.g. running /workspace/my.py against a skill that exists only on the host.
Common situations: Workspace deployed with preloaded skills but no image-installed skills; model conflates 'skill is available' with 'skill is in the image'; after switching sandbox images the skill is no longer baked in.
Related errors
- cannot run workspace script %q for skill %q: no installed sk
- model ID cannot be empty
- model is currently downloading
- model download failed
- abnormal model status
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/7867d1fc342f8ce8.
Report an issue: GitHub.