Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sessionId | string | required | UUID of the session to tag |
tag | string | null | required | Tag string, or null to clear |
options.dir | string | undefined | Project directory path. When omitted, searches all project directories |
resolveSettings()
Resolves the effective Claude Code settings for a given directory using the same merge engine as the CLI, without spawning the Claude CLI. Use it to inspect what configuration a query() call would see before invoking one.
This function is alpha and its API may change before stabilization.
The snapshot differs from what a live query() session applies:
policyHelper:resolveSettings()reads MDM sources, including macOS plist and Windows HKLM/HKCU, but doesn't execute the admin-configuredpolicyHelpersubprocess.- Server-managed settings:
resolveSettings()doesn't fetch server-managed settings. Pass them asoptions.serverManagedSettingsto include them. defaultMode: the snapshot returnspermissions.defaultModeas-is from every tier, so it can include the'auto'and'bypassPermissions'values from project and local settings, which a live session ignores.
typescript
function resolveSettings(
options?: ResolveSettingsOptions
): Promise<ResolvedSettings>;