Chiang Mai is on my list but Thailand is a lot stricter about work permits + visas so you have to be careful.
If your not working in the local economy, they really don't mind at all. The worst you'd have to do is show a bank account with some money in. The problem they face is mostly due to tourists who can't really pay their way, the amount of 'White Crime' surprised me, espesually in the smaller towns, pretty much all crime was attributed, rightly or wrongly, to tourists desperate for money.
For Chiang Mai its easy to get a 6 month visa, and you can always do a run to the border with Burma to get an easy extension. I would really recommend the north of Thailand, a lot less red light, a lot more relaxed.
Ultimately when I was there I was on holiday but I just didn't stop working on my UK based work, I had a couple of laptops with me. All money I earned was payed to my UK company, paying UK rate of taxes. I realise that was a bit silly, and I should have had an HK registered company, and been paying much less tax. However if your US citizen, you have less options in the matter due the whole state of been expat/nondom under US tax law, so YMMV. But no matter how you arrange it, so long as your not working in a bar they won't care at all. Even if you do work illegally I believe the bribes are very cheap anyway.
Was able to get a small project finished ahead of my estimates, that has never happened before!
However I found Chiang Mai in Thailand to be very good as well, can easily take a day out to Pai if I want something quieter, and it still has a lot of big city facilities!