Skip to content

Tools beside the thread

Language Services

Project-wide type errors, go to definition, and capability-aware references in the Code editor, from a confined language server, and how to turn them off.

  • 11 min read
  • 10 sections

Language Services ​

When you open a TypeScript or JavaScript file in a Code thread, the editor shows the Project's real type errors and lets you jump to a definition in another file of the same checkout. The analysis comes from the TypeScript language server that ships with Octant, which the host runs for that checkout.

Completion, documentation and navigation ​

When the current language server advertises support, Code also offers Project-aware completion, hover documentation, function signature help, Outline, and formatting. Problems lists the current file's diagnostics; select a row to jump to its location.

These features use your current unsaved text. An answer for an older draft is dropped. The editor keeps working when a feature is unsupported. Completion suggestions requiring server commands or additional file edits are omitted; reviewed rename and quick fixes remain separate actions.

Format changes the draft, and Format on save is optional in Editor settings. The formatter must return a complete set of changes for this file; Octant does not apply an incomplete formatting response or execute a command.

What you see ​

  • Problems. Errors and warnings are underlined in the editor, and hovering one shows the server's message. A line under the file's toolbar counts them, or says No problems found. These are the Project's errors: the server reads your tsconfig, your dependencies, and the other files of the checkout, which the editor's built-in services cannot.
  • Go to definition. Press F12, or hold ⌘ (macOS) or Ctrl and click a name. A definition in the same file moves the cursor there. A definition in another file of the checkout opens that file in a Code file tab, at the definition. A definition outside the checkout, such as one in TypeScript's own library, is not opened: a short notice says where it is, and no host path is shown.
  • Unsaved text. The server reads what you have typed, not only the saved file. Your text is sent shortly after you stop typing, kept in memory, and never written to disk.

The editor's own services (colouring, completions in the open file, and the other editing basics) keep working beside the server. While the server serves a file, its problems are the only ones shown, because the editor's built-in check reads one file alone and would report imports it cannot see as errors.

Plan threads are served too: the server reads the checkout and cannot change it. A paired device that can reach the thread gets the same problems and definitions.

Find references in the checkout ​

Place the cursor on a name and choose Find references in checkout in the editor toolbar or context menu, or press ⌘+Alt+F12 on macOS or Ctrl+Alt+F12 elsewhere. The host first checks whether the running server supports references for this file, then confirms the current text in memory. It does not save the file or start a server for this action.

The list names the checkout and shows a snapshot of up to 1,000 locations in 64 files, with a notice if results were omitted. Choose a location to open it; a location outside this checkout shows only a notice. Recheck references queries again explicitly. Close references or Escape closes the list. Changing the source text or switching files hides old results.

Closing a query may happen after the host accepted its in-memory text sync. If that acknowledgement arrives safely, the next query uses it. If the reply is lost, choose Reload language document, then Find references in checkout again. Reload explicitly reconnects this file under the current language-server permissions; Recheck references alone never opens or starts a server. It does not save your file or silently retry the old query.

Unsupported, unknown, unavailable, stale, or timed-out support stays visible. Where configured, Open externally uses your existing editor handoff. An older host that cannot acknowledge the current text cannot supply this query; reconnect or use the external editor. Monaco's built-in single-file references remain available separately. Rename and reviewed quick fixes are not part of this references action.

Rename and reviewed quick fixes ​

Put the cursor on a symbol, enter a New symbol name, and choose Preview rename, or choose Find quick fixes. The running server must report support; otherwise use Open externally where configured. Nothing is saved while preparing. Open each affected file to review its Before and After text, then choose Apply reviewed changes. Plan can preview but cannot apply.

Save unsaved drafts first. Changing the source text hides the preview; changes to affected files or their authority block a stale save. A fix that requires running a command, creating/deleting/renaming a file, or resolving more data is not offered. Large or unsafe edits explain why preparation stopped.

Files save in order through the ordinary editor save checks. If a later save fails, the message names the stopped file and how many earlier files were saved. Check those files before preparing again. An uncertain answer is never retried automatically.

What the server can do ​

The server is part of Octant: the desktop app and the headless host install each carry the one built for their Mac or Linux machine, with its license and notices, and nothing is downloaded when it starts. On macOS it is signed with the app. It changes version only when Octant updates.

The bundled server is confined when the host starts it:

  • It reads the checkout and its own install, and nothing else of yours.
  • It writes only its own cache, never the checkout.
  • It cannot run other programs or reach the network.
  • It starts only when you open a file it reads, and stops after ten minutes unused, or when the thread is archived or completed.

A file in one of the Project's extra folders gets the same server, confined to that folder in the same way. Any other path outside the Project's folders is refused.

It never runs anything the repository names. A tsconfig plugin list, an editor settings folder, or a repository's list of servers is data the server reads, never a program it starts.

Use the Project's own toolchain ​

By default the bundled server analyses your code with the TypeScript that ships with Octant. A Code Project can use the TypeScript it installs itself instead, so type errors and go to definition match what your build reports.

In the Project's overview, under Language services toolchain, turn on Use the Project's own toolchain. It is off by default, and only a window on this computer or a browser you paired yourself can change it (there it sits beside the Project's default mode).

With it on, the server runs code from the repository, so it follows the rules for servers that run the repository's tools and no longer those of the bundled server:

  • Below Full access, each checkout asks you to allow it before it starts; at Full access (outside Strict on Windows), it starts without asking.
  • It never runs in Plan.
  • It can write the checkout and reach the hosts the Project's network rules allow.
  • A checkout that has no copy of its own, for example before dependencies are installed, starts nothing. Octant does not fall back to the bundled copy.

Servers that run the repository's tools ​

A language server you add can be one that runs the repository's own tools (its launchClass is repo-tooling), for languages whose analysis needs the build or the package manager. Below Full access, opening a file it reads shows what allowing it means: it may write this checkout, run programs, and reach the hosts your Project's network rules allow. Choose Allow in this checkout or Allow in this Project; until you do, it does not start. At Full access (on macOS, Linux, and Windows outside Strict), a repository-tooling server starts without asking — for a local window, a device you paired yourself, or an agent's octant_code read — and retires once no active thread on that checkout holds Full access.

  • Below Full access, only you can allow and start it, at a window on this computer or from a device you paired yourself. A device a hub introduced is never offered the choice.
  • Plan threads are never served by it. Below Full access, an agent never starts it, though outside Plan it can read through one you allowed that is already running; at Full access, the agent's octant_code read can start it directly (Agents).
  • It reaches the network only through Octant, and only the hosts in the Project's rules (add one from a Code thread's Network access list). Every connection it asks for, allowed or refused, is recorded.
  • Below Full access, your approval holds for the server exactly as you reviewed and switched it on. Updating it, switching it off and on, or changing its trust asks again, which is also how you take an approval back.

States ​

The line under the toolbar saysWhat it means
Language services are starting…The server is starting for this checkout. Problems appear when it is ready.
Language services are offYou turned them off in Settings › Code.
The language server stopped (with Retry)It stopped unexpectedly more than twice in a minute. Retry starts it again.
The language server did not answer in timeA request took longer than ten seconds. Retry opens the file with it again.
This language server runs the repository's own tools…The server needs your approval; choose Allow in this checkout or Allow in this Project.
Language services are unavailable: reasonThe host refused, for example because the checkout is unavailable.
Language services are not available on this hostThe host cannot run language services (for example, Windows under Strict).
This file is too large for language servicesThe file is past what the server is sent. Editing still works.

Files the server does not read, such as Markdown or Python, show nothing.

Agents ​

An agent in a Code thread can ask the same server three things through one tool, octant_code: the problems in a file, where a name in it is defined, and where that name is used across the checkout (at most 200 places; the agent is told when there were more). It can do this in Plan mode too, since all three only read, and nothing asks you first.

The tool is offered only where it can help: on providers that can carry Octant's own tools, the same ones listed for the other Octant tools in Code, and only when a server the agent may start reads some file in the checkout. Today that is the bundled TypeScript and JavaScript server, or a server you added that does not run the repository's tooling. A Python or Rust repository with no such server, or a checkout whose server you turned off in Settings › Code, is not offered the tool at all. A profile whose tool list leaves out octant_code does not offer it either.

  • The agent gets answers for the file as saved, with lines counted from 1, so they match what it reads. If you have unsaved changes in that file, the agent is told to wait for you to save; your text stays as you typed it and is never sent to the provider.
  • A definition or use outside the checkout is named only as a library or "elsewhere", never by its host path.
  • An agent can start the bundled server, and at Full access it can also start a server that runs the repository's own tooling. Below Full access it never starts, restarts, or retargets a repository-tooling server; outside Plan it can still read through one that you allowed and that is already running in the editor. Answers from a repository-tooling server are marked as outside content, and if that server stopped, Retry in the editor stays yours.

Post-edit error feedback ​

When an Octant Harness Code turn edits or writes files (write, edit, or editFiles), Octant checks the active language server (within a shared 3.5-second budget across edited files) and appends any errors directly to the edit result: up to five errors formatted as path:line:col message (plus and N more), or No errors in <file> when clean. Warnings and hints are left out. Below Full access, if an unapproved repository-tooling server is not running, the edit returns immediately without blocking for approval. Providers that edit with their own tools (such as Claude Code and Codex) are unchanged and can query diagnostics through octant_code.

Turning them off ​

Settings › Code › Editor › Language services turns the bundled server off for every Code thread on this host. Running servers stop at once, and the editor keeps its built-in single-file services. Turn the switch back on to use the server again.

The design, its confinement rules, and the slices still to come are in the Language services specification.

Octant documentation · local-first by design