Status bar error/warning counts stay '?' for the whole session: gopls sends diagnostic results without a version tag, so AFT never accepts them
Description
Expected: the status bar shows real error/warning numbers, e.g. [AFT E0 W0 | T5].
Actual: the E/W slots show ? for the whole session, even when aft_inspect reports a clean workspace (FRESH, 0 errors, 0 warnings).
Why (from the daemon logs)
- gopls sends its analysis results without the optional LSP "version" tag, so AFT cannot prove they match the current file content and does not count them:
publishDiagnostics event=received file=.../consumers.go version=none diagnostics=0
publishDiagnostics event=uncertified-because-report-stale file=.../consumers.go version=none
- The bar is built only from accepted results, and in my logs gopls included a version tag only after a save.
- In a session where an AI agent does all editing in a git worktree outside the watched root, no watched file is ever saved — so the bar never receives an accepted result and E/W stay
?indefinitely, whileaft_inspect(which asks the language server directly per file) correctly reports 0 errors.
Test
Adding and reverting a comment in one watched file forced versioned saves (publishDiagnostics version=1..3 diagnostics=0), and a scoped inspect confirmed "authoritative results for 1 of 1 scoped file" — but the bar still showed ?. Either 1 accepted file out of ~95 is not enough, or the bar only repaints on real error counts; I cannot tell which.
Suggested fixes
- Let a completed
aft_inspectsnapshot also set the bar counts — inspect results are already verified. - Or accept untagged results after comparing them against the current file content.
Reproduction
- Start an OpenCode session in a Go repository.
- Do all editing outside the watched root (worktree), or never save a watched file.
aft_inspectreturns FRESH, 0 errors.- The bar still shows
[AFT E? W? | T...].
Environment
- AFT binary: 0.66.0 | OpenCode: 2.4.1 | Plugin:
@cortexkit/aft-opencode@latest - gopls v0.24.0 | macOS arm64 | Node v26.13.1
- Logs:
~/.local/share/cortexkit/aft/logs/(lines above from 2026-11-24T22:01-22:05Z)
Related: a daemon restart (kill -TERM; the plugin respawns it) fixed a separate stuck state where every inspect returned "no diagnostics arrived in time (95 files)" — but the bar still never picked up numbers, which is this issue.
Thanks for the detailed report. The log lines pointed straight at it.
We reproduced it on Linux with gopls v0.24.0, on AFT 0.67.1 and on our current development build. Two things combine:
- When AFT asks gopls for a file's diagnostics, gopls v0.24.0 answers with
"kind": ""instead of"kind": "full". AFT's protocol library can't read that, treats the reply as a partial result, and ignores it. - AFT numbers a newly opened file from version 0. gopls leaves a version of 0 out of the diagnostics it pushes, so AFT can't tell which file content those results describe, and doesn't count them.
The status bar shows numbers only once it has a result it can match to the current file content, so with gopls it stays at ?. aft_inspect can reach a result through a different route, which is why the two disagreed.
We're fixing both on AFT's side: AFT will read gopls's empty kind as a full report, and number newly opened files from 1, as VS Code does. The fix will ship in an upcoming release, and we'll update this issue when it does.