Hi there, because you have no way of knowing what it was just keep an eye on him. If he begins to act lethargic,
black beard or have obvious signs of distress like blood in his poo, vomiting, straining to go, then you'd want to get him to an experienced reptile emergency vet. But most small objects pass through with no problem, although we wouldn't want them to swallow anything. So far on this forum there have been beardies who have eaten coins, rubber bands, small rocks, a dust bunny with hair, and an entire sandwich bag. The rocks + sandwich bag all came out [ plastic sandwich bag, took a month but dragon never showed signs of distress at all ]
As a precaution you can feed him baby food squash, sweet potato, green beans a few times a week but feed him normally. This will help any foreign object to move along the G.I tract and be expelled after a bit. Be very careful from now on, check the room before letting him loose again.