Records that are created from the PreChat form are by "Automated Process" user (An internal Salesforce user). We cannot query this user details in Apex / Triggers.
We have a contact trigger, where there was a query on User object. Select Id, XXXXX FROM User WHERE id =: UserInfo.getUserId(). While PreChat is trying to create a record, it is failing here and ...
For anyone coming upon this and developing second generation packages (2GP), orgPreferences has been deprecated.
See this Salesforce blog post for information on enabling features in scratch orgs.
The Metadata coverage report also has a handy scratch org settings generator.
You only mention "live agent", but it's just exposing a tab in either Classic or Lightning.
In Classic, this is called Supervisor Panel.
In Lightning, this is called Omni-Channel Supervisor
Use Omni-Channel Supervisor to monitor agent workloads and the status of work items that are routed by Omni-Channel. Agents can raise flags on work items when they ...