A sanitation-department agent needs to run an existing, already-reviewed shell script that converts a batch of route CSVs into the format the routing system expects. No existing built-in file tool performs this conversion. What is the appropriate tool choice, and what safeguard should accompany it?
Select an answer to reveal the explanation.
Short Explanation
When the job genuinely needs a shell script, Bash is the right wrench—just do not hand it a blank check. Scope it to this reviewed script and these inputs.
Full Explanation
Choosing a tool means matching capability to the job, then narrowing that capability to the job's real boundaries. Converting a batch of route CSVs through an existing reviewed script is genuinely a script-execution task and no file-editing tool performs it, but shell access is the broadest capability an agent can hold, so the grant should be as narrow as the work.
Bash runs the reviewed conversion script as written, preserving tested logic rather than re-deriving it. Scoping the permission to that specific script and its inputs, rather than open-ended shell access, keeps the agent able to do this job and nothing else, so a misread instruction cannot become an arbitrary command on the sanitation department's machine.
Rewriting the CSVs with Edit substitutes many hand-made text modifications for one tested transformation, and Edit is built for targeted anchored changes rather than bulk reformatting; reading the files and having the model reproduce converted output relies on transcription across a large batch, where silent errors are near-certain; refusing Bash altogether and handing the work back to a person abandons automation for a task that already has a safe, reviewed implementation.
Exam caveat: the word reviewed is carrying weight here—an unvetted script executed through a narrowly scoped permission is still an unvetted script. Operational check: confirm the permission rule names the script path and rejects an unrelated command, then run the conversion and diff its output against a known-good sample.