Updates
How to move a project to a newer LEX AI build: what lex ai-update migrates, when re-running setup is actually needed, and how to reload each of the seven supported environments.
Updates
Keep the LEX AI tooling current so you get the latest workflow fixes, agent prompts, and guardrails. Updates matter because the shipped payload — the agents, prompts, and instructions your assistant reads — evolves with each release, and a payload left behind can describe a tool surface the server no longer has.
Update the tooling
lex ai-updateRun this when you are on an older build, when a fix has landed upstream, or when the assistant behaves differently than the docs describe. It takes -p/--project-root and nothing else.
The command upgrades the package and then re-enters through a fresh process, so the migrations that run are the ones the upgrade just installed rather than the ones you had a moment earlier. The ladder is re-runnable and safe to repeat: its steps clear legacy keys out of .env and the MCP config, move the server entry onto the current launch command, re-copy the embedded directories, re-materialise the payload for every environment recorded for the project, re-register the server, and reconcile a brief-mode interview left half-finished across a tool-surface change.
Do you need to re-run setup?
Usually not — lex ai-update refreshes the payload for the environments the project already uses. Re-run
lex setup-with-aiwhen you want to change something setup owns: add or remove a coding environment, or re-enter credentials. Note the hyphens. lex setup_with_ai is not a command and fails with No such command.
Verify after updating
lex ai-verifyThis restores any asset that is missing or has drifted from what the installed package ships, and prunes assets belonging to a mode you are no longer in — the case that otherwise leaves your IDE looking at two modes' tools at once.
Reload the host
Your editor starts the server, so the editor has to pick up the new build.
Environment | After an update |
|---|---|
GitHub Copilot in PyCharm / JetBrains IDEs | Restart the IDE so Copilot reloads |
GitHub Copilot in VS Code | Run Developer: Reload Window |
GitHub Copilot CLI | Start a new |
Cursor | Settings > MCP, confirm |
Claude Code | Run |
OpenAI Codex | Run |
Windsurf | Settings > Cascade > MCP, press Refresh |
Start fresh after an update
Begin a new assistant request afterwards so it loads the current tools and instructions rather than a cached older set. If it calls a tool that is no longer on the surface you get a structured stale_tool_call payload rather than a raw protocol error — refresh the tool list and retry the same call. See Troubleshooting.
Recommended update routine
lex ai-update— get the newest tooling and run the migrations.- Reload the host, per the table above.
lex ai-verify— confirm the on-disk assets match the installed build.lex ai-dashboard— check the active mode and the MCP registration table.- Start a fresh assistant request.
See LEX AI commands and Setup and dashboard.
Was this helpful?
Your feedback shapes what we write next.
