Skip to content

[Error] [GitHub.copilot-chat] unhandlederror-Error in extension github.copilot-chat: FAILED to handle event: Invalid argument #341566

Description

@vs-code-engineering

Error Message

unhandlederror-Error in extension github.copilot-chat: FAILED to handle event: Invalid argument

Stack Trace

    at kO.toOffsetRange (../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:502:38)
    at translateRange (../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:674:15)
    at toDiagnosticData (../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:316:9)
    at YN._createTextDocumentDiagnosticData (../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:312:61)
    at listOnTimeout (node:internal/timers:685:17) [not deminified]
    at process.processTimers (node:internal/timers:618:7) [not deminified]

Raw Stack Trace (minified)
Error: Invalid argument <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> 	at kO.toOffsetRange (<REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:18443) 	at <REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:16894 	at Jit (<REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:20890) 	at YN._createDiagnosticData (<REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:16864) 	at <REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:16791 	at Array.map (<anonymous>) 	at YN._createTextDocumentDiagnosticData (<REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:16779) 	at <REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:15244 	at Array.forEach (<anonymous>) 	at <REDACTED: user-file-path> VS <REDACTED: user-file-path>/resources\app\extensions\copilot\dist\extension.js:3479:15135 <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> <REDACTED: URL> 	at listOnTimeout (node:<REDACTED: user-file-path>:685:17) 	at process.processTimers (node:<REDACTED: user-file-path>:618:7)

Details

Property Value
Bucket ID b37e9866-de52-8c8d-83ae-b33ceb248911
Extension Version 0.69.0
Last Seen Tue Oct 13 2026 23:53:45 GMT+0000 (Coordinated Universal Time)
Platforms win32
Product VSCode

This issue was automatically created from the VS Code Errors Dashboard

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    error-telemetryVS Code - Issues generated by telemetry
    ai-generatedGenerated by AI automation workflows
    *fixTrigger a agentic workflow to provide analysis and propose PR.
    on Oct 14, 2026
  2. vs-code-engineering commented on Oct 14, 2026

    @vs-code-engineering
    ContributorAuthor

    Regression Details

    • Product: VSCode (extension GitHub.copilot-chat)
    • Regression type: spike
    • Spike factor: 8x increase in affected users (baseline v0.68.0: 6 users → current v0.69.0: 48 users; 35,364 hits)
    • VS Code build sampled: 1.141.1
    • Platforms: win32
    • Dashboard: bucket b37e9866 on v0.69.0

    Deminified call path (clean source mapping)

    • kO.toOffsetRange → ../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:502:38
    • translateRange → ../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:674:15
    • toDiagnosticData → ../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:316:9
    • _createTextDocumentDiagnosticData → ../src/extension/inlineEdits/vscode-node/parts/vscodeWorkspace.ts:312:61

    The Invalid argument error originates in toOffsetRange while building inline-edit diagnostic data (toDiagnosticData → translateRange), suggesting an out-of-bounds or stale range is being translated into offset space for a text document that no longer matches the supplied range. The extremely high hit-to-user ratio (35K hits / 48 users) indicates a tight retry/loop firing repeatedly per affected session.

    Why this is a distinct regression

    This is a new error family not covered by the existing open trackers for 0.69.0 (#341309 resolveAutoModeEndpoint streams, #331652 Illegal value for line, #340060 allowRepositoryUrl). The closest existing issue, #326632, is a different FAILED to handle event variant (Cannot read properties of undefined (reading 'startOffset') in alternativeNotebookTextDocument.ts) with an unrelated call path, so it is tracked separately here.

    Generated by errors-regression-scan · copilot · opus48 · 276 AIC · ⌖ 28.4 AIC · ⊞ 8.9K · ◷

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

Metadata

Metadata

Labels

*fixTrigger a agentic workflow to provide analysis and propose PR.ai-generatedGenerated by AI automation workflowsbugIssue identified by VS Code Team member as probable bugerror-telemetryVS Code - Issues generated by telemetryextensionrecent-regression

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions