Skip to content

docs(api): clarify async context isolation for within() vs cd() and syncProcessCwd() - #1547

Open
TusarGoswami wants to merge 1 commit into
google:mainfrom
TusarGoswami:docs/clarify-within-and-sync-process-cwd
Open

TusarGoswami wants to merge 1 commit into
google:mainfrom
TusarGoswami:docs/clarify-within-and-sync-process-cwd

Conversation

@TusarGoswami

Copy link
Copy Markdown

Closes #876

Summary

  • Clarifies the behavioral distinction between scoped $.cwd (isolated across async contexts via AsyncLocalStorage in within()) and global cd() (which invokes Node's native process.chdir() and mutates process.cwd() globally).
  • Adds practical examples comparing isolated async context behavior with and without the syncProcessCwd() hook, as requested in issue discussion.
  • Signed Google CLA: Yes

@TusarGoswami
TusarGoswami force-pushed the docs/clarify-within-and-sync-process-cwd branch from c1421c1 to edd89c1 Compare November 8, 2026 19:49

This branch has not been deployed

No deployments
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.

Misleading documentation

1 participant

⌂