Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Remote VCS refresh takes 32s with recurring backend event-loop stalls #20254

Closedsuperdoer(GitHub profile, opens in a new tab) opened this issue 3 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Observed on an existing environment on 16 October 2026; I do not yet have a deterministic reproduction on a clean install.

  1. Connect the macOS desktop app to a Linux VPS through T3 Connect.
  2. Open an existing thread in a clean repository on main whose GitHub remote uses SSH.
  3. Use the thread and allow VCS status to refresh; the warning also recurred after reconnecting to the backend.
  4. Observe the 'Some requests are slow' notification for vcs.refreshStatus (>15 seconds), then inspect server.trace.ndjson and event-loop-stalls.ndjson.
  5. Compare the T3 spans with direct Git and gh commands run in the same repository on the VPS.

Restarting t3code.service and reconnecting did not prevent recurrence.

Expected behavior

Local branch and working-tree status should remain responsive. Remote fetch and PR lookup latency should not block local status for tens of seconds, and unrelated diagnostics/provider checks should remain responsive.

Actual behavior

A recorded ws.rpc.vcs.refreshStatus took 32.447 seconds and eventually succeeded. Within that refresh, localStatus took 14.645 seconds and remoteStatus took 12.385 seconds.

Direct checks on the VPS:

CheckDurationResult
Git status before/after service restart55 ms / 45 msSuccess
git fetch --dry-run origin6.288 sSuccess
Equivalent of T3's background fetch4.187 sSuccess
SSH child within that fetch4.157 sSuccess
gh pr list --limit 1 --json number2.478 sSuccess

The equivalent fetch used git --git-dir <git-common-dir> fetch --quiet --no-tags --no-auto-gc origin, with GCM_INTERACTIVE=never, GIT_ASKPASS=, GIT_TERMINAL_PROMPT=0, SSH_ASKPASS= and SSH_ASKPASS_REQUIRE=never.

The backend repeatedly reports roughly 2–6-second event-loop stalls, including a 6.139-second stall after restart. Background status fetches also time out. server.getTraceDiagnostics exceeded 15 seconds, and Claude provider checks showed command-timeout warnings.

The installed desktop's bundled server source sets STATUS_UPSTREAM_REFRESH_TIMEOUT to 5 seconds and awaits remote status, then local status, inside withRemoteWriteLock. Fetches near that deadline could contribute, but the cause of the event-loop stalls and the time spent waiting for locks have not been established.

Related: #16237 reports the same VCS warning from slow/hung gh. In this case the direct gh lookup succeeded in 2.478 seconds, and broader backend stalls were observed. #20203 identifies a WAL-checkpoint stall on another build; no SQL/syscall profiling was performed here, so I cannot establish that this has the same cause.

Also related: #7076 describes overlapping refreshes multiplying work. In-flight concurrency and lock-wait durations were not measured in this case, so that mechanism is also unconfirmed.

Impact

Major degradation or frequent failure

Version or commit

0.1.0 desktop and remote. Desktop build commit 81493efb71e8; remote exact commit not verified.

Environment

macOS desktop; Linux VPS via T3 Connect; GitHub remote over SSH; Claude provider. Available memory and disk looked healthy, no swap activity was observed, and the service reported no CPU quota. VPS CPU contention has not been ruled out.

Logs or stack traces

Observed 2026-10-16; timestamps below are UTC.

[13:49:30.415] WARN (#36): event loop stalled for 6139 ms
[13:50:08.939] WARN (#6148): Background Git fetch failed
[13:51:24.454] WARN (#6745): Background Git fetch failed

Fetch failures were reported by GitVcsDriver.fetchRemoteForStatus with detail: Git command timed out.

Relevant evidence files on the VPS:
~/.t3/userdata/logs/boot-service.log
~/.t3/userdata/logs/event-loop-stalls.ndjson
~/.t3/userdata/logs/server.trace.ndjson*

Raw logs are not attached; this report includes only the relevant timings and redacted excerpts.

Screenshots, recordings, or supporting files

No response

Workaround

No verified workaround. Restarted t3code.service; the service became active and the desktop reconnected, but slow-refresh warnings, event-loop stalls and background-fetch timeouts recurred. No application code, repository configuration, database settings or authentication settings were changed.

  1. superdoer(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Note

    Grok responding on behalf of Julius.

    Thanks for the detailed timings. Most of this is already tracked:

    • #16237: vcs.refreshStatus waits on the GitHub PR lookup, so a slow gh keeps the "Some requests are slow" toasts coming.
    • #7076: overlapping VCS status refreshes multiply the Git and network work.

    Your remoteStatus (12.4s) matches those. The part that looks new is localStatus taking 14.6s when a direct git status takes about 50 ms, together with the event-loop stalls. That points at contention inside the server, not at Git itself. Could you attach the relevant event-loop-stalls.ndjson entries and the localStatus child spans from server.trace.ndjson, plus the server version? That will tell us whether this is the same overlap from #7076 or something separate.

  3. juliusmarminge added labelsneeds more info

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge removed labelsneeds-triage

  6. juliusmarminge removed labelsbug

  7. juliusmarminge removed labelsneeds more info

  8. We can cancel this issue. I figured out the root cause. I was using Contabo shared vCPU and the provider was stealing CPU. Moved to a different VPS with dedicated vCPU and now everything is working fine.

    On Thu, Oct 22, 2026 at 4:07 AM Julius Marminge @.***> wrote:

    juliusmarminge left a comment (pingdotgg/t3code#20254) <https://github.com/pingdotgg/t3code/issues/20254#issuecomment-6328097628>

    Tested current main 70e5e384da <https://git.cafe/pingdotgg/t3code/commit/70e5e384da> on Linux with vp run dev, isolated state seeded with stopped threads, and the real web client. Opened an existing repository thread and dispatched a window-focus event to trigger VCS refresh. Trace results:

    ws.rpc.vcs.refreshStatus 5362.99 ms Success completed localStatus 491.72–1103.04 ms remoteStatus up to 8992.72 ms no event-loop-stalls.ndjson produced during this attempt

    The 32-second refresh plus recurring event-loop stalls was not reproduced. This used a GitCafe HTTPS repository and a web client; macOS desktop → T3 Connect → GitHub SSH, the original VPS load, and its database were not available here. No duplicate is established: #7076 <https://git.cafe/pingdotgg/t3code/issues/7076> covers overlapping refreshes, while this report also describes unexplained local-status/event-loop delays.

    Please provide the remote server’s exact version/commit and redacted event-loop-stalls.ndjson entries plus the localStatus child spans from server.trace.ndjson for the same slow refresh. Does it still occur on the latest nightly, and with only one connected client? These are needed to distinguish lock/refresh overlap from a backend stall. Leaving this open with needs more info.

    — Reply to this email directly, view it on GitHub <https://github.com/pingdotgg/t3code/issues/20254?email_source=notifications&email_token=ABEVND75JI7BKHFVCTI2YET5VE3EHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZSHAYDSNZWGI4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-6328097628>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABEVND4FMQQPDJDFL7ZG3W35VE3EHAVCNFSNUABGKJSXA33TNF2G64TZHMYTCNJTGEZTAMZUHE5US43TOVSTWNJYHA2TOMBYGI4DHILWAI> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/ABEVND5BCO2M5TULJBHOOFL5VE3EHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZSHAYDSNZWGI4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG> and Android <https://github.com/notifications/mobile/android/ABEVNDYM65HS77YISO3IWUT5VE3EHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMZSHAYDSNZWGI4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>. Download it today! You are receiving this because you authored the thread.Message ID: @.***>

  9. Closing at your request: the recurring stalls were caused by CPU steal on the shared-vCPU VPS, and moving to a VPS with dedicated vCPUs resolved the problem.

  10. juliusmarminge closed this

Sign in to join this conversation.