Dealing with thieves in Dwarf Fortress

Solution 1:

Thieves come in two varieties: goblins and kobolds. Kobolds aim to steal items while goblins aim to steal your children! Parents of course become very distraught when their children are snatched away.

Dealing with thieves is easy: spot them before they take anything. A found thief will run away without a fight. Thieves are invisible (to you) until they are spotted, but they are on the map. Any dwarf and tamed animal near the thief has a chance to spot it. So to increase your odds of spotting any incoming thieves, it is typical to chain a pet near your entrances. (This doesn't block caravans.)

It is also worth noting that doors and traps will not stop all thieves.

It is also possible of course for your military to deal with thieves, but they're quick so your best bet is just to prevent them from getting to the goods.

Solution 2:

In order to deal with thieves in my fortresses, I always lay out my entrances no wider than three tiles and chain a tamed animal on either side of the entrance one tile in. Doing this will ensure that the thief can't get into the fortress without being spotted by at least one of the animals. Once spotted, a thief will do its best to flee and will only stop if attacked by another unit.

Since your dwarves will sometimes need to go outside to fish/gather plants/chop wood/vomit/etc., you may also want to wall in a patch of the surface and create another entrance leading to that. Additionally, you should set your meeting zone indoors or within the walled-in area so that your fort's children will stay where any goblin kidnappers will be forced to go through your chained animals to get to them.