Skip to content

Command Code browser login leaks attempts in #attempts on failed start (post-merge P3 from #5395) #5404

Description

@Astro-Han

Follow-up to #5395 (merged as c34bbd6).

Finding (P3, main regression): apps/desktop/src/main/commandcode-browser-login.ts:261 inserts the login attempt into the long-lived #attempts map before binding, but the port_unavailable, browser_unavailable, and bind-time superseded failure paths never return an attemptId. Those paths only call #finish(), which does not delete map entries; the only deletion point is complete(), unreachable from these paths.

Reproduction: a same-shape probe occupying the port shows the merged head retains 1000/1000 attempt sentinels after dispose() and forced GC, vs 0/1000 on the pre-merge head b317e597. Repeated failed starts therefore grow main-process memory.

Notes:


Automated review notice: This issue was filed by an AI review orchestrator operated by Astro-Han. It does not replace independent human review; merge/close decisions remain with humans.

Activity

  1. Totoro-qaq commented on Sep 17, 2026

    @Totoro-qaq
    Contributor

    take

  2. Totoro-qaq commented on Sep 23, 2026

    @Totoro-qaq
    Contributor

    #5545 removed the browser login this issue describes, so it no longer applies on main. Could a maintainer close it?

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions