For the size limit, probably I didn't discover it yet. It's a good question that need further testing to find out. But I have modified a lots of monster with long AI and didn't see any length problem.
For the subject ID, there is a var to change it, the first value. Not sure what is the problem.
If you have other question don't hesitate, but the best recommendation is to play with it. I can create a 18 pages explaining every part of the AI, but it will be longer that just testing value around.
For the bug, nice catch I reproduced it. If you could be kind to add it to my github issues would be nice so I don't forget.