[Feature Request] Add allowlist for pre-approved scripts in settings.json

Status Open
Reported on v2.1.268
Maintainer reply None cached
Activity 1 comment · opened Sep 25, 2026

Bug Description
I inspected a powershell script and I know what it does. I validated it and run it several times so I know it is safe. I want to be able to put it in allow list from settings.json, so when i ask claude to run it (directly or in background) to avoid being asked to allow it. In current implementation I gave the promt "run first_run.ps1" and claude asked me 3 times for my permission to allow execution.
I am using a git-bash terminal to run claude code. The exact content of the script is not relevant but hete it si for your convenience:
$logPath = "D:\Users\claudiu.cruceanu\Documents\Projects\MSVC19\SimpleAftnFromMSVC6.SRS-CAR\ProjectAftnSqlDBRomatsaNichita\first_run.log"
Set-Location "D:\Users\claudiu.cruceanu\Documents\Projects\MSVC19\SimpleAftnFromMSVC6.SRS-CAR\ProjectAftnSqlDBRomatsaNichita"

Single isolated run (no repetition), same 3 test groups and 300s pauses as

the repeat loops, INCLUDING a pause after the last group - so this run's

own final measurements aren't immediately followed by anything else that

could taint a subsequent run's "cold" state. Serves as the "1st" (initial/

cold) reference value the 10-repetition loop (repeat_loop_part2.ps1) is

later compared against.

"=== FIRST RUN - ArchivePerfMatrix - start $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath
.\x64\Test\ProjectRomatsa.exe --gtest_filter=ArchivePerfMatrix --gtest_print_time=1 | Out-File -Append -Encoding utf8 $logPath
"=== FIRST RUN - ArchivePerfMatrix - end $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath

Start-Sleep -Seconds 300

"=== FIRST RUN - FileCopyPerfTest/CopyFile - start $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath
.\x64\Test\ProjectRomatsa.exe --gtest_filter=FileCopyPerfTest/CopyFile --gtest_print_time=1 | Out-File -Append -Encoding utf8 $logPath
"=== FIRST RUN - FileCopyPerfTest/CopyFile - end $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath

Start-Sleep -Seconds 300

"=== FIRST RUN - FileCopyPerfTest/ExternalCmd - start $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath
.\x64\Test\ProjectRomatsa.exe --gtest_filter=FileCopyPerfTest/ExternalCmd --gtest_print_time=1 | Out-File -Append -Encoding utf8 $logPath
"=== FIRST RUN - FileCopyPerfTest/ExternalCmd - end $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath

Start-Sleep -Seconds 300

"=== FIRST RUN - ALL DONE - $(Get-Date -Format o) ===" | Out-File -Append -Encoding utf8 $logPath

Environment Info

  • Platform: win32
  • Terminal: xterm-256color
  • Version: 2.1.268
  • Feedback ID: 11ba24bc-8a99-493c-bfd4-b8e5b867ed2d

Errors

[{"error":"TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync (keys=1316 messages=1315 range=[1235,1316))\n    at s4t (B:/~BUN/root/chunk-45p7jdjv.js:36:28828)\n    at XSe (B:/~BUN/root/chunk-45p7jdjv.js:36:21633)\n    at Br (B:/~BUN/root/chunk-4sm1dhmy.js:18:20036)\n    at Hu (B:/~BUN/root/chunk-4sm1dhmy.js:18:38202)\n    at qh (B:/~BUN/root/chunk-4sm1dhmy.js:18:84283)\n    at _b (B:/~BUN/root/chunk-4sm1dhmy.js:18:83283)\n    at ec (B:/~BUN/root/chunk-4sm1dhmy.js:18:83112)\n    at Kh (B:/~BUN/root/chunk-4sm1dhmy.js:18:79637)\n    at we (B:/~BUN/root/chunk-4sm1dhmy.js:18:6261)\n    at nt (B:/~BUN/root/chunk-4sm1dhmy.js:18:4792)","timestamp":"2026-09-25T14:44:43.202Z"}]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗