fix(agents): inherit allowed_tools from Agent when creating Session (#11201)

When creating a Session under an Agent, the Session should inherit the Agent's allowed_tools configuration. Previously, the allowed_tools parameter was missing from the Session creation API call, causing inconsistency between Agent and Session configurations.

Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
亢奋猫 2025-11-10 18:44:33 +08:00 committed by GitHub
parent e2c8edab61
commit 2d8555c326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,7 @@ export class SessionService extends BaseService {
plan_model: serializedData.plan_model || null,
small_model: serializedData.small_model || null,
mcps: serializedData.mcps || null,
allowed_tools: serializedData.allowed_tools || null,
configuration: serializedData.configuration || null,
created_at: now,
updated_at: now