I have two pottery workshops with lots of (40+) clay stored in Tarsus campaign. I can't exactly tell how this happened, unfortunately. I have two saved games, one of which has non glitched pottery workshops and the second one has the glitched ones.
My (unsuccessful) city has two separate road networks. One for villas and one for others. Both have one dock each. Clay traders stop by the dock for the villas mostly to unload their clay (and wheat) if they can. This dock is situated very close to the trade ship spawn point, it is easy to spot. Glitchy workshops are the ones in the villa network. Clay traders only go the other dock if this dock is occupied.
I realized that there is something wrong after I stopped the warehouses in villa network from accepting clay (to understand trade ship behavior in case of two docks on separate road networks). Somehow the pottery workshops never stopped working after several minutes, and the reason was that they already stored lots of clay somehow!
Glitchy pottery workshops are easy to spot: They are just very near to the entry point of the map. I attached a screenshot to ease finding them. I also attached the two saved games mentioned as a zip file. The file with name ending with "1" is my last save before the glitch occured. Other file (name ending with "2") has the glitchy workshops. Hope it helps.


Tarsus-pottery-workshop-glitch.zip
Thanks for reporting the issue. However, this is a behaviour that's also present in Caesar 3. See this old thread at Caesar 3 Heaven for a discussion on it.
It's caused by having multiple disconnected parts in your city, with workshops in both parts. The actual bug is caused by an over-eager warehouseman deciding "I need to deliver clay", because warehouse tasks are set without checking if it's possible to execute them. Since there are no pottery workshops reachable in his part of the city that really need clay, he'll deliver to fully-stocked workshops instead.
Since it's also present in Caesar 3, this bug will stay in Julius as well.
Thanks for your reply, I will do more research than just searching on Google next time before reporting a bug. Sorry.
No worries. I'd rather have more bug reports than that people don't report things they find 馃槂
Thanks for reporting the issue. However, this is a behaviour that's also present in Caesar 3. See this old thread at Caesar 3 Heaven for a discussion on it.
It's caused by having multiple disconnected parts in your city, with workshops in both parts. The actual bug is caused by an over-eager warehouseman deciding "I need to deliver clay", because warehouse tasks are set without checking if it's possible to execute them. Since there are no pottery workshops reachable in his part of the city that really need clay, he'll deliver to fully-stocked workshops instead.
Since it's also present in Caesar 3, this bug will stay in Julius as well.
But I have to add that I have pottery workshops on the other side of the city as well. So in the other road network, I have several pottery workshops (about 6 or 7) and a clay warehouse. I will try again to see whether those workshops were already stocked to brim...
In the other road network, there's most likely at least one workshop not stocked well enough.
Let me explain how the warehouses work:
Another related bug that you may see: if you have a warehouse with clay on road network 1, and a couple of pottery workshops on road network 2, you will see a "ghost warehouseman" pop up for a split second and then disappear again because he finds out there's nowhere he can deliver clay to:

Thank you for the explanation.
I think I understood the nature of the bug, though I was not able to reproduce the bug yesterday night with speed-running my city. I will try again.
Do you think that I can fix the bug for my own use only, if I can locate the code which spawns the warehouseman to deliver clay? Do you know whether augustus has the bug as well?
Augustus has the bug too and I'm not sure it's trivial to fix, but then again I haven't really delved into that part of the code.
Btw, your issue report is always useful because now we have a new "original bug" listed.
The warehouse worker task is determined here. The function city_resource_has_workshop_with_room() uses a city-wide cached variable, an integer indicating number of workshops with room for raw materials, for performance reasons.
The actual worker action is here.
You can either try to fix the first point, where the warehouseman is spawned, which is hard to do because it relies on city-wide state, which has to be changed to also take reachability of workshops into account. Instead of an O(1) operation, you go to O(n * m^2), where n is the number of workshops and m is the size of the map. For larger cities this will result in a noticeable performance hit.
Alternatively, you can try to 'fix' the second point by removing the "deliver goods to a well-stocked workshop" bit at the end of the function. However, this may have unintended side effects on the stability of cities, since the game currently allows stocking 3 loads of raw materials per workshop, which will then be reduced to 2.
I hoped for an already-implemented function like "resource_building_in_range_with_room()" but apparently I am out of luck :)
I think the function "building_get_workshop_for_raw_material" needs to be modified to only return true for workshops with up to 2 raw material stored. Maybe add a parameter/clone it just for the call under priority 6.
That's exactly what building_get_workshop_for_raw_material_with_room already does, which is priority 2.
Then up to 3 material. Or maybe removing the whole priority 6 would have no effect?