Function resolveAgentWorkspaceDir