working on your US company, or your foreign company, is not allowed when you visit the US on a visa waiver. You are allowed to represent your foreign company, look for partners/customers, do marketing, visit conferences etc. But not be "productive"
At least that's how it's been explained to me.