Bird
0
0

Identify the error in this sandbox usage:

medium📝 Debug Q6 of 15
Agentic AI - Agent Safety and Guardrails
Identify the error in this sandbox usage:
import sandbox
sandbox.run('delete all files')
AThe command is not a valid shell command
BMissing import statement
CSandbox module does not have run method
DNo error, code is correct
Step-by-Step Solution
Solution:
  1. Step 1: Check command validity

    'delete all files' is not a valid shell command, causing failure.
  2. Step 2: Verify other code parts

    Import and method usage are correct; error is in command string.
  3. Final Answer:

    The command is not a valid shell command -> Option A
  4. Quick Check:

    Invalid command string = The command is not a valid shell command [OK]
Quick Trick: Use valid shell commands inside sandbox.run() [OK]
Common Mistakes:
  • Assuming missing import error
  • Thinking sandbox.run() doesn't exist
  • Believing code is error-free

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes