SDK delegate() uses target as source and omits target_id #26
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding from communication-parity audit (2026-05-21). Server contract is POST /workspaces/:source_id/delegate with JSON body {target_id, task, idempotency_key}. Evidence: molecule-core workspace-server/internal/handlers/delegation.go delegateRequest requires target_id and Delegate uses c.Param("id") as sourceID. Current molecule-sdk-python RemoteAgentClient.delegate posts to /workspaces/{target_id}/delegate and sends only {task,idempotency_key}; tests assert that wrong URL. This can make remote/external SDK delegation diverge from runtime molecule-mcp and from platform-owned workspaces. Fix: change SDK to POST /workspaces/{self.workspace_id}/delegate with target_id in body, update tests, and add a contract-style test that mirrors the server route shape.