agentscope-ai / agentscope-ai/agentscope-runtime
[General] Agent cannot read SKILL.md when using Sandbox and registered Agent Skill simultaneously
- Lingua principale
- Python
- Stelle
- 863
- Fork
- 168
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Issue Type
- [x] Question/Help needed
- [ ] Discussion
- [ ] Documentation issue
- [ ] Installation problem
- [ ] Other: ___________
## Description
When an agent uses the Sandbox and a registered Agent Skill at the same time, the agent attempts to read the SKILL.md file from the sandbox workspace directory. Since the Skill directory is not mounted in the workspace directory, the SKILL.md file cannot be found, which breaks the agent's working logic.
## Component (if applicable)
- [ ] Engine
- [x] Sandbox
- [x] Tools
- [ ] Common
- [ ] Documentation
- [ ] Installation/Setup
- [ ] Not sure
## Environment (if relevant)
- **AgentScope Runtime Version:** >=0.1.0
- **Python Version:** >=3.12
## Additional Context
### Reproduction Steps
**Directory structure:**
- skills/my-skill
- workspace
**Code snippet:**
```python
with FilesystemSandbox(
workspace_dir="workspace"
) as sandbox:
toolkit = Toolkit()
toolkit.register_agent_skill("skills/my-skill")
toolkit.register_tool_function(sandbox_tool_adapter(sandbox.read_file))
toolkit.register_tool_function(sandbox_tool_adapter(sandbox.write_file))
agent = ReActAgent(
// ...
toolkit=toolkit
)
```
**Error output:**
```
2026-05-12 10:31:04,020 | INFO | _toolkit:register_agent_kill:1390 - Registered agent skill 'my-skill' from directory 'skills/my-skill'.
AgentSandbox(thinking):
{
"type": "tool_use",
"id": "functions.read_file:0",
"name": "read_file",
"input": {
"path": "skills/my-skill/SKILL.md"
}
}
system: {
"type": "tool_result",
"id": "functions.read_file:0",
"name": "read_file",
"output": [
{
"type": "text",
"text": "Error: Parent directory does not exist: /workspace/skills/my-skill"
}
]
}
```
### Reason & Temporary Workaround
A temporary fix is to mount the skills directory into the sandbox, but this violates the intended usage of the sandbox. Additionally, the agent may modify the SKILL.md file without authorization, leading to higher security risks.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.