René's URL Explorer Experiment


Title: PrepareRename throws NullReferenceException when an LSP client omits the `rename` capability (v4.6.0) · Issue #2297 · PowerShell/PowerShellEditorServices · GitHub

Open Graph Title: PrepareRename throws NullReferenceException when an LSP client omits the `rename` capability (v4.6.0) · Issue #2297 · PowerShell/PowerShellEditorServices

X Title: PrepareRename throws NullReferenceException when an LSP client omits the `rename` capability (v4.6.0) · Issue #2297 · PowerShell/PowerShellEditorServices

Description: Summary In PSES v4.6.0, an LSP initialize whose capabilities.textDocument omits rename leaves the prepare-rename handler dereferencing a null client RenameCapability. Observed effect: the server never returns an initialize response (the ...

Open Graph Description: Summary In PSES v4.6.0, an LSP initialize whose capabilities.textDocument omits rename leaves the prepare-rename handler dereferencing a null client RenameCapability. Observed effect: the server ne...

X Description: Summary In PSES v4.6.0, an LSP initialize whose capabilities.textDocument omits rename leaves the prepare-rename handler dereferencing a null client RenameCapability. Observed effect: the server ne...

Opengraph URL: https://github.com/PowerShell/PowerShellEditorServices/issues/2297

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PrepareRename throws NullReferenceException when an LSP client omits the `rename` capability (v4.6.0)","articleBody":"## Summary\n\nIn PSES `v4.6.0`, an LSP `initialize` whose `capabilities.textDocument` **omits**\n`rename` leaves the prepare-rename handler dereferencing a null client\n`RenameCapability`. Observed effect: the server never returns an `initialize`\nresponse (the handshake hangs) and the PSES log records a `NullReferenceException`\non the rename-handler path.\n\nDeclaring even a **minimal** `rename` capability avoids it and the handshake\ncompletes normally. This inverts the usual expectation that omitting an optional\nclient capability is always safe, so it is easy to hit from a minimal or hand-rolled\nLSP client.\n\n## Environment\n\n- PSES: `v4.6.0` (GitHub release asset `PowerShellEditorServices.zip`)\n- Host: PowerShell 7.6.2 (`pwsh`) and Windows PowerShell 5.1 -- reproduced on both\n- OS: Windows 11\n- Transport: `Start-EditorServices.ps1 -Stdio`\n\n## Steps to reproduce\n\n1. Launch PSES over stdio (paths trimmed for readability):\n\n   ```\n   pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass -File \u003cPSES\u003e/Start-EditorServices.ps1 \\\n     -HostName repro -HostProfileId repro -HostVersion 1.0.0 -Stdio \\\n     -BundledModulesPath \u003cbundle\u003e -LogPath \u003clog\u003e -LogLevel Diagnostic \\\n     -SessionDetailsPath \u003csession.json\u003e\n   ```\n\n2. Send an LSP `initialize` whose `textDocument` capabilities cover the usual\n   entries but **omit** `rename`:\n\n   ```json\n   {\n     \"capabilities\": {\n       \"textDocument\": {\n         \"synchronization\": { \"didSave\": true },\n         \"publishDiagnostics\": { \"relatedInformation\": true },\n         \"hover\": {},\n         \"definition\": {}\n       }\n     }\n   }\n   ```\n\n3. Observe: no `initialize` **response** is returned (the handshake hangs), and the\n   PSES log shows a `NullReferenceException` in the rename-handler path.\n\n## The one-line delta that proves the cause\n\nRe-send `initialize` with a minimal `rename` capability declared and nothing else\nchanged:\n\n```json\n{\n  \"capabilities\": {\n    \"textDocument\": {\n      \"synchronization\": { \"didSave\": true },\n      \"publishDiagnostics\": { \"relatedInformation\": true },\n      \"hover\": {},\n      \"definition\": {},\n      \"rename\": { \"prepareSupport\": false }\n    }\n  }\n}\n```\n\nThe handshake now completes and diagnostics flow. The only difference is the\npresence of the `rename` capability object.\n\n## Expected\n\nOmitting the optional `rename` capability must not break `initialize`. The\nprepare-rename handler should null-guard the client `RenameCapability` (treat absent\nas \"client does not support rename\") rather than dereferencing it.\n\n## Context\n\nFound while building a Claude Code plugin that drives PSES over stdio\n(https://github.com/manderse21/claude-powershell-lsp). The plugin now declares a\nminimal `rename` capability specifically to dodge this, but the root cause should be\nfixed for any client that legitimately omits it.\n","author":{"url":"https://github.com/manderse21","@type":"Person","name":"manderse21"},"datePublished":"2026-06-06T19:53:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2297/PowerShellEditorServices/issues/2297"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1acf27ba-59bf-48bb-5bf1-557d092989d1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE80:C60D:61804:8CBDD:6A571C26
html-safe-nonceb832bdab488726b7fd3ddf46853d0c1315298349577f2def53f6d7d1d9545eef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTgwOkM2MEQ6NjE4MDQ6OENCREQ6NkE1NzFDMjYiLCJ2aXNpdG9yX2lkIjoiMTE0MTM2MDM4OTYwOTk1MzY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd0e23caf976c2151c1ca0f72e4b35480ceee0dc16702c70ed2c171b739250067
hovercard-subject-tagissue:4604922201
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShellEditorServices/2297/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4c5c39d49acb8bdf66a5df24d470db25003c1d6e68a101b0eac31b5f9d425b48/PowerShell/PowerShellEditorServices/issues/2297
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4c5c39d49acb8bdf66a5df24d470db25003c1d6e68a101b0eac31b5f9d425b48/PowerShell/PowerShellEditorServices/issues/2297
og:image:altSummary In PSES v4.6.0, an LSP initialize whose capabilities.textDocument omits rename leaves the prepare-rename handler dereferencing a null client RenameCapability. Observed effect: the server ne...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemanderse21
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShellEditorServices git https://github.com/PowerShell/PowerShellEditorServices.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id36031537
octolytics-dimension-repository_nwoPowerShell/PowerShellEditorServices
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36031537
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShellEditorServices
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2576d1f0198cf1588faf2edf27f1ed120903be10
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShellEditorServices/issues/2297#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShellEditorServices%2Fissues%2F2297
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShellEditorServices%2Fissues%2F2297
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShellEditorServices
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2297
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2297
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2297
Please reload this pagehttps://github.com/PowerShell/PowerShellEditorServices/issues/2297
PowerShell https://github.com/PowerShell
PowerShellEditorServiceshttps://github.com/PowerShell/PowerShellEditorServices
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Fork 260 https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Star 759 https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Code https://github.com/PowerShell/PowerShellEditorServices
Issues 127 https://github.com/PowerShell/PowerShellEditorServices/issues
Pull requests 14 https://github.com/PowerShell/PowerShellEditorServices/pulls
Actions https://github.com/PowerShell/PowerShellEditorServices/actions
Security and quality 0 https://github.com/PowerShell/PowerShellEditorServices/security
Insights https://github.com/PowerShell/PowerShellEditorServices/pulse
Code https://github.com/PowerShell/PowerShellEditorServices
Issues https://github.com/PowerShell/PowerShellEditorServices/issues
Pull requests https://github.com/PowerShell/PowerShellEditorServices/pulls
Actions https://github.com/PowerShell/PowerShellEditorServices/actions
Security and quality https://github.com/PowerShell/PowerShellEditorServices/security
Insights https://github.com/PowerShell/PowerShellEditorServices/pulse
#2296https://github.com/PowerShell/PowerShellEditorServices/pull/2296
PrepareRename throws NullReferenceException when an LSP client omits the rename capability (v4.6.0)https://github.com/PowerShell/PowerShellEditorServices/issues/2297#top
#2296https://github.com/PowerShell/PowerShellEditorServices/pull/2296
https://github.com/JustinGrote
https://github.com/manderse21
manderse21https://github.com/manderse21
on Jun 6, 2026https://github.com/PowerShell/PowerShellEditorServices/issues/2297#issue-4604922201
https://github.com/manderse21/claude-powershell-lsphttps://github.com/manderse21/claude-powershell-lsp
JustinGrotehttps://github.com/JustinGrote
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.