How to play Baldur's Gate 3 with Claude Code
u/Bogdanilaa connected Claude Code to Baldur's Gate 3 using a Python MCP server, an in-game Lua mod and persistent Markdown memory. They report that the agent completed the game without anyone taking the controls.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Using only [game MCP tools] and [allowed memory folder], pursue [game objective]. Base decisions on information your character can perceive. Before each session ends, record current state, failed approaches and the next action in a handoff. Stop if tools reveal hidden information.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source poster / publisher
- u/Bogdanilaa
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The author reports that Claude defeated the Netherbrain and reached the ending. A later audit found hidden-path information leaking into one puzzle; after fixing that, they reran the puzzle using screenshots and reported a successful crossing. The complete original playthrough was not recorded.
- Human involvement
- The author wrote the harness, audited tool behaviour and corrected a hidden-path leak. They did not record the full original run and supplied screenshots and selected reruns instead.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- The author connected a Python MCP server to a Lua mod inside the native game.
- Claude used those tools to perceive the party's surroundings, request screenshots and act in the game.
- A runner started fresh sessions with a briefing and handoff, while memory tools saved and committed notes.
Reddit user u/Bogdanilaa built a way for Claude Code to play Baldur's Gate 3 through tools rather than a stream of human instructions. They report that Opus 5.5 reached the ending without anyone taking the controls.
The author disabled Claude Code's built-in tools and supplied a Python MCP server connected to a Lua mod. The mod exposed what the party could perceive. Separate components supplied screenshots and input. A runner launched sessions and recovered from crashes. Each fresh session received a character sheet, playthrough summary and handoff, while a keeper pass maintained longer-term notes.
The account also documents a material limitation. A later audit found that route tools had revealed an invisible walkway during the Faith-Leap trial. The author fixed the leak and reran that puzzle using screenshots of its mosaic, reporting a successful crossing after failed attempts. That corrected test should not be confused with a clean original playthrough.
The full run was not recorded. The author linked code, screenshots and selected reruns, so the completion remains an attributed claim rather than an independently reproduced result. This is useful for developers exploring game-playing agents and memory across interrupted sessions.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Reddit · u/Bogdanilaa
Frequently asked questions
How did Claude control the game?
Claude Code used a Python MCP server connected to an in-game Lua mod, with screenshot and input components. Its usual built-in tools were disabled.
Was the original playthrough fully verified?
No. The author did not record the whole run. They supplied screenshots and selected reruns, and disclosed an information leak in one puzzle that they corrected before rerunning it.
More details
Remaining steps
- After auditing an information leak in a puzzle tool, the author fixed it and reran that puzzle from the same save.
About this account
Claude chose game actions and maintained memory across sessions. The runner launched sessions and recovered from crashes; the author says nobody took the controls during the completed run.
Firsthand account by u/Bogdanilaa: https://www.reddit.com/r/ClaudeCode/comments/1x9ue4y/after_712_and_39_hours_opus_55_beat_baldurs_gate/. Public RSS post and returned comments captured on 21 October 2026; RSS coverage is partial. Body eligibility passed at 0.9. Results are author-reported, not independently reproduced. Suggested prompt by Agents In Use, not the author's original prompt. Linked blog and repository README were accessible. Post says 99 sessions; an author comment describes screenshots from 96 sessions. These are different stated scopes, not a reconciled session total, so no session count is repeated. The original puzzle crossing had a tool information leak; only its corrected rerun is described as screenshot-based.
Credit: u/Bogdanilaa on Reddit
Source published
Added to Agents In Use
Source checked
Tools and topics
Claude Code · Python MCP server · Lua mod · Vulkan screenshot layer · SDL input shim · Git
game-playing · MCP · persistent-memory · Baldurs-Gate-3
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.