Skip to content

Clean up socket file after stopping running AppHost instance (#17587)#18296

Merged
mitchdenny merged 6 commits into
mainfrom
fix/17587-socket-cleanup-after-stop
Jun 23, 2026
Merged

Clean up socket file after stopping running AppHost instance (#17587)#18296
mitchdenny merged 6 commits into
mainfrom
fix/17587-socket-cleanup-after-stop

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Fixes #17587aspire add fails after aspire run --detach followed by aspire stop.

Root cause

After aspire stop successfully stopped an AppHost instance, the backchannel socket file was left on disk. Subsequent commands (aspire add, aspire describe, etc.) discovered the stale socket and attempted to connect to the now-dead process, producing connection timeouts.

Fix

RunningInstanceManager.StopRunningInstanceAsync now explicitly deletes the socket file after the instance has been stopped and confirmed terminated. The delete is best-effort and swallows IOException/UnauthorizedAccessException (a concurrent prune or permission quirk should not fail the stop).

User impact

Users can run aspire run --detach, aspire stop, and immediately run aspire add (or any backchannel command) without stale-socket connection errors.

Split out of #18261 so each fix can be reviewed in isolation.

Fixes #17587

Fixes issue where aspire stop leaves socket files behind, causing
subsequent aspire add/describe commands to fail with connection timeouts.

Resolves #17587: aspire add fails after aspire run --detach and aspire stop

The socket file was not being deleted after successfully stopping an AppHost
instance. Subsequent commands would attempt to connect to the stale socket
path, resulting in timeout errors. Now we explicitly delete the socket file
after the instance has been stopped and monitored for process termination.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny mitchdenny requested a review from JamesNK as a code owner June 17, 2026 22:59
Copilot AI review requested due to automatic review settings June 17, 2026 22:59
@mitchdenny mitchdenny requested a review from davidfowl as a code owner June 17, 2026 22:59
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18296

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18296"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #17587 where aspire add fails after running aspire run --detach followed by aspire stop. The root cause was that the backchannel socket file was left on disk after stopping an AppHost instance, causing subsequent CLI commands to discover the stale socket and attempt to connect to the now-dead process.

Changes:

  • Added best-effort socket file cleanup in RunningInstanceManager.StopRunningInstanceAsync after an instance has been confirmed stopped, preventing stale socket connection errors on subsequent commands.
Show a summary per file
File Description
src/Aspire.Cli/Projects/RunningInstanceManager.cs Adds socket file deletion after successful instance stop, with appropriate exception handling for IOException/UnauthorizedAccessException consistent with existing orphan cleanup patterns in AppHostHelper.cs.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@JamesNK

JamesNK commented Jun 18, 2026

Copy link
Copy Markdown
Member

I think an E2E test is needed here.

How are sockets usually cleaned up? Does aspire run (non-detached) remove them? Is there code that could be reused, or even better they both use the same code path to clean up.

What happens if the file can't be deleted?

@mitchdenny

Copy link
Copy Markdown
Member Author

PR Testing Report — #18296

PR Information

Artifact Version Verification

  • Expected (PR head short SHA): g8fc5a720
  • Installed dogfood CLI: 13.5.0-pr.18296.g8fc5a720
  • Status: ✅ Verified (matches PR head)

Changes Analyzed

  • src/Aspire.Cli/Projects/RunningInstanceManager.cs — after a successful stop, the backchannel socket file is now explicitly deleted (best-effort; swallows IOException/UnauthorizedAccessException).
  • Category: CLI change (socket lifecycle). No template/dashboard/hosting changes.

Test Scenarios Executed

Scenario 1 — Socket file removed after aspire stop (happy path)

Objective: Confirm the socket created by a detached AppHost is deleted on stop (the #17587 fix).
Coverage: Happy path. Status: ✅ Passed

Steps:

  1. Created an empty single-file AppHost from the PR hive (aspire new aspire-empty --language csharp --source <pr-hive> --version 13.5.0-pr.18296.g8fc5a720).
  2. aspire run --detach --apphost apphost.cs → started detached (AppHost PID 50703).
  3. Observed the backchannel socket ~/.aspire/cli/bch/yXZmerQhAiopkW5s2Yy.50703 was created, and aspire describe --apphost connected to it ("No resources found" — expected for an empty app).
  4. aspire stop --apphost apphost.cs → "stopped successfully".
  5. Re-checked the socket path.

Result:

  • Before stop: srwxr-xr-x ... yXZmerQhAiopkW5s2Yy.50703 present.
  • After stop: No such file or directorysocket deleted ✅.

Scenario 2 — No stale-socket hang on the next command (regression guard)

Objective: Confirm the original #17587 symptom (subsequent commands failing/timing out on the dead socket) is gone.
Coverage: Happy path / regression. Status: ✅ Passed

  • aspire describe --apphost apphost.cs immediately after stop returned a clean "No AppHost is currently running" in 0.067s (no connect-timeout against a leftover socket).

Scenario 3 — Stop when nothing is running (unhappy path)

Objective: Ensure a stop against an AppHost that isn't running fails safely.
Coverage: Unhappy path. Status: ✅ Passed

  • aspire stop --apphost apphost.cs (nothing running) printed "No AppHost is currently running ... Use 'aspire run' to start it first." and exited cleanly (no crash).

Summary

Scenario Status
Socket deleted after stop ✅ Passed
No stale-socket hang on next command ✅ Passed
Stop with nothing running ✅ Passed

Overall Result

✅ PR VERIFIED — the socket file is removed on stop, and follow-up commands no longer encounter a stale socket. Behavior matches the fix described for #17587.

Tested with the dogfood CLI built from the PR head. Empty single-file AppHost used so the scenario exercises socket lifecycle without external container dependencies.

Adds a deterministic, cross-platform unit test for the #17587 fix in
RunningInstanceManager.StopRunningInstanceAsync. The test stands up a real
Unix-domain-socket auxiliary backchannel server whose AppHost process has
already exited, drives a successful stop, and asserts the socket file is
deleted afterward. Without the fix the file lingers and the test fails.

An E2E test cannot guard this on Linux: the AppHost self-deletes its socket
on graceful shutdown and the CLI prunes dead-PID sockets, so both paths
self-heal. The regression only surfaces on Windows via PID reuse, hence the
unit-level guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny

Copy link
Copy Markdown
Member Author

Re: E2E test proposal for the socket-cleanup fix

I tried the E2E route first and it turns out an E2E test cannot guard this fix on Linux, so I added a deterministic cross-platform unit test instead (pushed as 33ff942).

Why an E2E test gives false confidence here

I wrote an E2E test (StopRemovesBackchannelSocketFile) that does aspire newaspire start → capture the compact socket in ~/.aspire/cli/bch/aspire stop → assert the socket is gone. It passed in Docker. But when I removed the fix from RunningInstanceManager and reran, it still passed — so it does not actually catch the regression.

Root cause: on Linux two independent paths self-heal the socket regardless of the fix:

  1. The AppHost deletes its own socket in a finally on graceful shutdown — AuxiliaryBackchannelService / BackchannelService.
  2. The CLI's AppHostHelper.PruneOrphanedSockets deletes PID-encoded sockets whose process is already dead.

The #17587 regression only actually bites on Windows, where the dead AppHost's PID gets reused, so the orphan-pruning heuristic thinks the process is still alive, the stale socket is treated as live, and the next aspire add/aspire stop fails with "Unable to stop one or more running Aspire AppHost instances." The Linux-only E2E harness can never reproduce that.

The unit test (the real guard)

RunningInstanceManagerTests.StopRunningInstanceAsync_DeletesSocketFile_WhenStopSucceeds:

  • Stands up a real Unix-domain-socket auxiliary-backchannel server hosting JsonRpc, whose reported AppHost process has already exited (so termination is observed immediately and the stop reaches the cleanup branch).
  • Calls manager.StopRunningInstanceAsync(socketPath, ...) and asserts stopped == true, the stop RPC fired, and File.Exists(socketPath) == false.

Verified both directions:

Result
With the fix ✅ passes (591 ms)
Fix removed ❌ fails — Assert.False(File.Exists(socketPath)) (socket lingers)

I removed the E2E test (kept only as a local experiment) to avoid false confidence; the unit test is committed to this branch.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@JamesNK JamesNK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are sockets usually cleaned up? Does aspire run (non-detached) remove them? Is there code that could be reused, or even better they both use the same code path to clean up.

What happens if the file can't be deleted?

Pending questions.

I want to understand if this is fixing the underlying problem or is a bandaid on top.

Move the leaked-socket cleanup to the aspire stop command itself (the
command that leaks the socket), deleting by exact path once the AppHost
process has been confirmed stopped. Consolidate the best-effort delete
into AppHostHelper.TryDeleteSocketFile so the stop command and
RunningInstanceManager share one code path. The existing orphan-pruning
logic remains as the backstop for hard crashes where aspire stop never
runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 23, 2026 00:50
@mitchdenny

Copy link
Copy Markdown
Member Author

@JamesNK Good push on "root cause vs bandaid" — you were right that the original change was treating the symptom. I dug into the cleanup paths and reworked it. Pushed in 90bf7bc.

How sockets are cleaned up today

There are three existing mechanisms, none of which were in the original PR's location:

  1. AppHost self-cleanup (the canonical owner). AuxiliaryBackchannelService.ExecuteAsync deletes its own socket in a finally on shutdown. The AppHost owns the file, so this is the "right" place — when it runs.
  2. AppHost startup pruning. On start it calls BackchannelConstants.CleanupOrphanedSockets and deletes any pre-existing socket before binding.
  3. CLI orphan pruning. AppHostHelper.PruneOrphanedSockets deletes PID-encoded sockets whose owning PID is dead, gated on Process.GetProcessById(pid).

Does non-detached aspire run remove them? No — the CLI doesn't; it relies entirely on mechanism #1 (the AppHost deleting its own socket on graceful shutdown).

Why it actually leaks (the real root cause)

The socket filename encodes the AppHost PID, and the CLI orphan-pruner decides "is this stale?" via PID liveness. On Windows the dead AppHost's PID gets reused, so ProcessExists returns true, the pruner treats the stale socket as live, and the next aspire add/aspire stop fails. Mechanism #1 should cover graceful stops, but if the AppHost crashes hard its finally never runs.

The kicker I found: aspire stop itself never deleted the socket. It goes StopCommandProcessShutdownService.StopAppHostAsync and stops there. The original PR added cleanup to RunningInstanceManager.StopRunningInstanceAsync, which aspire stop doesn't call — so the leak point (stop) kept leaking and a later aspire add cleaned up the mess. That's the bandaid you were sensing.

What changed

  • Primary fix: aspire stop now cleans up its own socket. ProcessShutdownService only reports success once it has confirmed the AppHost process terminated, so at that point the socket's owner is provably dead and we delete it by exact path — no PID heuristic, so the Windows PID-reuse blind spot doesn't apply.
  • Shared code path (your "could they reuse / both use the same path" point): extracted AppHostHelper.TryDeleteSocketFile(path, logger) and routed both aspire stop and RunningInstanceManager through it, instead of two copies of the try/catch.
  • Defense in depth retained. The existing orphan-pruners (Merging changes from internal repository #2/Fix styles #3) stay as the backstop for the hard-crash case where aspire stop (or the AppHost) dies before deleting. We deliberately did not rewrite the PID-liveness detection — that's the deeper Windows fragility but a much broader/riskier change; deleting deterministically at stop time sidesteps it for the normal flow, and the pruners remain the safety net for crashes.

What happens if the file can't be deleted?

TryDeleteSocketFile swallows IOException/UnauthorizedAccessException and logs at Debug — no crash. The consequence of a failed delete is just that we fall back to the existing orphan-pruning behavior (i.e. the pre-existing state), so we never regress relative to today.

Tests

  • Kept the deterministic RunningInstanceManagerTests guard.
  • Added StopCommandTests.StopCommand_DeletesSocketFile_AfterSuccessfulStop, which runs the real stop command against a confirmed-stopped AppHost and asserts the socket file is gone — this is the guard for the actual leak point. Both pass; full StopCommandTests (13) green.

On the E2E question from earlier: I left the deterministic unit/command tests as the guard rather than E2E, because on Linux two paths self-heal the socket regardless of the fix (so an E2E passes even with the fix removed) — the regression only truly bites on Windows via PID reuse, which the Linux E2E harness can't reproduce.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Comment thread tests/Aspire.Cli.Tests/Projects/RunningInstanceManagerTests.cs Outdated
…cket-cleanup-after-stop-2

# Conflicts:
#	src/Aspire.Cli/Projects/RunningInstanceManager.cs
@github-actions

This comment has been minimized.

Comment thread src/Aspire.Cli/Utils/AppHostHelper.cs Outdated
Consolidate the remaining CLI-side socket delete (PruneOrphanedSockets)
onto AppHostHelper.TryDeleteSocketFile so all CLI socket cleanup flows
through one path. The helper now returns a bool so the pruner keeps an
accurate deleted count, and the previously silent catch in the pruner now
logs at Debug like the other cleanup sites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 23, 2026 03:59
@github-actions

This comment has been minimized.

Replace the real-process-then-reuse-its-exited-PID approach with a
guaranteed-nonexistent PID (int.MaxValue - 9), matching the sibling
StopCommandTests. Reusing a real exited process's PID is flaky: the OS
can recycle that PID for an unrelated live process before the monitor
checks, causing it to loop the full timeout and fail the cleanup
assertion. This also removes the StartAndWaitForProcessToExit helper and
the System.Diagnostics dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

47 / 97 test projects · 6 jobs, from 23 changed files.

Selected test projects (47 / 97)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Aspire.EndToEnd.Tests, Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.GitHub.Models.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests, Aspire.Playground.Tests

Selected jobs (6)

cli-starter, deployment-e2e, extension-e2e, extension-unit, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 33 of the 47 selected test projects come from a single change — tests/Aspire.Hosting.Tests/Backchannel/AuxiliaryBackchannelRpcTargetTests.cs.

🧪 tests/Aspire.Hosting.Tests/Backchannel/AuxiliaryBackchannelRpcTargetTests.cs (changed test)
1 directly: Aspire.Hosting.Tests
32 via the project graph

show 32

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.GitHub.Models.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests

🔧 src/Aspire.Hosting/ApplicationModel/TerminalResourceSnapshotProperties.cs (changed source)
11 via the project graph: Aspire.Hosting.Analyzers.Tests (2 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Testing.Tests (2 hops), Aspire.Playground.Tests

📦 affected project Aspire.Cli
1 test: Aspire.Cli.EndToEnd.Tests

📦 affected project Aspire.Hosting
1 test: Aspire.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Commands/StopCommandTests.cs (changed test)
1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Projects/RunningInstanceManagerTests.cs (changed test)
1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
cli-starter • affected project Aspire.Cli
• selected test Aspire.Cli.Tests
deployment-e2e affected project Aspire.Cli
extension-e2e extension/loc/xlf/aspire-vscode.xlf, extension/package.json, extension/package.nls.json, extension/scripts/run-e2e.js, extension/src/extension.ts, extension/src/test-e2e/packageSurface.e2e.test.ts, extension/src/test-e2e/treeActions.e2e.test.ts, extension/src/test/appHostTreeView.test.ts, extension/src/test/aspireTerminalProvider.test.ts, extension/src/test/packageManifest.test.ts, extension/src/testing/e2eStateFileBridge.ts, extension/src/types/extensionApi.ts, extension/src/utils/AspireTerminalProvider.ts, extension/src/views/AspireAppHostTreeProvider.ts, src/Aspire.Cli/Commands/StopCommand.cs, src/Aspire.Cli/Projects/RunningInstanceManager.cs, src/Aspire.Cli/Utils/AppHostHelper.cs, src/Aspire.Hosting/ApplicationModel/TerminalResourceSnapshotProperties.cs, src/Aspire.Hosting/Backchannel/AuxiliaryBackchannelRpcTarget.cs, src/Aspire.Hosting/Dashboard/DashboardServiceData.cs, tests/Aspire.Cli.Tests/Commands/StopCommandTests.cs, tests/Aspire.Cli.Tests/Projects/RunningInstanceManagerTests.cs
• affected project Aspire.Cli
extension-unit extension/loc/xlf/aspire-vscode.xlf, extension/package.json, extension/package.nls.json, extension/scripts/run-e2e.js, extension/src/extension.ts, extension/src/test-e2e/packageSurface.e2e.test.ts, extension/src/test-e2e/treeActions.e2e.test.ts, extension/src/test/appHostTreeView.test.ts, extension/src/test/aspireTerminalProvider.test.ts, extension/src/test/packageManifest.test.ts, extension/src/testing/e2eStateFileBridge.ts, extension/src/types/extensionApi.ts, extension/src/utils/AspireTerminalProvider.ts, extension/src/views/AspireAppHostTreeProvider.ts
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit d9ca84a.

@mitchdenny mitchdenny merged commit 6ab6e65 into main Jun 23, 2026
324 checks passed
@mitchdenny mitchdenny deleted the fix/17587-socket-cleanup-after-stop branch June 23, 2026 05:14
@github-actions github-actions Bot added this to the 13.5 milestone Jun 23, 2026
aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request Jun 23, 2026
After aspire stop confirms the AppHost process has terminated, it now
removes the backchannel socket file. This prevents stale-socket errors
when running subsequent commands (aspire add, aspire describe, etc.)
after the stop/detach workflow.

Documents the fix from microsoft/aspire#18296 (fixes #17587).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1283

Generated by PR Documentation Check · 2.1K AIC · ⌖ 69.5 AIC · ⊞ 47.5K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1283 targeting release/13.5.

Updated src/frontend/src/content/docs/reference/cli/commands/aspire-stop.mdx to add a Stopping a detached AppHost subsection documenting that aspire stop now cleans up the backchannel socket file after confirming the AppHost process has terminated. This documents the fix from #18296 (fixes #17587) and explains why subsequent commands like aspire add work correctly after the aspire run --detachaspire stop workflow.

Triggered signals: cli_command_file_changed (StopCommand.cs modified) and pr_body_has_cli_flag_mention (PR body mentions --detach and aspire stop).

Note

This draft PR needs human review before merging.

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.

[AspireE2E]aspire add failed to add the integration package after stopping the detach process

4 participants