Skip to content

Troubleshooting

saudademjj edited this page Dec 5, 2026 · 1 revision

Start with fai doctor. It checks the whole chain and prints a fix for each failed step. Messages are currently in Chinese; the table below lists each check by its name, which fai doctor --json shows as name.

fai doctor checks

Check When it fails Fix
solver FAI_SOLVER=copt is set but COPT is missing or unlicensed Install COPT 8 with a licence, or unset FAI_SOLVER to use the bundled HiGHS
mod_installed The mod is not in the mods folder, or an older version is fai setup (add --mods-dir if detection fails)
mod_enabled mod-list.json does not enable factorio_ai_bridge fai setup
config_toml The config named by --config does not exist (a missing default config only warns) fai setup, or fai setup --config <path>
rcon_password No RCON password found fai setup creates server/rcon.pw
rcon_tcp Nothing answers at the RCON host and port Host the save in game (Multiplayer → Host saved game) or start a dedicated server; enable client RCON with fai setup --enable-client-rcon
rcon_ping RCON answers but the mod does not Make sure the save has factorio_ai_bridge enabled and the password matches
mod_runtime_version The game runs a different mod version than the installed one (warning) Run fai setup and restart the game

When everything passes, rcon_ping shows the Factorio version, whether Space Age is active, the mod version, the tick and the players online.

Common problems

"No LLM API key configured" (未配置 LLM API Key). Set the key variable for your provider, or FAI_LLM_API_KEY for a custom endpoint. If you pass --base-url on the command line, pass --api-key too: a key configured for another URL is dropped. See Model Providers.

"deepseek needs the official endpoint" (deepseek 后端需要使用官方地址, also for opencode-go). These two providers only accept their own URLs. For any other URL use --provider openai or auto.

Achievements are disabled. The silent-command transport disables achievements for a save the first time it runs. Use the default fai-command transport; a save that already lost achievements does not get them back.

The AI does not build where I expect. It only builds on empty ground or over trees and rocks, keeps the safety margin from your buildings (mod setting, default 2 tiles), and avoids [NO_AI] areas. Mark places it may use with [AI_ZONE]. See Playing with the AI.

The AI character is missing materials. In character mode it fetches materials from supply chests or a mall and hand-crafts small parts when the chests are empty (mod settings, on by default). Fill a chest nearby, or switch to ghost mode and let robots build.

Two saves mix up their progress. Each save needs its own ledger: set a different state_file per save, or a different save code in the Windows launcher. Back up the ledger together with the save.

Which recipe solver is in use? fai doctor reports COPT 8 when it is installed and licensed, otherwise the bundled HiGHS. FAI_SOLVER=highs or FAI_SOLVER=copt forces one.

Getting help

  • Search or open an issue. Include the output of fai doctor, your Factorio version, whether Space Age is on, and the mod version from /fai-status.
  • For an agent problem, run the agent with -v, or set FAI_AGENT_TRANSCRIPT to a file to record the conversation. Remove API keys before sharing logs.
  • Report security issues privately as described in SECURITY.md.

Clone this wiki locally