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.

A
Written By Atakan KayaLast updated 3 months ago

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-update

Run 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-ai

when 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-verify

This 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 mcp.json

GitHub Copilot in VS Code

Run Developer: Reload Window

GitHub Copilot CLI

Start a new copilot session

Cursor

Settings > MCP, confirm lex-mcp-local is green

Claude Code

Run claude again in the project directory

OpenAI Codex

Run codex in the project and approve the workspace

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.

  1. lex ai-update — get the newest tooling and run the migrations.
  2. Reload the host, per the table above.
  3. lex ai-verify — confirm the on-disk assets match the installed build.
  4. lex ai-dashboard — check the active mode and the MCP registration table.
  5. Start a fresh assistant request.

See LEX AI commands and Setup and dashboard.

Was this helpful?

Your feedback shapes what we write next.