AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(copilot): recognize Agent tool name and route CLI state into workspace
The Claude Agent SDK CLI renamed the sub-agent tool from "Task" to "Agent" in v2.x. Our security hooks only checked for "Task", so all sub-agent security controls were silently bypassed: background execution was unblocked, concurrency limiting didn't apply, and slot tracking was broken. Additionally, the CLI writes sub-agent output to /tmp/claude-<uid>/ and project state to $HOME/.claude/ — both outside the per-session workspace (/tmp/copilot-<session>/). This caused PermissionError in E2B and silently lost sub-agent results via failed @@agptfile: expansion. Changes: - Handle both "Task" and "Agent" tool names in security hooks - Add "Agent" to _SDK_BUILTIN_ALWAYS allowed tools list - Set CLAUDE_CODE_TMPDIR and HOME to sdk_cwd so CLI state lands in workspace - Register SubagentStart/SubagentStop hooks for lifecycle visibility - Add 5 new tests for Agent tool name handling and mixed slot sharing
Z
Zamil Majdy committed
a4669dbc06739afd6ab7d02dc579cf4bb1955b64
Parent: c659f3b