* Default is None (behaviour unchanged)
* Override is applied for Claude Code, which does not unpack structured
output, causing the LLM to see unnecessary escapings in returned tool
results #1042
Register the LATEX language (.tex/.bib/.sty/.cls) backed by texlab,
downloaded as a sha256-verified single-binary from GitHub Releases
(v5.25.1) across macOS/Linux/Windows. Document symbols expose the
sectioning hierarchy; definitions/references cover labels and citations.
Includes a smoke-test fixture repo and basic document-symbol tests.
Co-authored-by: KoscheiiB <KoscheiiB@users.noreply.github.com>
A registered project whose root directory was deleted (e.g. a removed git
worktree) would raise FileNotFoundError from RegisteredProject.matches_root_path
(via Path.samefile). Because get_registered_project iterates matches_root_path
over every registered project, one dangling entry aborted activation of all
other, valid projects until an MCP server restart.
matches_root_path now treats a non-existent directory as a non-match instead of
letting the filesystem error propagate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
in relevant CLI commands and tests, fixing the newly introduced
issue where some CLI commands may open a JetBrains IDE if
the respective config setting was set.
Fixes#1578
* Prevent Julia LS probe from clobbering Serena's stdio MCP pipe
When Serena runs over the stdio MCP transport, stdin/stdout *are* the JSON-RPC channel.
The Julia language-server setup spawns probe/install subprocesses with `capture_output=True`,
which redirects the child's stdout/stderr but not its stdin, so the Julia child inherits
Serena's stdin (the MCP pipe) and clobbers it. The stdio server then exits within
milliseconds of `initialize`, and the client reports "tools fetch failed".
- Pass `stdin=subprocess.DEVNULL` to both `subprocess.run` calls in `julia_server.py`
(`_setup_runtime_dependency` probe and `_install_language_server` install).
- Add a comment explaining the stdio-transport hazard.
Fixes#1577
* Add changelog entry for the Julia stdio MCP fix
Document the fix under the Unreleased "Language Servers" section.
* Refactor Tool.apply_ex to either return a success response or
raise ToolCallError (if catch_exceptions=False)
* Adapt SerenaFastMCPTool to catch ToolCallError and reraise as
fastmcp.exceptions.ToolError, triggering an error response
in the SDK
Even though lists are explicitly supported on Windows,
the subprocess implementation does not guarantee that shell
metacharacters are appropriately escaped, i.e. the individual
list elements are not necessarily treated as atomic arguments.
oslex provides an abstraction layer which works across platforms.
Context or mode argument referencing a known name (e.g. `--context anitgravity`) could result in
incorrect file access if a corresponding local file existed (e.g. `./antigravity` binary);
file access is now guarded with path detection (file ending or path separator must be present)
Fixes#1558
Bug: with `languages: [svelte]` (the documented setup), find_symbol/get_symbols_overview returned
empty for .ts/.js files, and find_referencing_symbols failed with "No symbol matching '<name>'
found". Symbols living in plain .ts/.js modules (services, stores, types, utils) were undiscoverable
through Serena's symbolic tools.
Cause: SvelteLanguageServer delegated references/definition/rename/diagnostics for .ts/.js files to
the companion (svelte-plugin-aware) TS server, but had no override for document-symbol requests. So
documentSymbol on a .ts/.js file was answered by the base svelte LS, which only serves .svelte
files, and returned nothing. Since find_symbol/get_symbols_overview are backed by documentSymbol --
and find_referencing_symbols must first locate the target symbol the same way -- the discovery step
never reached the companion.
Fix: override request_document_symbols to route .ts/.js files to the companion TS server, mirroring
the existing delegations. This is the single method that all symbol-tree/overview/containing-symbol
paths flow through, so it restores discovery for find_symbol, get_symbols_overview,
find_referencing_symbols and symbol-based editing in one place.
Tests: add .ts document-symbol and overview coverage plus agent-level symbol-retriever tests;
strengthen the existing symbol-tree test to assert GAME_VERSION, a symbol defined only in a .ts file
(the prior assertions also matched .svelte definitions, which is why the regression went unnoticed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Make SerenaConfig.save private, because it is not a method that should
ever be called on a runtime instance; it is purely an internal operation
* Refactor the CLI init command appropriately (which used the save method)
* Improve comments to make usage limitations clear
* Improve the changelog entry to make error conditions more concrete
Bug: `serena start-mcp-server --language-backend X --project <newdir>` silently rewrote the global
serena_config.yml's language_backend to X. Cause: a not-yet-registered --project is auto-registered, and
SerenaConfig.save() rewrote the WHOLE file from the in-memory config — which by then carried the CLI
--language-backend override (and would equally carry --log-level / --tool-timeout / etc.).
Fix: project (de)registration now persists ONLY the projects list. add_registered_project / remove_project go
through a new _persist_projects(), which re-loads the on-disk config, copies in the current project list, and
saves that — so a transient runtime override of any field can never be written back.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix find_project_root hijacking git worktrees nested under a Serena project
find_project_root searched all ancestor levels for .serena/project.yml
before ever looking for .git. A git worktree whose own .git is a pointer
file, nested under a directory that is an explicit Serena project, was
resolved to the ancestor project instead of the worktree. With CLI agents
that launch via --project-from-cwd (Claude Code, Codex, Gemini), this
silently bound the server to the wrong working tree: reads returned stale
symbols and edits landed in the parent repo.
Walk up in a single pass so the nearest project boundary wins, whether it
is a .serena/project.yml or a .git (dir or worktree/submodule pointer
file). Same-level behavior is unchanged. Adds a regression test.
* Document worktree project-root fix in changelog and usage docs
upon project activation
Serena searches for the plugin instance upon project activation, and if the instance is not found
and the setting is configured, launches a new IDE instance based on the command
* Remove obsolete/outdated content
* git-worktree:
- Remove incorrect recommendation to copy the entire .serena folder
in order to retain the cache (cache contains abs. paths)
- Recommend to add the .serena folder to version control instead
(which will not include the cache folder)
Relates to #805