The Theban campaign of 378 BC was the first of two unsuccessful invasions of Boeotia led by King Agesilaus II of Sparta, and ended after a standoff close to the city of Thebes.
In 382 a passing Spartan army had seized the citadel of Thebes (the Cadmea), and imposed a pro-Spartan government on the city. Three years later a combination of Theban exiles and rebels who had remained in the city overthrew the pro-Spartan government and then with semi-official Athenian aid convinced the Sparta garrison of the Cadmea to evacuate and head home. The resulting Theban-Spartan War (379-371 BC) would end with a disastrous Spartan defeat, but the early years of the war saw the Spartans on the offensive. The Spartans responded to the revolt at Thebes by sending an army under King Cleombrotus into Boeotia, but he achieved very little before retreating back home late in the year. His one apparent achievement, the establishment of a Spartan garrison at Thespiae under the command of Sphodrias, backfired when Sphodrias conducted a raid into Attica that helped convince a neutral Athens to side with the Thebans.
In 379 King Agesilaus II had turned down command of the Boeotian expedition, on the grounds that he was too old, but in 378 he was willing to replace Cleombrotus. According to Diodorus he started the campaign with 18,000 infantry and 1,500 cavalry, including five of the Spartan morai, or 2,500 men. As he moved north Agesilaus found a ready made force of mercenaries that had been raised for a local dispute in Arcadia. He used these troops to occupy the passes over the Cithaeron range, the dividing line between Attica and Boeotia. The Spartan army crossed the passes and then moved to Thespiae, where there was a Spartan garrison.
The Thebans hadn't been idle since the failure of King Cleombrotus's invasion of 379. They had built lines of field fortifications to guard their most valuable agricultural land, although the exact course of these lines isn't clear. These walls weren't meant to be manned at all times, but instead to be used to aid the field army, which mirrored every Spartan movement, always keeping the walls between them. The Thebans also carried out a number of cavalry raids across the walls, mainly hitting the Spartan peltasts and cavalry.
Eventually Agesilaus managed to get past these fortifications. He realised that the Theban attacks always came after breakfast, and arranged for his army to advance very early in the day. This time they managed to pull down a sizable part of the wall before the Thebans could react, and the Spartan army was able to get into the protected zone. While the Theban field army retreated back towards the city, the Spartans rampaged around the countryside.
Eventually the Spartans approached Thebes itself, where they found the Thebans and their Athenian allies holding a strong position on a hill about three miles from the city, protected by more field fortifications. The Athenians had provided 5,000 infantry and 200 cavalry, with a mix of hoplites and well trained peltasts, under the command of Chabrias. The Theban army included the Sacred Band, led by Gorgidas.
Agesilaus's first move was to order his light troops and missile troops to bombard the enemy position, but this failed to have much impact. He then formed up his hoplites and advanced up the hill. As the larger Spartan army approached the Allied lines, many of their mercenaries began to flee. Chabrias responded by ordering his remaining men into a rest position - kneeling down, with their shields resting on the floor and their spears upright. The Sacred Band did the same. This display of discipline worried Agesilaus, who decided not to risk attacking high quality troops up a hill. The Spartans withdrew onto the plains, and challenged their opponents to come down and fight. Unsurprisingly the Thebans and Athenians refused to leave their strong positions.
Agesilaus broke the deadlock by pulling his hoplites back to their base at Thespiae. His light troops and cavalry remained on Theban territory for a bit longer, before joining the retreat. After refortifying Thespiae, Agesilaus took most of his army back across the mountains, leaving a garrison under Phoebidas at Thespiae. This was the same man who had seized Thebes in 382, triggering the entire conflict, so his appointment was probably deliberately provocative. If so it backfired. After a period of raids and counter-raids along the road between Thebes and Thespiae, Phoebidas overreached himself and was killed in battle.
In the following year Agesilaus returned to Theban territory once again. This time he was able to get closer to the city, but an attempt to starve out the Thebans failed, and once again he had to return to Sparta without achieving anything significant.