Fix: remediate agent executing TypeScript identifiers as bash commands #88
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The remediate agent (Stage 3) has bash in its tool allowlist and is executing TypeScript identifiers as shell commands:
This is systematic - the remediate skill says to re-run the projects build/test/lint commands but does not specify which commands. The agent sees TypeScript identifiers in the code and hallucinates them as shell commands.
Root Cause
Fix
File 1: src/skills/remediateSkill.ts
Replace step 4 with two new steps adding project detection:
File 2: src/remediate/helpers/buildRemediateWrapper.ts
Add guardrail language: Detect commands from project files before running. Only execute commands you found in project files.
Files Changed
Validation
Fix Applied
Both files updated and all 1064 tests pass:
src/skills/remediateSkill.ts— added project detection step before re-running gatessrc/remediate/helpers/buildRemediateWrapper.ts— added guardrail languageChanges:
Validation: