6e041d5244
/goal gate add <command> attaches shell commands to the active goal. Gates run at turn boundary BEFORE the LLM judge: a failing gate skips the judge entirely and feeds its exit code + bounded output tail back as the continuation prompt, so the agent iterates against concrete evidence instead of a prose verdict. - Unchanged-workspace skip: a gate that failed on an identical workspace (git HEAD + status fingerprint) is not re-run — the recorded failure replays and the attempt count advances. - Bounded retries (default 3) + per-gate timeout (default 300s); exhaustion auto-pauses the goal like the turn budget does. - Gates persist in SessionDB.state_meta with the goal (survive /resume and compression rotation); pre-gate goal rows load unchanged. - /goal gate [list|add|remove|clear] on CLI + gateway; 'gate' added to the mid-run control-verb whitelist (gates only run at turn boundary, so editing the list mid-run is safe). Adapted from the quality-gate concept in Prime Intellect's Prime-Agent (--autonomous-gate).