Skip to content

LSP not working for TypeScript in pi #153

Description

@tenshiak

Short description

aft_inspect doesn't detect language servers even thoug they are auto-installed

What happened?

aft_inspect doesn't use/detect LSPs, even though auto_install is enabled. Shows diagnostics: 0 errors, 0 warnings, 0 info, 0 hints (incomplete — servers: not installed: biome, typescript). Running npx @cortexkit/aft@latest doctor lsp [file] detects them, but always finds 0 issues for typescript even if I add errors to the file on purpose. If I install biome myself with npx install -g @biomejs/biome, it then detects it in aft_inspect, but returns the status as pending, still returning 0 errors or warnings. Manually invoking biome check [file] works fine after I install it.

With python and ty as LSP server it works fine and returns the finds errors.

Diagnostics

## Environment
- AFT CLI: v0.46.0
- AFT binary: 0.46.0
- OS: linux x64
- Node: v24.18.0

## Diagnostics
- Timestamp: 2026-07-09T09:25:21.768Z
- AFT CLI: v0.46.0
- AFT binary: 0.46.0
- OS: linux x64
- Node: v24.18.0

### Pi
- Host installed: true
- Host version: 0.80.3
- Plugin registered: true
- Plugin version: not installed
- AFT enabled: true (from ~/.config/cortexkit/aft.jsonc)
- AFT config parse error: none

#### Config paths

{
  "configDir": "~/.pi/agent",
  "harnessConfig": "~/.pi/agent/settings.json",
  "harnessConfigFormat": "json",
  "aftConfig": "~/.config/cortexkit/aft.jsonc",
  "aftConfigFormat": "jsonc"
}


#### AFT flags

{
  "$schema": "https://raw.githubusercontent.com/cortexkit/aft/main/assets/aft.schema.json",
  "enabled": true,
  "hoist_builtin_tools": true,
  "format_on_edit": true,
  "validate_on_edit": "syntax",
  "formatter": {
    "typescript": "biome",
    "python": "ruff",
    "rust": "rustfmt"
  },
  "checker": {
    "typescript": "biome"
  },
  "configure_warnings_delivery": "toast",
  "tool_surface": "all",
  "search_index": true,
  "semantic_search": true,
  "semantic": {
    "backend": "fastembed",
    "model": "all-MiniLM-L6-v2",
    "timeout_ms": 25000,
    "max_batch_size": 64,
    "max_files": 20000
  },
  "restrict_to_project_root": false,
  "auto_update": false,
  "lsp": {
    "auto_install": true,
    "servers": {},
    "python": "ty"
  },
  "bash": {
    "rewrite": false,
    "compress": false,
    "background": false,
    "subagent_background": false,
    "foreground_wait_window_ms": 8000
  },
  "inspect": {
    "enabled": true,
    "tier2_idle_minutes": 5
  },
  "backup": {
    "enabled": true
  }
}


#### Plugin cache

{
  "path": "~/.pi/agent/extensions",
  "exists": false
}


#### Storage

{
  "path": "~/.local/share/cortexkit/aft",
  "exists": true,
  "accessible": true,
  "sizesByKey": {
    "index": 8608342,
    "semantic": 187663296,
    "backups": 0,
    "url_cache": 0,
    "onnxruntime": 66492548
  }
}


#### ONNX Runtime

{
  "required": true,
  "systemPath": null,
  "systemVersion": null,
  "systemCompatible": null,
  "cachedPath": "~/.local/share/cortexkit/aft/onnxruntime/1.24.4",
  "cachedVersion": "1.24.4",
  "cachedCompatible": true,
  "platform": "linux-x64",
  "installHint": "AFT auto-downloads ONNX Runtime on supported Linux (glibc)",
  "requirement": ">=1.20"
}


#### Log file
`/tmp/aft-pi.log` (9 KB)

### Binary cache

{
  "versions": [
    "v0.46.0"
  ],
  "activeVersion": "v0.46.0",
  "totalSize": 75291360,
  "path": "~/.cache/aft/bin"
}


### LSP cache

{
  "npm": {
    "path": "~/.cache/aft/lsp-packages",
    "entries": [
      {
        "name": "@biomejs/biome",
        "path": "~/.cache/aft/lsp-packages/%40biomejs%2Fbiome",
        "size": 64360727
      },
      {
        "name": "yaml-language-server",
        "path": "~/.cache/aft/lsp-packages/yaml-language-server",
        "size": 19686976
      },
      {
        "name": "pyright",
        "path": "~/.cache/aft/lsp-packages/pyright",
        "size": 19286295
      },
      {
        "name": "typescript-language-server",
        "path": "~/.cache/aft/lsp-packages/typescript-language-server",
        "size": 3226474
      },
      {
        "name": "dockerfile-language-server-<USER>js",
        "path": "~/.cache/aft/lsp-packages/dockerfile-language-server-<USER>js",
        "size": 2464588
      }
    ],
    "totalSize": 109025060
  },
  "github": {
    "path": "~/.cache/aft/lsp-binaries",
    "entries": [],
    "totalSize": 0
  },
  "totalSize": 109025060
}


## Recent errors (last 20, sanitized)
_No error-shaped log lines found in recent history._

### Recent AFT tool failures
No recent AFT tool failures recorded.

## Logs (last 200 lines per harness)
#### Pi log (/tmp/aft-pi.log)


[2026-07-09T09:15:48.231Z] WARN [aft-pi] Config validation error in ~/.config/cortexkit/aft.jsonc: : Unrecognized keys: "hoist_builtin_tools", "auto_update"
[2026-07-09T09:15:48.242Z] WARN [aft-pi] Config validation error in ~/.config/cortexkit/aft.jsonc: : Unrecognized keys: "hoist_builtin_tools", "auto_update"
[2026-07-09T09:15:48.243Z] INFO [aft-pi] AFT extension loading (plugin v0.46.0)
[2026-07-09T09:15:48.250Z] INFO [aft-pi] Resolved binary: ~/.cache/aft/bin/v0.46.0/aft
[2026-07-09T09:15:48.253Z] INFO [aft-pi] AFT storage migration skipped for pi: no legacy data at ~/.pi/agent/aft; using ~/.local/share/cortexkit/aft for fresh install
[2026-07-09T09:15:48.448Z] INFO [aft-pi] ONNX Runtime found at ~/.local/share/cortexkit/aft/onnxruntime/1.24.4 (TOFU verified)
[2026-07-09T09:15:48.927Z] INFO [aft-pi] [lsp] auto-install: 5 npm + 0 github install(s) running in background
[2026-07-09T09:15:48.937Z] INFO [aft-pi] Workflow hints injected (3364 chars)
[2026-07-09T09:15:48.938Z] INFO [aft-pi] AFT extension ready (surface=all)
[2026-07-09T09:15:48.938Z] INFO [aft-pi] ONNX Runtime ready at ~/.local/share/cortexkit/aft/onnxruntime/1.24.4; new bridges will load semantic backend.
[2026-07-09T09:15:48.939Z] INFO [aft-pi] Spawning binary: ~/.cache/aft/bin/v0.46.0/aft (cwd: <PROJECT>)
[2026-07-09T09:15:48.939Z] INFO [aft-pi] bridge.spawnProcess: useFastembedBackend=true, parentORT=(unset), ortLibraryPath=~/.local/share/cortexkit/aft/onnxruntime/1.24.4/libonnxruntime.so
[2026-07-09T09:15:48.939Z] INFO [aft-pi] ORT_DYLIB_PATH set from managed ONNX Runtime: ~/.local/share/cortexkit/aft/onnxruntime/1.24.4/libonnxruntime.so
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] started, pid 25
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] project root set: <PROJECT>
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] reclaiming cross-host filesystem lock at ~/.local/share/cortexkit/aft/index/ceb11238169701bf/cache.lock from host c9abf0ce3d91 after stale heartbeat (969515ms > 75000ms)
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] loaded 1 backup entries across 1 session(s) from disk
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] acquired filesystem lock at ~/.local/share/cortexkit/aft/index/ceb11238169701bf/cache.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] gitignore matcher built: 32 pattern(s)
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] callgraph store warm deferred until semantic cold seed gate clears or completes
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] local embedder ready: model=all-MiniLM-L6-v2 intra_threads=8 token_type_ids=<REDACTED_SECRET>
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] acquired filesystem lock at ~/.local/share/cortexkit/aft/semantic/ceb11238169701bf/cache.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] search index: refreshed 1 stale file(s) from disk cache
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] released filesystem lock at ~/.local/share/cortexkit/aft/index/ceb11238169701bf/cache.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] loaded symbol cache from disk: 100 files
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] acquired filesystem lock at ~/.local/share/cortexkit/aft/symbols/ceb11238169701bf/symbols.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] released filesystem lock at ~/.local/share/cortexkit/aft/symbols/ceb11238169701bf/symbols.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] persisted symbol cache: 100 files
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] pre-warmed symbol cache: 0 new, 100 cached, 100 files total
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] loaded semantic index from disk: 567 entries
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] semantic index: cached index is current (567 entries)
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] released filesystem lock at ~/.local/share/cortexkit/aft/semantic/ceb11238169701bf/cache.lock
[2026-07-09T09:15:57.050Z] INFO [aft-pi] [aft] tier2 refresh scheduled: reason=pull, categories=["dead_code", "unused_exports", "duplicates", "cycles"]
[2026-07-09T09:15:57.085Z] WARN [aft-pi] [configure] deferred warnings for <PROJECT> arrived without session_id; buffering until first session-bound call
[2026-07-09T09:15:57.372Z] INFO [aft-pi] [lsp] installing dockerfile-language-server-<USER>js@0.15.0 to ~/.cache/aft/lsp-packages/dockerfile-language-server-<USER>js
[2026-07-09T09:15:57.602Z] INFO [aft-pi] [lsp] installing @biomejs/biome@2.5.2 to ~/.cache/aft/lsp-packages/%40biomejs%2Fbiome
[2026-07-09T09:15:57.673Z] INFO [aft-pi] Binary version: 0.46.0
[2026-07-09T09:15:57.743Z] INFO [aft-pi] [lsp] installing pyright@1.1.411 to ~/.cache/aft/lsp-packages/pyright
[2026-07-09T09:15:57.787Z] INFO [aft-pi] [lsp] installing typescript-language-server@5.3.0 to ~/.cache/aft/lsp-packages/typescript-language-server
[2026-07-09T09:15:58.097Z] INFO [aft-pi] [lsp] installing yaml-language-server@1.23.0 to ~/.cache/aft/lsp-packages/yaml-language-server
[2026-07-09T09:15:58.482Z] INFO [aft-pi] [lsp] installed typescript-language-server@5.3.0
[2026-07-09T09:15:58.489Z] INFO [aft-pi] [lsp] typescript-language-server@5.3.0 installed sha256=86ef128358dcd71d0c684d786d7751ee09fbbbbb2a521482b160007b8228be2e
[2026-07-09T09:15:58.975Z] INFO [aft-pi] [lsp] installed dockerfile-language-server-<USER>js@0.15.0
[2026-07-09T09:15:58.976Z] INFO [aft-pi] [lsp] dockerfile-language-server-<USER>js@0.15.0 installed sha256=42d531bef66e4883287de032adae2cb892541fc17b1de0e6eb002c4803862b96
[2026-07-09T09:15:59.874Z] INFO [aft-pi] [lsp] installed @biomejs/biome@2.5.2
[2026-07-09T09:15:59.875Z] INFO [aft-pi] [lsp] @biomejs/biome@2.5.2 installed sha256=7ffb4d217e5ddefcc19ca6afe76bb982f5eb36c9a124448105195fbcfc84bd77
[2026-07-09T09:16:01.214Z] INFO [aft-pi] [lsp] installed yaml-language-server@1.23.0
[2026-07-09T09:16:01.216Z] INFO [aft-pi] [lsp] yaml-language-server@1.23.0 installed sha256=93e9cff3dee44232379f0bccb98dd96d042a4472fe648ac9d4f85633e32c7e8d
[2026-07-09T09:16:07.175Z] INFO [aft-pi] [lsp] installed pyright@1.1.411
[2026-07-09T09:16:07.176Z] INFO [aft-pi] [lsp] pyright@1.1.411 installed sha256=f200762078eb9880faf421a5b30f9ef3055b1d85c6f10780d75db4da8d8499f1
[2026-07-09T09:16:24.429Z] INFO [aft-pi] [aft-lsp] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] failed to spawn TypeScript Language Server: not found: language server binary 'typescript-language-server' not found in <USER>_modules/.bin, lsp_paths_extra, or PATH
[2026-07-09T09:16:24.445Z] INFO [aft-pi] [aft-lsp] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] failed to spawn Biome: not found: language server binary 'biome' not found in <USER>_modules/.bin, lsp_paths_extra, or PATH
[2026-07-09T09:16:28.701Z] INFO [aft-pi] [aft] perf tier2_callgraph_snapshot: source=callgraph_store files=100 exports=205 edges=3615 entry_points=3 ms=1478
[2026-07-09T09:17:35.126Z] INFO [aft-pi] [aft] watcher started: <PROJECT>
[2026-07-09T09:17:35.622Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 2 files
[2026-07-09T09:17:38.644Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:17:39.646Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:17:40.148Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:18:24.346Z] INFO [aft-pi] [aft] perf tier2 phases category=cycles freshness=177ms snapshot=0ms scan=0ms(0 files) db=0ms rollup=0ms
[2026-07-09T09:18:24.346Z] INFO [aft-pi] [aft] perf tier2 category=cycles reuse=miss ms=1530
[2026-07-09T09:18:24.777Z] INFO [aft-pi] [aft] perf tier2 phases category=dead_code freshness=171ms snapshot=0ms scan=0ms(0 files) db=0ms rollup=0ms
[2026-07-09T09:18:24.777Z] INFO [aft-pi] [aft] perf tier2 category=dead_code reuse=miss ms=1962
[2026-07-09T09:18:24.796Z] INFO [aft-pi] [aft] perf tier2 phases category=unused_exports freshness=179ms snapshot=0ms scan=0ms(0 files) db=0ms rollup=0ms
[2026-07-09T09:18:24.796Z] INFO [aft-pi] [aft] perf tier2 category=unused_exports reuse=miss ms=1981
[2026-07-09T09:18:25.166Z] INFO [aft-pi] [aft] perf tier2 phases category=duplicates freshness=1479ms snapshot=0ms scan=0ms(0 files) db=0ms rollup=0ms
[2026-07-09T09:18:25.166Z] INFO [aft-pi] [aft] perf tier2 category=duplicates reuse=miss ms=2294
[2026-07-09T09:18:26.491Z] INFO [aft-pi] [aft] perf tier2_callgraph_snapshot: source=callgraph_store files=100 exports=205 edges=3615 entry_points=3 ms=1473
[2026-07-09T09:19:04.103Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:19:44.147Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:20:07.419Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] invalidated 1 files
[2026-07-09T09:20:55.202Z] INFO [aft-pi] [aft] [ses_019f4629-5f66-76a3-8e91-b1e069a5ea59] tier2 refresh scheduled: reason=debounce, categories=["dead_code", "unused_exports", "duplicates", "cycles"]


_Usernames and home paths have been stripped from this report._

Plugin version

No response

AFT binary version

No response

Platform

No response

Log output (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions