Working with AI coding agents alongside TE3

Written by Ruben Van de Voorde | Jul 28, 2026 7:00:00 AM

Key takeaways

  • You can use AI coding agents alongside Tabular Editor 3 to edit semantic models: If you do, your workflows should adapt to minimize the risk of these multiple actors overwriting each other’s work.
  • We propose a workflow for each of three modes: Working from the TMDL folder metadata, working on a local model in Power BI Desktop, or working from TMDL metadata while connected to a published semantic model (“workspace mode”).
  • Across workflows, you should always use a version control system like Git to track changes: Agents should also be given the appropriate tools to work with semantic models, like the TE CLI and/or MCP servers. Letting agents edit TMDL without validation is not a good idea.

This summary is produced by the author, and not by AI.

This note is shorter than the blogs that you're used to from us. You can consider this one akin to an internal memo we make public, because we believe more organizations and developers are currently trying to figure this out.

The problem

You have adopted Tabular Editor 3 (TE3) in your workflows, and now you're also experimenting with AI coding agents like Claude Code, Codex or GitHub Copilot. There are then two sources of changes to one file (or set of files): human from TE3 and agent directly to the files on disk.

The solution to this problem depends on your specific workflows. The scenario that prompted this note goes like this:

  • Agents edit the TMDL in the PBIP folder.
  • Humans use TE3 for modeling work and reviewing what the agents edited.
  • They have Git-backed deployment.

The risks are thus:

  • TE3 overwrites changes that agents made to the TMDL. When you save in TE3, it writes to the folder without consideration for what was there and may have changed in the meantime. Any changes not made by the TE3 instance get steamrolled.
  • Losing unsaved changes in TE3 by reverting to load in the agent’s edits.

These risks are not unique to this specific setup, so we want to outline three different modes to avoid the toe-stepping problem, depending on how and where you prefer to edit your semantic models.

Mental model

To understand the problem, it's useful to think of TE3 as having its own copy of the model metadata in memory. When it opens a folder model, all TMDL is read at once and built into TE3's memory. There are then two versions of the model: the one saved on disk, and the one that TE3 keeps in memory.

There are two ways to reconcile the on-disk version and TE3’s in-memory version of the metadata: saving or reverting. A save pushes TE3's memory to disk and overwrites all of the model files there (we use TMDL in this note but the same goes for formats like .bim). There is no warning when this happens. A revert discards the changes that are only in TE3's memory (the asterisk (*) in TE3’s title bar shows if there are) and reads the model files from disk. When reverting would throw away in-memory changes, TE3 warns you. When testing these flows, we bumped into a bug where this warning wouldn’t show after a failed revert; we released a fix in TE3 version 3.26.3.12966, so make sure you’re running the latest release.

The most important rules to avoid losing TE3's and agent’s work are:

  • Know at all times whose turn it is; either TE3's or the agent’s.
  • Use Git as the safe undo button.

It doesn't matter whether agents, you, or another tool makes the changes to the TMDL on disk; these rules apply whenever you have two or more actors editing the TMDL.

Mode 1: Working on model metadata only

In this mode, the TMDL folder on disk is the source of truth. The functional loop is then:

  1. Work in TE3
  2. Save in TE3 (TE3 writes TMDL to disk)
  3. Git commit
  4. Agent works in the TMDL folder
  5. Git commit
  6. Revert in TE3 (TE3 reads TMDL from disk)
  7. Repeat from 1.

To make this flow more convenient, you can bind the File.Revert action to a custom shortcut like Ctrl + E (by default not in use by TE3). Revert will pick up everything the agent has changed, unless the agent has made a flawed edit TE3 can't load, like a broken reference. TE3 will then show an error message listing all defects and cancel the revert. This is important to realize because if you hit 'Save', you'll overwrite what the agent has changed (and broken); the revert never happened and TE3's memory does not contain those changes.

The best way to avoid this problem is to give your agents tools that make breakage unlikely, such as the TE CLI or MCP servers. Letting agents go wild on TMDL as if they were just text editors is a recipe for errors, lost work and frustration. If agents edit exclusively through te, every single edit is validated as it is made, so flawed changes are caught before they can accumulate into one big failing chunk. te validate lets agents check their own work at the handoff, across two layers: broken references (these fail the revert), and stale DAX references, which revert will load without protesting and surface as broken measures.

Mode 2: Working on a local model in Power BI Desktop

In this mode, the model in Power BI Desktop (PBID) is the source of truth. To be specific, the local Analysis Services (AS) instance that spawned on your device. PBID follows the same mental model as TE3: it holds the model in memory and writes the TMDL folder only when you save. The TMDL files are not the source of truth. The functional loop is then:

  1. Open the model in PBID
  2. Edit through the local AS instance, either with TE3 as external tool or agents with TE CLI/MCP/TOM
  3. Save in PBID (writes TMDL to disk)
  4. Git commit
  5. Repeat from 2.

This mode keeps the full desktop experience: the report is right there and you see model changes reflected in the visual immediately. This flow also has a lower risk of steamroll overwrites than Mode 1 because all actors edit the one live model through the AS engine, which merges edits object by object instead of rewriting the whole model. It does introduce the risk of atomic object collisions: if an agent has just changed [Gross Sales] while you were doing that too in TE3, whoever saves last wins that object: the other’s edit is gone entirely while edits to other objects survive. By default, TE3 watches the live model (the Track external model changes setting in Preferences defaults to On) and picks up changes made by another actor automatically. If TE3’s memory is stale when you save (for example with that setting Off), a Change conflict dialog will still warn you before merging, and the AS engine merges object by object; the object both actors edited still goes to whoever saves last.

There's also an arguably bigger failure mode in forgetting to save in PBID; only that writes the changes from either actor to the TMDL folder. A PBID crash can hit hard this way, so save often. Since PBID is the channel that saves, don't let agents touch the TMDL because PBID will just steamroll over it: even if there are no changes to save, PBID will rewrite the whole folder from memory.

NOTE

The dynamics of Mode 2 also apply when the source of truth is a semantic model published to a workspace, with TE3 and agents connected directly to it and no folder involved. The Change conflict dialog will warn as it does locally, and that is your only safety net. With no folder on disk, there is nothing for Git to track. Connecting the workspace to Fabric Git integration is no substitute because its commits are manual snapshots of the whole model, so you can’t checkpoint each actor’s turn, and an undo rolls back everything since the last snapshot. It also adds a second writer to the model, on top of whichever actor’s turn it is.

Mode 3: Workspace mode

TE3 has the "workspace mode" feature, where TE3 reads and writes from the TMDL folder and is connected to a workspace database (= semantic model) that it also deploys to upon save. This is essentially Mode 1 with a live model you can query from TE3, and here too the TMDL folder is the source of truth. The functional loop is then:

  1. Work in TE3
  2. Save in TE3 (TE3 writes TMDL to disk and deploys to the workspace database)
  3. Git commit
  4. Agent works in the TMDL folder
  5. Git commit
  6. Revert in TE3 (TE3 reads TMDL from disk and deploys that state to the workspace database)
  7. Repeat from 1.

Both save and revert deploy to the workspace, so it is never a separate step and doesn't fall behind. The benefit over Mode 1 is that you can run DAX queries, for example to validate an agent's work after a revert loads their changes. Agents can also query the workspace database read-only, but they only see their own changes live after you next revert.

The workspace containing the semantic model should not be connected to Fabric Git integration because the model in the workspace would then have two writers: the TE3 session and incoming changes from the workspace's connected Git repo. You should use a separate managed workspace where the semantic model is built from the TMDL folder that is Git synced. That workspace should connect to the repo and branch, not to your local folder. The model in the managed workspace only changes when you deliberately pull in the changes through either the UI button or an API call. TE3 treats the workspace database as its own deploy target, so unlike Mode 2, it will not warn about Change conflict. Saves or reverts will just overwrite the workspace database, so do not point your agents there either.

Read-only clients

The 3 modes we describe are about TE3 editing alongside an agent. None of these apply when using clients such as TE3 as readers. You can point as many read-only clients as you like at any workspace database, dev copy, or clone including: another TE3 instance connected read-only, a DAX Studio connection, thin Power BI reports, or a query-only agent.

Staleness is the only risk in read-only mode. Since readers don’t write there is no risk of colliding. It’s only when there are multiple editing actors that the user-mediated turn-taking is necessary.

Repo considerations

  • TE3 writes CRLF line endings, and depending on your Git configuration, a fresh checkout can use LF line endings so the first TE3 save then makes every file differ. Add a .gitattributes rule for *.tmdl (*.tmdl text eol=crlf) and commit it so every collaborator gets the same normalization and the first PR doesn't show all files as different.
  • PBID and TE3 don't fully agree on compatibilityMode and lineageTags. These are properties in TMDL files; expect noise diffs on these lines whenever both tools save; they are harmless so don’t chase them in review.

Further reading

In conclusion

Pick the mode where you prefer to edit:

  • If you work on model metadata and don’t need a live model, use Mode 1.
  • If you want the full desktop experience while editing, use Mode 2.
  • If you work on model metadata and need a live model to query, use Mode 3.

The three modes work because they follow two clear rules:

  • There is a single source of truth the actors edit (TMDL folder in Modes 1 and 3, live model in PBID in Mode 2).
  • The actors take turns editing the source of truth.

Give your agents the right tools (the TE CLI and/or MCP servers) to work with semantic models and they are less likely to break things and disrupt your workflow. Tracking changes in Git is extremely useful when developing semantic models, and non-negotiable if agents are involved.

Take your semantic models further with Tabular Editor.

Give Tabular Editor a spin
Plagiarism-freeScanned on July 28, 2026 Human-writtenScanned on July 28, 2026