Labyrinth

The labyrinth, or glitched Coliseum, is an area within Olympus Coliseum's Keyhole that appears in Kingdom Hearts coded and Kingdom Hearts Re:coded. It initially contains five floors known as "layers", but completing these unlocks fifteen layers that can in turn be completed to unlock a total of thirty layers. In the labyrinth, gameplay transforms into a turn-based battle system.

Along the way, Data-Sora find several pieces of information explaining the new mechanics, called Hercules Memos (or shreds of wisdom in Kingdom Hearts Re:coded).

Kingdom Hearts coded
When Olympus Coliseum is filled with bugs, Data-Sora promptly finds the world's Keyhole and enters it to reach the labyrinth. He teams up with Hercules and Cloud to destroy the bug sources.

Hades and Cerberus are fought on Layer 05, the Rock Titan is encountered on Layer 15, the Behemoth is faced on Layer 25, and finally the true source of the bugs, the Ice Titan, is battled on Layer 30.

Mechanics
While in the field, Data-Sora retains all movement abilities but has no combat capabilities, except striking with the Keyblade. A typical layer contains several rooms with corridors connecting them. Each room is affected by the Bug Level, which indicates the amount of Bug Blox in the room and determines the strength of that room's enemies. Destroying Bug Blox and defeating Heartless reduces the Bug Level, which weakens enemies, earns bonus score points and converts Metal and Danger Blox into Normal and Prize Blox. To advance to the next layer, Data-Sora must find and examine the warp point, usually hidden beneath a pile of Bug Blox. At the end of each layer, a score is given based on the amount of score prizes obtained and the number of rooms completely debugged. Save rooms are special areas between certain layers, that contain save points. They appear after layers 01, 02, 03, 04, 05, 09, 10, 13, 14, 15, 18, 20, 22, 24, 25, 27, and 29.

To initiate a battle, Data-Sora must come into contact or strike an enemy with the Keyblade. If Data-Sora attacks an enemy from the back, he will trigger a pre-emptive attack, giving him an extra turn at the start of the battle. However, if an enemy attacks Data-Sora from the back, Data-Sora will be caught in a back attack, giving the enemy an extra turn at the start of the battle. Swirling shadows, known as s, contain powerful enemies that pursue Data-Sora even if he is in another room or corridor.

In combat, most abilities and the Loot Cheat are disabled since battles are entirely turn-based. Data-Sora can perform a regular attack by pressing and can string combos up to three hits by pressing  when prompted. When an enemy attacks, blocking can be achieved by pressing when prompted, halving the damage taken. Holding down, allows the party to attempt to escape the battle. Team combat with party members, such as Hercules or Cloud, is similar to individual combat, though Game Over is only achieved when Data-Sora's health is fully depleted. Some techniques are exclusive to Data-Sora, including compiled commands and licenses. However, all characters can perform a unique, individual special attack, which randomly replaces a standard combo attack.

There are also special Licenses that become available throughout the Labyrinth which can produce different effects. Depending on the specific license and its effect, the license may be either be used for battle or in the field and may either generate an immediate effect or grant a lasting status condition. More Licenses become available the deeper Data-Sora goes, though only eight varieties can be carried at once.

Special attacks
Special attacks (スペシャル攻撃) are powerful combo finishers that have a 10% chance of activating after each hit when correctly pressing the button.

Compiled commands
In the labyrinth, using Deck commands compiles (コンパイル) them into special techniques. Certain combinations of compiled commands result in different or higher level techniques. Higher level commands deal more damage, and Star of Faith, Blade Line, and Subjugate also deal more damage depending on the number of party members alive.