Skip to content

Root cause investigation for duplicated welcome and folder trust prompts (issue #1295)#1

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/debug-issue-1295
Draft

Root cause investigation for duplicated welcome and folder trust prompts (issue #1295)#1
Copilot wants to merge 4 commits intomainfrom
copilot/debug-issue-1295

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 4, 2026

Welcome and folder trust prompts appear twice on every launch in v0.0.402. This PR documents the root cause investigation and proposes implementation paths.

Root Cause

The new "session lifecycle events" plugin hook system introduced in v0.0.402 likely triggers initialization prompts in addition to the existing code path. Timing aligns perfectly: issue appeared in v0.0.402, same version that added lifecycle hooks. Pattern matches previous duplication bugs fixed in v0.0.375, v0.0.372, and v0.0.345.

Investigation Deliverables

  • ROOT_CAUSE_ANALYSIS_1295.md - Technical analysis linking v0.0.402 changes to duplication behavior, includes investigation paths for source code audit
  • REPRODUCTION_TEST_1295.md - Test cases confirming 100% reproduction rate across terminals
  • PROPOSED_FIX_1295.md - Three implementation approaches:
    • Phase 1: Guard flags (2-4h, low risk) for immediate mitigation
    • Phase 2: Remove duplicate initialization paths (1-2d, medium risk) for root cause fix
    • Phase 3: Consolidate initialization architecture (1-2w, high risk) for long-term prevention

Recommended Fix Pattern

class SessionManager {
  constructor() {
    this.welcomeShown = false;
    this.folderTrustPromptShown = false;
  }

  async showWelcomePrompt() {
    if (this.welcomeShown) return;
    this.welcomeShown = true;
    await this.ui.displayWelcome("Describe a task to get started");
  }
}

Phase 1 guard flags provide immediate relief while Phase 2 removes the duplicate call path discovered during v0.0.402 lifecycle hook integration.

Impact

  • Severity: Medium (UX issue, not blocking)
  • Frequency: 100% on macOS (Terminal.app, iTerm2)
  • User workaround: None, must dismiss duplicates
Original prompt

Can you find the root cause for @github/copilot-cligithub/issues/1295 ?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 4, 2026 21:14
Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate root cause of issue 1295 Root cause investigation for duplicated welcome and folder trust prompts (issue #1295) Feb 4, 2026
Copilot AI requested a review from Dor-bl February 4, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants