Troubleshooting
This guide helps you diagnose and resolve common issues with TeXRA, whether an agent run stalls, a model refuses to connect, or the LaTeX toolchain is missing. Entries are grouped by category so you can find the one that matches your problem.
CLI users
Most steps below describe the VS Code extension, but the underlying causes (missing dependencies, API keys, model settings) apply to every surface. From the terminal, run texra doctor to diagnose your environment, texra models list to confirm available models, and /plugins in texra chat to see each integration's state.
Installation issues
Extension not loading
Problem: TeXRA doesn't appear in the sidebar or shows errors during load.
Solutions:
Check VS Code compatibility:
- Make sure you're running VS Code version 1.125 or newer
- Update VS Code if needed
Verify installation:
- Open the Extensions view (Ctrl+Shift+X)
- Search for "TeXRA"
- If it is not installed or is disabled, install or enable it
- Try reinstalling from the VSIX file
Check error logs:
- Open the Output panel (Ctrl+Shift+U)
- Select "TeXRA" from the dropdown menu
- Look for specific error messages
Check extension conflicts:
- Temporarily disable other extensions that might conflict
- Restart VS Code and check whether TeXRA works
Dependency installation problems
Problem: Error messages about missing dependencies like LaTeX, Perl, or GraphicsMagick.
One command checks them all. texra doctor probes the LaTeX toolchain (plus Node, model access, and usage logging) and says exactly what is missing and how to fix it:
- PASSLaTeX latexmk:LaTeX build orchestration
- PASSLaTeX pdflatex:PDFLaTeX compiler
- WARNLaTeX latexdiff:latexdiff was not found on PATH.Install latexdiff or a TeX distribution that provides it.
Solutions:
Verify dependencies manually:
bashlatexmk --version # or pdflatex --version perl --version gm version # For GraphicsMagick gs --version # For GhostscriptCheck the PATH environment:
- Make sure installation directories are in your system PATH
- Restart your terminal and VS Code after updating PATH
- When you launch VS Code from the system menu or Finder, it may inherit a minimal PATH. TeXRA searches common locations in the following order:
- 1
/opt/homebrew/bin - 2
/usr/local/bin - 3
/Library/TeX/texbin - 4
/usr/texbin - 5
MiKTeX Console.app/…/bin - 6
~/bin - 7
/usr/local/texlive/2024/… - 8
~/texlive/* · ~/TinyTeX/bin
- 1
Program Files\MiKTeX\…\x64 - 2
Program Files\MiKTeX\…\bin - 3
Program Files (x86)\MiKTeX - 4
%LOCALAPPDATA%\…\MiKTeX\x64 - 5
%LOCALAPPDATA%\…\MiKTeX - 6
MiKTeX 2.9\…\x64 (legacy) - 7
%LOCALAPPDATA%\MiKTeX\…\x64 - 8
C:\texlive\2024\bin\windows
- 1
/usr/local/bin - 2
/usr/bin - 3
/opt/miktex/bin - 4
/snap/bin - 5
/home/linuxbrew/.linuxbrew/bin - 6
~/bin - 7
texlive/<year>/bin/* - 8
~/texlive/* · ~/TinyTeX
texmf-dist/scripts and runs kpsewhich to locate Perl helpers such as latexdiff.pl. macOS:
/opt/homebrew/bin(Apple Silicon Homebrew)/usr/local/bin(Intel Homebrew and general tools)/Library/TeX/texbin(MacTeX symlink)/usr/texbin(legacy MacTeX location)/Applications/MiKTeX Console.app/Contents/bin(MiKTeX app bundle)~/bin(MiKTeX default symlink target)~/.local/bin(user-local tools such as Claude Code's native installer)- Versioned TeX Live directories (e.g.,
/usr/local/texlive/2024/bin/universal-darwin) - User-specific installations in
~/texlive/*/bin/*and~/TinyTeX/bin/*
Windows:
C:\Program Files\MiKTeX\miktex\bin\x64(64-bit MiKTeX)C:\Program Files\MiKTeX\miktex\bin(32-bit MiKTeX)C:\Program Files\MiKTeX 2.9\miktex\bin\x64andC:\Program Files\MiKTeX 2.9\miktex\bin(legacy MiKTeX 2.9)C:\Program Files (x86)\MiKTeX\miktex\binandC:\Program Files (x86)\MiKTeX 2.9\miktex\bin(32-bit on 64-bit Windows)C:\Strawberry\perl\bin(Strawberry Perl)C:\Program Files\Git\cmdandC:\Program Files (x86)\Git\cmd(Git for Windows)- Ghostscript in
C:\Program Files\gs\*\binandC:\Program Files (x86)\gs\*\bin(newest version first) %LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64and%LOCALAPPDATA%\Programs\MiKTeX\miktex\bin(user MiKTeX installation)%LOCALAPPDATA%\Programs\MiKTeX 2.9\miktex\bin\x64and%LOCALAPPDATA%\Programs\MiKTeX 2.9\miktex\bin(legacy user MiKTeX 2.9)%LOCALAPPDATA%\MiKTeX\miktex\bin\x64and%LOCALAPPDATA%\MiKTeX\miktex\bin(user MiKTeX without Programs subfolder)%LOCALAPPDATA%\Programs\Git\cmd(Git for Windows installed per user)- Scoop
shimsandapps\*\currentdirectories (when Scoop is installed) - MSYS2
usr\bin,mingw64\bin, andmingw32\binunderC:\msys64,C:\msys32, or%MSYS2_HOME%(whenperl.exeexists there) - TeX Live's bundled Perl in
C:\texlive\*\tlpkg\tlperl\bin(and under%USERPROFILE%\texlive) - Versioned TeX Live directories (e.g.,
C:\texlive\2024\bin\windows) - User-specific installations in
%USERPROFILE%\texlive\*\bin\*and%USERPROFILE%\TinyTeX\bin\*
Linux:
/usr/local/bin/usr/bin/opt/miktex/bin(MiKTeX installed via APT/AUR)/snap/bin(Ubuntu snap packages)/home/linuxbrew/.linuxbrew/bin(Linuxbrew)~/bin(MiKTeX default symlink target)~/.local/bin(user-local tools such as Claude Code's native installer)- Versioned TeX Live directories
- User-specific installations
Opening VS Code from a configured terminal provides the most reliable environment.
Manual installation:
- Follow the steps in the installation guide
- Use the recommended installation methods for your OS
Fix permissions issues:
- Make sure you have permission to run these tools
- On macOS/Linux, check file permissions with
ls -la
API connection issues
API key problems
Problem: Error messages related to API keys or authentication failures.
Solutions:
Verify API keys:
- VS Code extension: open Settings → Models → API keys and re-enter the key for the affected provider
- CLI: set the provider's API-key environment variable (or connect a provider subscription with
texra auth chatgpt login)
Check API key validity:
- Verify your API keys are active in the provider dashboards
- Check for billing issues or usage limits
Network issues:
- Make sure your network allows connections to API endpoints
- Check whether a firewall or network policy is blocking the connection
Provider status:
- Check the status pages for OpenAI, Anthropic, or Google
- Temporary API outages may cause connection issues
Document processing issues
LaTeX compilation and diff errors
- Check the toolchain: Run
texra doctorto confirmlatexmk,pdflatex,bibtex,biber,latexdiff, andlatexindentare found onPATH. - Verify standalone compilation: Make sure the original
.texdocument compiles cleanly outside of TeXRA before running a diff or extraction task. - Missing LaTeX packages: Install missing style files with
tlmgr install <pkg>(TeX Live) or the MiKTeX Console. - Diff fails to compile: Complex custom macros or unclosed math environments can conflict with
latexdiffmarkup. Format both files first (latexindentortex-fmt), or lower Math markup in diffs on Settings → LaTeX → Compile & diff.
TikZ and image processing errors
- Verify Ghostscript and GraphicsMagick / ImageMagick: Rasterizing PDFs for models without native PDF support requires both tools (
gm versionormagick --version, andgs --version). - Custom TikZ packages or macros: Add custom packages to
"texra.latex.tikzTemplate"and custom style paths to"texra.latex.tikzInputDirectory"in.texra/config.json(see TikZ figures).
AI model and output issues
Timeouts, context limits, or weak results
- Rate limits and quota: Check your provider dashboard if requests fail with quota or billing errors.
- Large documents: If a run times out or hits the output token limit on a long
.texfile, split the file into per-section inputs or raise the model's max output tokens. - Slow turnaround: Document tasks run multi-pass reasoning and can take 10–30 minutes on frontier reasoning models. For quick edits, pick a faster model (
google/gemini-3.8-flash,anthropic/claude-haiku-5-5,deepseek/deepseek-flash, oropenai/gpt-6-luna), or use an interactive chat agent instead. - Stronger reasoning: For hard derivations, proofs, or complex merges, use a flagship model (
anthropic/claude-fable-5-1,anthropic/claude-opus-5-5,openai/gpt-6-astra,openai/gpt-6.1-sol, orgoogle/gemini-3.1-pro-preview) and enable reflection with--reflect(addtask.requestsentries if you want extra revision passes).
Missing or truncated output files
- Locate the run folder:
- In VS Code, check Generated files in the ProgressBoard or choose Open task folder () from the task's
⋯menu to openexecutions/<run-id>/. - Each revision writes its extracted file under its input filename (e.g.,
r0/draft.tex,r1/draft.tex), alongside the raw model responser0/output.xml.
- In VS Code, check Generated files in the ProgressBoard or choose Open task folder () from the task's
- Repair malformed XML:
- Document tasks wrap their output in
<documents><document name="...">...</document></documents>. - TeXRA closes an unclosed
<document>tag itself and tries to recover files that have no tags. If the model hit its output token limit or the reply is malformed in another way and a file still fails to extract, openr0/output.xmlin the run folder and repair the tags to recover the text:
- Document tasks wrap their output in
When a file still fails to extract, open r0/output.xml and repair the tags to recover the text.
High memory use in long CLI sessions
Problem: A texra session that has run for days, or launched many subagents, slows down and eventually exits with a JavaScript heap out of memory error.
Solutions:
Update TeXRA: 0.40.8 and later release the per-subagent and per-request state that earlier versions kept for the whole session.
Raise the heap limit for very long runs. Node caps the heap at a few gigabytes by default:
bashNODE_OPTIONS=--max-old-space-size=8192 texra chatCapture a heap snapshot if memory still grows, so the retained objects can be inspected in Chrome DevTools:
bashNODE_OPTIONS=--heapsnapshot-near-heap-limit=1 texra chatNode writes a
.heapsnapshotfile into the working directory right before it would run out of memory. Attach it to a bug report.
Debugging tips
Using ProgressBoard
The ProgressBoard is your main debugging tool in VS Code. Read the ProgressBoard guide for a full walkthrough.
- Open the ProgressBoard: Select the TeXRA icon in the Secondary Side Bar and click Tasks, or run TeXRA: Show Tasks from the Command Palette.
- Inspect logs: Entries are color-coded by severity (green for info/success, yellow for warnings, red for errors) and expand to show nested tool calls and model responses:
- 14:02:11INFORun r0 started · spectral-gap.tex
#a3f1 - 14:03:48OKWrote r0/output.xml — 4 files
- 14:05:02WARNApproaching context window — 182k/200k tokens
- 14:05:39ERRORlatexdiff exited 1 — see build log
r0/build/diff.log:84 Undefined control sequence \DIFadd
ProgressBoard color-codes every entry by severity (green info/success, yellow warnings, red errors), with task-id chips and expandable nested detail.
- Copy diagnostics: Select
⋯→ Copy diagnostics on a task header to copy the task ID, model, status, output paths, and any compile errors for a bug report.
Getting support
- GitHub Issues: Search or open an issue on LionSR/TeXRA with your OS, TeXRA version, reproduction steps, and
texra doctoror Copy diagnostics output. - Email: For private reports, write to contact@texra.ai.
Next steps
If you've resolved your issue or want to learn more about TeXRA:
- Best practices: learn how to use TeXRA effectively
- Configuration: customize TeXRA for your needs
- Agent reference: explore the available agents