Allow astro preview --ignore-lock from AI agent environments - #17941
Open
matthewp wants to merge 1 commit into
Open
Allow astro preview --ignore-lock from AI agent environments#17941matthewp wants to merge 1 commit into
astro preview --ignore-lock from AI agent environments#17941matthewp wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 869b3e9 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merging this PR will improve performance by 17.44%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | many-components (markHTMLString, isHTMLString, validateProps) |
11.3 ms | 9.6 ms | +17.44% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/17903-preview-ignore-lock-agent-gate (869b3e9) with main (42e9188)1
Footnotes
matthewp
marked this pull request as ready for review
September 8, 2026 18:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
astro preview --ignore-lockandastro dev --ignore-lockno longer error when an AI agent is detected (e.g.CLAUDECODEset in the environment). Agent detection only infers background mode, while--ignore-lockexplicitly asks for a one-off foreground server thatstop/status/logswon't track — the flag now wins and the server starts in the foreground. This unblocks Playwright'swebServer(npx astro preview --ignore-lock --port <port>) when run from an agent session.--ignore-lockis set; an explicit--backgroundcombined with--ignore-lockstill errors, unchanged.astro preview --ignore-lockis refused whenever an AI agent is detected, so PlaywrightwebServercannot use it from an agent session #17903.Testing
previewanddevthat exercise the CLI path with an agent env var set (CLAUDECODE=1) plus--ignore-lock, asserting a foreground server starts and serves HTTP 200.getBackgroundIgnoreLockConflicttests for its new single-argument signature; the previous assertion that agent-implied background conflicts was removed, since that combination no longer errors.Docs
--ignore-lockis unchanged and still accurate.