Issue
The Set-CodexSessionDirectory function modifies session state but does not support ShouldProcess, which violates PowerShell best practices for functions that change system state.
Location
Eigenverft.Manifested.Agent.InvokeCodexTask.ps1, line 261
Current Behavior
function Set-CodexSessionDirectory {
[CmdletBinding()]
param(
[Alias('Session')]
[Parameter(Mandatory = $true)]
[string]$SessionName,
[Parameter(Mandatory = $true)]
[string]$Directory
)
# ... modifies session store without ShouldProcess support
}
Expected Behavior
The function should support -WhatIf and -Confirm parameters by implementing SupportsShouldProcess:
function Set-CodexSessionDirectory {
[CmdletBinding(SupportsShouldProcess = $true)]
param(
# ... parameters
)
if ($PSCmdlet.ShouldProcess($sessionKey, 'Update stored Codex session directory')) {
# ... perform the modification
}
}
Impact
- Users cannot use
-WhatIf to preview changes
- Users cannot use
-Confirm to require confirmation before changes
- Violates PowerShell best practices for state-changing functions
Related
- Similar issue may exist in other session-modifying functions
Issue
The
Set-CodexSessionDirectoryfunction modifies session state but does not supportShouldProcess, which violates PowerShell best practices for functions that change system state.Location
Eigenverft.Manifested.Agent.InvokeCodexTask.ps1, line 261Current Behavior
Expected Behavior
The function should support
-WhatIfand-Confirmparameters by implementingSupportsShouldProcess:Impact
-WhatIfto preview changes-Confirmto require confirmation before changesRelated