Skip to content

SuperCli 1.0.37

Choose a tag to compare

@github-actions github-actions released this 20 Nov 20:14

SuperCli 1.0.37

Fixes for background workers in the web GUI and for a queued message that
briefly disappeared. Polish notes follow the English ones.

Before updating

  • Back up your portable supercli-data directory and close other running
    copies before installing. The updater replaces the two executables, not
    private data, and a manual restart is required afterward.
  • No configuration changes are required.

A worker that says "working" really shows its work

Reported: "Worker 106 · code" said "working" with the text "Tool calls from
before the view was refreshed are not shown here; new ones will appear live"
and nothing ever appeared. A read-only copy of the conversation showed the
worker really was working: 36 model steps, 44 tool calls, about 2.07 M input
and 22.6 k output tokens in 12.5 minutes (14:44:08 to 14:56:42); it finished
and reported back on its own. The card was the problem:

  • When the coordinator's turn ended, the transcript was rebuilt from saved
    history. The rebuilt card is not a live tool row, and every later progress
    event of that worker (which names the task call that started it) was looked
    up only among live tool rows and silently dropped. The card therefore never
    showed a single new call. Progress of the worker now reaches the rebuilt
    card of its own task call.
  • A card rebuilt after a refresh (or after the turn ended) now loads the run's
    tool calls so far from the server (/api/workers/activity) instead of the
    "not shown" placeholder; calls arriving live keep updating in place.
  • Every running worker shows what it is doing: "model thinking · 40s" or
    "ctx_execute running · 2m05s", the latest output line of a long command
    (builds and tests report progress every 2 s), and "last activity 12s ago".
    After 5 minutes without any progress the card and the worker panel say
    "no progress for 6m10s" and offer Stop and Restart (Restart stops
    the run and asks the coordinator to resume the worker with its saved
    conversation). The server tracks this per worker (phase, phase_tool,
    phase_since, last_progress_at, tool_progress in /api/workers).

Background work keeps the conversation visibly busy

With only background workers running and the coordinator idle, the session
looked finished. Now the composer shows a prominent "Working in background (N)"
badge (and a highlighted composer frame), the header dot keeps pulsing, and
the conversation in the session list shows "N in background" with a pulsing
dot. All of it clears when the last worker finishes.

The worker panel no longer blinks

When a worker finished, the automatic turn rebuilt the transcript; the
"Workers" panel was emptied and hidden, then rebuilt about half a second
later. Rebuilding the same conversation now keeps the panel and its rows,
re-binds each row to its rebuilt card and only changes state (with a short
colour transition). Settled workers stay listed for 10 minutes.

A queued message stays visible when it gets its turn

With the conversation open in two views (for example the app window and a
browser tab), both saw the turn end and both tried to start the queued
message. The view that lost removed its message; the other view's run then
appeared only after a history reload, so the message vanished for a few
seconds and came back. Any view now shows the user message of a turn started
elsewhere immediately and keeps it until that run or the saved history is
rendered; a lost claim keeps the existing bubble.

A queued message in a single view

Reported again for one window, without a second view. Two causes in the same
place, the moment a queued message gets its turn while background workers run:

  • The automatic wake-up turn (a worker just finished) could claim the
    conversation a moment before the queued message's turn. That turn waited
    only 3 s for the conversation and then failed with "conversation is already
    running"; wake-up turns of a coordinator take much longer, so the message
    left the chat, went back to the queue (paused) and came back later.
    Reproduced in the browser test; a user turn now waits for an automatic
    turn to finish (two user turns keep the short wait).
  • The newest transcript blocks were virtualized (content-visibility: auto)
    as soon as the previous turn settled, exactly when the queued message is
    appended below them. The WebView of the app window can skip painting such
    a block until the next layout (a message that vanishes for a few seconds
    and comes back without leaving the DOM). The last 8 blocks are never
    virtualized now.

Usage of background workers is recorded

Model calls of task{async:true} workers ran on a context without the
session's usage recorder, so their tokens and cost were missing from the
usage/billing tables (in the reported data: no worker rows after 13:16:59
although workers ran until 14:56). The recorder now follows the worker,
also after the coordinator's turn has ended.

Max. parallel agents is a setting

The fixed limit of 6 concurrently running workers is now
max_parallel_agents (Settings → Modes and TUI /settings: "Max. parallel
agents"): a number, 0 = no limit, empty = default 6. Optional
max_parallel_agents_per_provider caps workers per provider (for example
lmstudio=1). Above 8 or unlimited the settings warn about provider rate
limits (HTTP 429), cost and local servers that answer one request at a time.
A start over the limit still fails at once with a clear message; 429
responses keep being retried with backoff inside each call, never blocking
the coordinator. See docs/configuration.md.

Adding to the queue no longer fails with "database is locked"

A message added to the queue at the moment a turn started (for example right
after sending the previous one) could be rejected with "database is locked
(SQLITE_BUSY)": it did not reach the queue, a toast appeared and the text went
back to the composer. Saving a queued message read the queue first and then
wrote; when the starting turn wrote in between, SQLite refused at once instead
of waiting. Write transactions of the session database now take the write
lock when they begin and wait for the other writer (up to 5 s), so the message
is queued.

Settings saves no longer expose a half-written config.toml

config.toml was rewritten in place (truncated, then written). A turn that
started during a settings save (for example a language change) could read an
empty or partial file and run with default settings, such as the wrong mode
or tool set; a concurrent load-modify-save could even write that empty
configuration back. The file is now written to a temporary file and renamed
over the old one (on Windows the reader shares the file for replacement, and
a file locked by another program is still saved in place).

Tests

New tests: worker liveness phases, tool progress and the live journal (fake
provider); command progress lines; full-app browser tests with a scripted
provider for background-work state, live progress on a rebuilt card, journal
rebuild after a refresh, the stall warning with Stop/Restart, a panel that
never disappears when a worker finishes, and a queued message that stays
visible (normal turn, automatic turn, worker progress, followed turn, window
refocus, two views, automatic wake-up turn racing the queued turn in one
view); a user turn waiting for an automatic turn; worker usage recorded after
the turn; max_parallel_agents parsing, registry caps (global, unlimited,
per provider), the GUI knob with its warning and the TUI setting. The -race flake in
TestA130_LongSessionRetainedUserContextDoesNotWedge is fixed (the test read
the loop's messages while the turn was still running). New: a queued message
saved while another connection writes, and readers never seeing a partial
config.toml during repeated saves; both fail on 1.0.36 code.


SuperCli 1.0.37 (PL)

Poprawki agentów pomocniczych działających w tle w GUI oraz wiadomości z
kolejki, która na chwilę znikała.

Przed aktualizacją

  • Zrób kopię przenośnego katalogu supercli-data i zamknij inne uruchomione
    kopie. Aktualizacja podmienia dwa pliki wykonywalne, nie dane prywatne. Po
    instalacji uruchom program ponownie ręcznie.
  • Konfiguracja nie wymaga zmian.

Agent, który „pracuje”, naprawdę pokazuje swoją pracę

Zgłoszenie: „Worker 106 · code” miał status „pracuje” z tekstem „Wywołania
narzędzi sprzed odświeżenia widoku nie są tu pokazane; nowe pojawią się na
żywo.” i nic się nie pojawiało. Kopia rozmowy (tylko do odczytu) pokazała, że
agent naprawdę pracował: 36 kroków modelu, 44 wywołania narzędzi, ok. 2,07 mln
tokenów wejścia i 22,6 tys. wyjścia w 12,5 minuty (14:44:08–14:56:42); sam
skończył i zgłosił wynik. Winna była karta:

  • Po zakończeniu tury koordynatora transkrypcja była odbudowywana z zapisanej
    historii. Odbudowana karta nie jest „żywym” wierszem narzędzia, a każde
    kolejne zdarzenie postępu agenta (wskazujące wywołanie, które go uruchomiło)
    było szukane tylko wśród żywych wierszy i po cichu odrzucane. Teraz postęp
    trafia do odbudowanej karty jego wywołania.
  • Karta odbudowana po odświeżeniu (lub po końcu tury) wczytuje z serwera
    dotychczasowe wywołania narzędzi tego przebiegu (/api/workers/activity)
    zamiast komunikatu „nie są tu pokazane”; nowe wywołania aktualizują się na
    miejscu.
  • Każdy pracujący agent pokazuje, co robi: „model myśli · 40s” albo
    „ctx_execute działa · 2m05s”, ostatnią linię wyjścia długiego polecenia
    (kompilacje i testy co 2 s) oraz „ostatnia aktywność 12s temu”. Po 5
    minutach bez postępu karta i panel pokazują „brak postępu od 6m10s” oraz
    przyciski Stop i Uruchom ponownie (zatrzymuje przebieg i prosi
    koordynatora o wznowienie agenta z zapisaną rozmową).

Praca w tle widocznie zajmuje rozmowę

Gdy pracowali tylko agenci w tle, a koordynator był bezczynny, sesja wyglądała
na zakończoną. Teraz pole wiadomości pokazuje wyraźną plakietkę „Pracuje w
tle (N)” (z podświetloną ramką), kropka w nagłówku pulsuje, a rozmowa na
liście sesji ma „N w tle” z pulsującą kropką. Wszystko znika po zakończeniu
ostatniego agenta.

Panel „Agenci pomocniczy” już nie mruga

Po zakończeniu agenta automatyczna tura odbudowywała transkrypcję, a panel
był czyszczony, ukrywany i po ok. pół sekundy budowany od nowa. Teraz przy
odbudowie tej samej rozmowy panel i jego wiersze zostają, wiersze są
przypinane do odbudowanych kart i zmienia się tylko stan (z krótkim
przejściem koloru). Zakończeni agenci pozostają na liście przez 10 minut.

Wiadomość z kolejki nie znika, gdy przychodzi jej kolej

Gdy rozmowa była otwarta w dwóch widokach (np. okno aplikacji i karta
przeglądarki), oba widziały koniec tury i oba próbowały wysłać wiadomość z
kolejki. Przegrany widok usuwał swoją wiadomość, a tura drugiego widoku
pojawiała się dopiero po ponownym wczytaniu historii, więc wiadomość znikała
na kilka sekund. Teraz każdy widok od razu pokazuje wiadomość tury
uruchomionej gdzie indziej i trzyma ją do czasu wyświetlenia tej tury lub
zapisanej historii.

Wiadomość z kolejki w jednym oknie

Dwie przyczyny w chwili, gdy wiadomość z kolejki dostaje turę, a agenci
pracują w tle: (1) automatyczna tura po zakończeniu agenta mogła zająć
rozmowę tuż przed nią, a tura wiadomości czekała tylko 3 s i kończyła się
błędem „rozmowa już trwa” — wiadomość znikała, wracała do kolejki i
pojawiała się później (odtworzone w teście; teraz tura użytkownika czeka na
koniec tury automatycznej); (2) najnowsze bloki rozmowy były wirtualizowane
(content-visibility: auto) dokładnie wtedy, gdy pod nimi dodawana jest
wiadomość z kolejki — okno aplikacji (WebView) potrafi ich wtedy chwilowo
nie narysować. Ostatnie 8 bloków nie jest już wirtualizowanych.

Zużycie agentów w tle jest zapisywane

Wywołania modelu agentów task{async:true} nie trafiały do tabel zużycia i
kosztów (w danych: brak wierszy agentów po 13:16:59, choć pracowali do
14:56). Teraz rejestrator zużycia sesji idzie za agentem, także po końcu tury
koordynatora.

„Maks. równoległych agentów” jako ustawienie

Stały limit 6 jednocześnie pracujących agentów to teraz max_parallel_agents
(Panel → Tryby oraz /settings w TUI): liczba, 0 = bez limitu, puste =
domyślnie 6. Opcjonalnie max_parallel_agents_per_provider (np.
lmstudio=1). Powyżej 8 lub bez limitu ustawienia ostrzegają o limitach
dostawcy (HTTP 429), koszcie i lokalnych serwerach obsługujących jedno
zapytanie naraz. Start ponad limit nadal kończy się od razu czytelnym
komunikatem; 429 są ponawiane z odstępem w ramach wywołania i nie blokują
koordynatora. Szczegóły: docs/configuration.md.

Dodanie do kolejki nie kończy się już błędem „database is locked”

Wiadomość dodana do kolejki w chwili startu tury (np. tuż po wysłaniu
poprzedniej) mogła zostać odrzucona komunikatem „database is locked
(SQLITE_BUSY)”: nie trafiała do kolejki, pojawiał się komunikat, a tekst
wracał do pola wiadomości. Zapis do kolejki najpierw czytał, a potem pisał;
gdy startująca tura zapisała coś pomiędzy, SQLite od razu odmawiał zamiast
poczekać. Transakcje zapisu bazy sesji zajmują teraz blokadę zapisu na
początku i czekają na drugi zapis (do 5 s), więc wiadomość trafia do kolejki.

Zapis ustawień nie odsłania już niepełnego config.toml

config.toml był nadpisywany w miejscu (obcięty, potem zapisany). Tura
rozpoczęta w trakcie zapisu ustawień (np. zmiany języka) mogła odczytać pusty
lub niepełny plik i działać na ustawieniach domyślnych (np. z innym trybem
lub zestawem narzędzi); równoczesne „wczytaj-zmień-zapisz” mogło nawet
zapisać taką pustą konfigurację z powrotem. Teraz plik jest zapisywany do
pliku tymczasowego i podmieniany jednym ruchem (w Windows odczyt pozwala na
podmianę, a plik zablokowany przez inny program nadal jest zapisywany w
miejscu).

Testy

Nowe testy: fazy aktywności agenta, postęp narzędzi i dziennik na żywo
(sztuczny dostawca); linie postępu poleceń; testy całej aplikacji w
przeglądarce ze skryptowanym dostawcą (stan pracy w tle, postęp na
odbudowanej karcie, odbudowa po odświeżeniu, ostrzeżenie o braku postępu ze
Stop/Uruchom ponownie, panel, który nie znika, wiadomość z kolejki, która nie
znika). Naprawiono niestabilny pod -race test
TestA130_LongSessionRetainedUserContextDoesNotWedge. Nowe: zapis do
kolejki w trakcie innego zapisu oraz brak niepełnego config.toml przy
wielokrotnym zapisie (oba nie przechodzą na kodzie 1.0.36).