Skip to content

New Session pane is not rendered - TypeError: Cannot read properties of undefined (reading 'removeToolFromConfirmationCarousel') #337234

Closed

Description

  • don't use the product for a while
  • try to create a new session
  • a workaround exists to click on another session and then on the new session
Screen.Recording.2026-09-22.at.10.50.50.mov
 ERR TypeError: Cannot read properties of undefined (reading 'removeToolFromConfirmationCarousel')
    at CPi._fn (chatListRenderer.ts:1102:1)
    at CPi.dispose (lifecycle.ts:396:8)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at u1.dispose (autorunImpl.ts:74:16)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at CPi._fn (autorun.ts:224:15)
    at CPi.dispose (lifecycle.ts:396:8)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at CPi._fn (autorun.ts:224:15)
    at CPi.dispose (lifecycle.ts:396:8)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at ae.dispose (lifecycle.ts:614:16)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at QJ.dispose (lifecycle.ts:545:15)
    at QJ.dispose (chatListRenderer.ts:4203:1)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at tue.dispose (lifecycle.ts:545:15)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at TS.dispose (lifecycle.ts:545:15)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at GDe.dispose (lifecycle.ts:545:15)
    at GDe.dispose (chatView.ts:439:9)
    at ae.dispose (lifecycle.ts:614:16)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at Vhe.dispose (lifecycle.ts:545:15)
    at ft (lifecycle.ts:339:8)
    at s.clear (lifecycle.ts:458:4)
    at s.dispose (lifecycle.ts:439:8)
    at ft (lifecycle.ts:339:8)
    at dt.clearAndDisposeAll (lifecycle.ts:787:4)
    at Hee.setSession (chatGroupsView.ts:140:26)
    at Wee.openSession (sessionView.ts:202:21)
    at $he.updateVisibleSessions (sessionsPart.ts:243:1)
    at hPt.updateVisibleSessions (sessionsParts.ts:54:18)
    at u1._runFn (sessionsService.ts:516:1)
    at u1._run (autorunImpl.ts:110:11)
    at u1.endUpdate (autorunImpl.ts:167:12)
    at JH.finish (transaction.ts:102:13)
    at qt (transaction.ts:21:6)
    at gze.setActive (visibleSessions.ts:461:3)
    at Nyt._activate (sessionsService.ts:764:1)
    at Nyt._activateOrInsert (sessionsService.ts:1184:1)
    at Nyt._openNewSession (sessionsService.ts:1167:1)
    at Nyt.openNewSession (sessionsService.ts:1098:1)
    at $.run (sessionsViewActions.ts:512:1)
    at handler (actions.ts:741:42)
    at s.invokeFunction (instantiationService.ts:109:11)
    at Qbt._tryExecuteCommand (commandService.ts:99:46)
    at Qbt.executeCommand (commandService.ts:63:17)
    at fo.run (actions.ts:663:31)
    at lc.runAction (actions.ts:199:1)
    at lc.run (actions.ts:190:1)
    at _a.onClick (menuEntryActionViewItem.ts:219:1)
    at HTMLDivElement.<anonymous> (actionViewItems.ts:157:1)
Version: 1.139.0-insider
Commit: 289549a85cd652ce3513ac63044495a2ac620752
Date: 2026-09-18T09:52:25-07:00
Electron: 43.6.0
ElectronBuildId: 15274685
Chromium: 150.0.7871.250
Node.js: 24.20.0
V8: 15.0.245.31-electron.0
@github/copilot: 1.0.85
@github/copilot-sdk: 1.0.14
OS: Darwin arm64 25.6.0

Activity

  1. added
    bug
    on Sep 22, 2026
  2. sandy081 commented on Sep 22, 2026

    @sandy081
    Member

    Investigated this against current origin/main and reproduced the exact exception with a focused unit test.

    Root cause: the model-driven confirmation cleanup in ChatListItemRenderer.addModelToolConfirmation captures the IChatWidget, then later calls widget.inputPart.removeToolFromConfirmationCarousel(...). During an Agents Window session switch, ChatGroupsView.setSession disposes the outgoing ChatView/ChatWidget. ChatWidget registered its inputPartDisposable before its list widget, so disposal clears the input-part holder first. The list/renderer is disposed afterward, and its confirmation observer cleanup dereferences widget.inputPart; the getter's non-null assertion yields runtime undefined, producing the reported error and interrupting the new-session view replacement.

    The code-backed root-cause fix is to capture the ChatInputPart at the same time the carousel entry is added and use that same owner for removal, instead of resolving it again through the partially disposed widget. This preserves cleanup and fixes the ownership/lifecycle mismatch rather than merely null-guarding the symptom.

    Regression coverage simulates the real disposal ordering by clearing the widget's input-part reference before disposing ChatListItemRenderer. Before the fix it fails with the exact Cannot read properties of undefined (reading 'removeToolFromConfirmationCarousel') stack; after the fix it passes and verifies that the pending carousel entry is removed.

    Validation completed locally:

    • focused regression: 1 passing after reproducing 1 failing before the fix
    • full model-driven tool confirmations suite: 23 passing
    • ESLint on renderer and test: passed
    • npm run typecheck-client: passed
    • git diff --check: passed

    The relevant confirmation-observation code was introduced in #336317, so assigning to Justin Chen (@justschen) for ownership/follow-up.

  3. alexdima commented on Sep 23, 2026

    @alexdima
    MemberAuthor

    I'm still seeing this. Justin Chen (@justschen) can you please take a look too

  4. added a commit that references this issue on Sep 23, 2026
    0c43abd
  5. added
    unreleased
    on Sep 24, 2026
  6. added a commit that references this issue on Sep 24, 2026
    6e34610
  7. added
    insiders-released
    and removed
    unreleased
    on Sep 24, 2026
  8. added
    author-verification-requested
    on Sep 28, 2026
  9. pwang347 commented on Sep 28, 2026

    @pwang347
    Contributor

    Alexandru Dima (@alexdima) I could not reproduce the issue, feel free to confirm whether you're still seeing this. Thanks!

  10. vs-code-engineering commented on Sep 28, 2026

    @vs-code-engineering
    Contributor

    This bug has been fixed in the latest release of VS Code Insiders!

    Alexandru Dima (@alexdima), you can help us out by commenting /verified if things are now working as expected.

    If things still don't seem right, please ensure you're on version fee7930 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

    Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agents-windowauthor-verification-requestedbuginsiders-released

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions