Skip to content

Agents window repeatedly freezes in tool-input path extraction (RegExpStringIterator.next) and renderer crashes on Linux #350187

In progress

Description

Does this issue occur when all extensions are disabled?: Not tested.
Latest Insiders / clean profile: Not tested.

Environment

  • VS Code: 1.147.0 stable
  • Commit: 8a14f0c
  • Build date: 2026-11-17T02:46:11Z
  • OS: Linux Mint 21.3, x86_64; kernel 6.8.0-149-generic
  • Affected surface: native Agents window, local Codex agent-host session (agent-host-codex:), not the OpenAI extension sidebar.

Problem and observed reproduction pattern

The Agents window repeatedly becomes unresponsive and crashes. Reopening it restores the same Codex session and the crash recurs.

  1. Use a local Codex session in the Agents window with tool calls in its history.
  2. Open / restore that session.
  3. The window becomes unresponsive, and later its renderer crashes.
  4. Reopen the same session; repeated crashes were observed within roughly 1–5 minutes during the final sequence.

This describes the observed session, not a minimal reproduction. The exact triggering tool input has not been isolated, and the conversation is private.

Expected: restoring/rendering tool-call history should keep the window responsive and should not crash its renderer.

Repeated UI-thread stall stack

Starting at 16:39 local time on 2026-11-24, main.log repeatedly records CodeWindow: detected unresponsive. Multiple sampling periods show the same stack (including periods with all 14 samples here):

at RegExpStringIterator.next ()
at mGs (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/sessions/sessions.desktop.main.js:1100:7799)
at gGs (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/sessions/sessions.desktop.main.js:1100:7913)
at v (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/sessions/sessions.desktop.main.js:1100:11655)
at b (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/sessions/sessions.desktop.main.js:1100:11942)
at vscode-file://vscode-app/usr/share/code/resources/app/out/vs/sessions/sessions.desktop.main.js:1100:11397

Inspection of the installed bundle at these offsets shows that mGs extracts paths from toolInput using t.matchAll(pGs), and gGs iterates tool-call response parts. The path pattern in this build is:

pGs=/[\w.@$():[]+-]*(?:[/\]+[\w.@$():[]+-]+)+/g;

The caller then resolves these references against the customization index. Another sampled stack is in Q$o._resolvePathUncached → Q$o.resolve → vGs.

This identifies a repeated stall in built-in tool-input path/customization processing. It does not establish that regex backtracking caused the later native crashes.

Seven renderer crashes confirmed by logs and core records

main.log, 2026-11-24, local time UTC+03:00:

18:35:58.858 CodeWindow: renderer process gone (reason: crashed, code: 133)
18:46:34.224 CodeWindow: renderer process gone (reason: crashed, code: 132)
18:47:35.126 CodeWindow: renderer process gone (reason: crashed, code: 132)
18:48:38.780 CodeWindow: renderer process gone (reason: crashed, code: 132)
18:51:55.424 CodeWindow: renderer process gone (reason: crashed, code: 132)
18:53:08.126 CodeWindow: renderer process gone (reason: crashed, code: 132)
18:54:53.973 CodeWindow: renderer process gone (reason: crashed, code: 132)

coredumpctl list independently shows one SIGTRAP and six SIGILL records for these occurrences. The last core's command line confirms /usr/share/code/code --type=renderer. System cores are truncated. Seven corresponding Crashpad minidumps are retained locally.

Extension-host processes exit with code 0 after the renderer crashes; the logs do not establish an extension-host-first crash.

Diagnostic limits and other observations

  • No symbolicated native stack or controlled input-level reproduction yet.
  • At a later inspection, approximately 7 GiB RAM was available, while swap was nearly full (7.3/7.4 GiB). This is not a measurement at the instant of each crash and does not rule out renderer heap exhaustion.
  • Kernel journal visibility was restricted, so absence of a kernel OOM event has not been established.
  • MCP connection/authentication errors also occur, but no causal link to these renderer crashes has been established.
  • Installed 1C extensions: yellow-hammer.1c-platform-tools 0.9.25 and yellow-hammer.mcp-1c-platform-tools 0.5.2. No activation entries for either were found in the inspected Agents-window extension-host logs. The sampled stall is in the built-in sessions bundle.
  • Full conversations, raw logs and memory dumps have not been uploaded because they may contain private data. The excerpts above omit usernames, workspace paths and session identifiers.

Possibly related: #307431 (another renderer-thread path regex stall, but in a different function), #332501 (session-load performance), #325852 (Agents renderer crashes through another reported mechanism). I cannot confirm this is a duplicate of any of them.

Activity

  1. alexdima commented on Nov 25, 2026

    @alexdima
    Member

    Thanks for the detailed stacks, they point straight at the cause.

    Both sampled stacks are in agentHostSessionCustomizations.ts, which looks for customization files (agents, skills, instructions, prompts) that the session's tool calls refer to:

    • parseToolCall (mGs in the bundle) runs pathTokenPattern (pGs) over the input of every tool call to find path-like tokens.
    • Each token is then resolved against the customization index (CustomizationIndex._resolvePathUncached).

    The pattern's leading [\w.~@$():[\]+-]* can start at every offset of a long run of path characters, and from each offset it scans to the end of the run before it fails. So a single long run that isn't followed by a separator (a long minified line, a hash or base64 blob in a patch, a long run of escaped backslashes) costs time quadratic in its length. I ran the pattern from 1.147.0 on one tool input in the current Insiders runtime (Electron 43, V8 15):

    One tool input Current pattern With a lookbehind
    cat a/b + 40,000 path characters 2.5 s 0.5 ms
    80,000 escaped backslashes 9.4 s 0.6 ms

    Completed turns are parsed in idle slices, but a single turn is never split, and opening or restoring a session parses its whole history again. That fits a window that freezes each time the session is restored.

    A negative lookbehind, so that a match can only start where a run of path characters starts, gives the same matches in linear time. I compared it with the current pattern on 300,000 random strings and every match was the same.

    The other stack you sampled, _resolvePathUncached, is where #345353 runs out of memory: for a very long path token it walks every parent folder and keeps each one alive in a cache. Bounding that walk to the depth of the deepest customization folder avoids it.

    About the crashes: exit codes 132 (SIGILL) and 133 (SIGTRAP) are how a Chromium renderer on x86-64 Linux ends on any fatal V8 error, out-of-memory included. They fit #345353 but don't prove it. If it still happens once both are fixed, it would help to know:

    • whether starting VS Code with code --verbose prints a V8 javascript OOM line in the terminal when the renderer dies, and
    • whether the Crashpad minidumps carry a v8-oom-location crash key.

    350187-path-token-scan-timing.png

    🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).

  2. added
    bug
    freeze-slow-crash-leak
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agents-windowbugfreeze-slow-crash-leakperf

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions