Repository navigation
Commit a54fe4e
fix(server): select Hermes approval mode by intent, not substring
The live `hermes acp` CLI advertises three session modes -- `default`
("Ask before edits."), `accept_edits` ("Auto-allow workspace and /tmp
edits; still asks for sensitive paths.") and `dont_ask` ("Don't Ask") --
and every one of them contains the "ask" approval alias somewhere in its
id, name, or description. The substring fallback in findModeByAliases
therefore returned whichever of the three Hermes listed first, so
approval-required resolved to `default` only by accident of ordering. A
reorder or a new mode would have silently pointed "approve every edit"
at an auto-allow mode.
The approval lookup now asks findModeByAliases for a mode that still
prompts, rejecting substring candidates whose own text says otherwise
("dont ask", "auto", "accept", "bypass", ...). The filter is opt-in and
scoped to approval intent only: an "Accept Edits" mode remains a valid
implement-mode candidate, and exact id/name matches are untouched.
Model: Claude Opus 5 (1M context). Harness: Claude Code.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent f2d2f96 commit a54fe4e
2 files changed
Lines changed: 110 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
195 | 259 | | |
196 | 260 | | |
197 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
| |||
189 | 208 | | |
190 | 209 | | |
191 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
192 | 230 | | |
193 | 231 | | |
194 | 232 | | |
| 233 | + | |
195 | 234 | | |
196 | 235 | | |
197 | 236 | | |
| |||
204 | 243 | | |
205 | 244 | | |
206 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
207 | 249 | | |
208 | | - | |
| 250 | + | |
209 | 251 | | |
210 | 252 | | |
211 | 253 | | |
| |||
233 | 275 | | |
234 | 276 | | |
235 | 277 | | |
236 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
237 | 281 | | |
238 | 282 | | |
239 | 283 | | |
| |||
0 commit comments