How should you scope terminal permissions for a coding agent?

Scope permission to the commands and workspace the task needs. Reading, testing, editing files and writing production data have different consequences. Inspect the actual arguments and target before executing a proposed command.

How to check it

  1. Determine whether the command runs locally or against production.
  2. Identify deletion, network access and credential use.
  3. Verify a backup and recovery path before a destructive change.

Concrete example

Example: permission to run local tests is not permission to reset a production database. If one CLI can reach both, inspect the project identifier before running it.

Avoid a false conclusion

Do not disable a security check to get past a failure. Understand why the command was refused and choose a narrower operation.

Reference

Official reference

VCT Editorial

All answers