opencrabs 0.3.38

The autonomous, self-improving AI agent. Single Rust binary. Every channel. Install with: cargo install opencrabs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# English phantom-detection configuration
# All phrases are lower-case. Matched against lowercased response text.

intent_phrases = [
    "now let me ",
    "now update ",
    "now fix ",
    "now add ",
    "now bump ",
    "now run ",
    "now check ",
    "now read ",
    "now commit",
    "now amend",
    "now updating",
    "now fixing",
    "now committing",
    "now amending",
    "now pushing",
    "now cherry-picking",
    "now merging",
    "now rebasing",
    "now deploying",
    "now building",
    "now testing",
    "now checking",
    "now applying",
    "now restarting",
    "now creating",
    "now writing",
    "now editing",
    "now adding",
    "now removing",
    "now deleting",
    "now reading",
    "now running",
    "now starting",
    "now finishing",
    "now finalizing",
    "now installing",
    "now configuring",
    "now wiring",
    "now setting up",
    "i'll update",
    "i'll fix",
    "i'll modify",
    "i'll create",
    "i'll write",
    "i'll edit",
    "i'll add",
    "i'll change",
    "i'll replace",
    "i'll commit",
    "i'll amend",
    "i'll proceed",
    "i'll start",
    "i'll finish",
    "i'll run",
    "i'll check",
    "i'll see",
    "i'll look",
    "i'll prepare",
    "i'll take a look",
    "i will proceed",
    "let me update",
    "let me fix",
    "let me modify",
    "let me create",
    "let me write",
    "let me edit",
    "let me add",
    "let me change",
    "let me commit",
    "let me amend",
    "let me see",
    "let me check",
    "let me look",
    "let me read",
    "let me examine",
    "let me verify",
    "let me inspect",
    "let me review",
    "let me take",
    "let me actually",
    "let me prepare",
    "let me proceed",
    "let me start",
    "let me first",
    "let me finish",
    "let me finalize",
    "let me run",
    "let's update",
    "let's fix",
    "let's modify",
    "let's create",
    "let's write",
    "let's edit",
    "let's add",
    "let's change",
    "let's replace",
    "let's commit",
    "let's amend",
    "let's see",
    "let's check",
    "let's look",
    "let's read",
    "let's examine",
    "let's verify",
    "let's inspect",
    "let's review",
    "let's take a look",
    "let's prepare",
    "let's proceed",
    "let's start",
    "let's first",
    "let's finish",
    "let's finalize",
    "let's run",
    "let's dig",
    "let's investigate",
    "let's explore",
    "let's search",
    "let's find",
    "let's gather",
    "let's pull",
    "let's grab",
    "let's get",
    "let's fetch",
    "let's query",
    "let's scan",
    "let's hunt",
    "let's trace",
    "let's track",
    "let's look into",
    "let's check into",
    "let's find out",
    "let's dig into",
    "let me dig",
    "let me investigate",
    "let me explore",
    "let me search",
    "let me find",
    "let me gather",
    "let me pull",
    "let me grab",
    "let me get",
    "let me fetch",
    "let me query",
    "let me scan",
    "let me hunt",
    "let me trace",
    "let me track",
    "let me look into",
    "let me check into",
    "let me find out",
    "let me dig into",
    "i'll dig",
    "i'll investigate",
    "i'll explore",
    "i'll search",
    "i'll find",
    "i'll gather",
    "i'll pull",
    "i'll grab",
    "i'll get",
    "i'll fetch",
    "i'll query",
    "i'll scan",
    "i'll hunt",
    "i'll trace",
    "i'll track",
    "i'll look into",
    "i'll check into",
    "i'll find out",
    "i'll dig into",
    "let me build",
    "let me push",
    "let me deploy",
    "let me sync",
    "let me migrate",
    "let me apply",
    "let me install",
    "let me configure",
    "let me set up",
    "let me wire",
    "let's build",
    "let's push",
    "let's deploy",
    "let's sync",
    "let's migrate",
    "let's apply",
    "let's install",
    "let's configure",
    "let's set up",
    "let's wire",
    "i'll build",
    "i'll push",
    "i'll deploy",
    "i'll sync",
    "i'll migrate",
    "i'll apply",
    "i'll install",
    "i'll configure",
    "i'll set up",
    "i'll wire",
    "now build",
    "now push",
    "now deploy",
    "now sync",
    "now migrate",
    "now apply",
    # Deferment stalls — "I need to X", "I have to X", "I must X" —
    # 2026-05-28: model emitted "I need to read the actual code before
    # writing concrete task descriptions." and the existing list didn't
    # cover that shape. These are pre-action narration just like
    # "let me X" / "I'll X" and never produced a tool call in the same
    # turn.
    "i need to read",
    "i need to check",
    "i need to look",
    "i need to examine",
    "i need to inspect",
    "i need to verify",
    "i need to review",
    "i need to understand",
    "i need to see",
    "i need to find",
    "i need to investigate",
    "i need to explore",
    "i need to search",
    "i need to gather",
    "i need to fetch",
    "i need to update",
    "i need to fix",
    "i need to modify",
    "i need to create",
    "i need to write",
    "i need to edit",
    "i need to add",
    "i need to remove",
    "i need to delete",
    "i need to run",
    "i need to install",
    "i need to configure",
    "i need to dig",
    "i have to read",
    "i have to check",
    "i have to look",
    "i have to verify",
    "i have to update",
    "i have to fix",
    "i have to write",
    "i have to investigate",
    "i must read",
    "i must check",
    "i must verify",
    "i must update",
    "i must fix",
    "i should read",
    "i should check",
    "i should look",
    "i should verify",
    "i should update",
    "i should fix",
    "i should investigate",
    "i should examine",
    "i should review",
    # Pronounless "Need to X" variants — 2026-06-01: model emitted
    # "Need to read the tool_loop_inner function entry to add turn
    # timing. Let me check that first." The existing list only covered
    # "i need to X" with the explicit pronoun. Some models (terser
    # outputs, telegraphic narration style) drop the leading "I". These
    # patterns are sentence-leading variants — they catch the start of
    # a phantom-narration line whether the pronoun is present or not.
    "need to read",
    "need to check",
    "need to look",
    "need to examine",
    "need to inspect",
    "need to verify",
    "need to review",
    "need to understand",
    "need to see",
    "need to find",
    "need to investigate",
    "need to explore",
    "need to search",
    "need to gather",
    "need to fetch",
    "need to update",
    "need to fix",
    "need to modify",
    "need to create",
    "need to write",
    "need to edit",
    "need to add",
    "need to remove",
    "need to delete",
    "need to run",
    "need to install",
    "need to configure",
    "need to dig",
    # `have to X` / `must X` / `should X` deliberately NOT added without
    # the pronoun — they collide too easily with unrelated prose like
    # "you should check the docs" or "the file must read like a manual"
    # and would false-positive the phantom detector on legit text. The
    # `i have to X` / `i must X` / `i should X` forms above stay
    # because the explicit pronoun anchors the phrase to first-person
    # narration.
    # Bare-gerund sentence openers — 2026-06-01: model emitted
    # "Reading the current state of the affected files to make precise
    # edits." with no leading "I'm" / "let me" / "now". The
    # "<gerund> + <determiner>" bigram is rare enough in normal Q&A
    # prose (the model typically reports findings rather than narrating
    # the act of reading) that substring matches inside the prose lead-
    # in are safely treated as phantom narration when no tool was
    # called in the same turn.
    "reading the ",
    "reading current",
    "reading affected",
    "reading existing",
    "checking the ",
    "checking current",
    "checking existing",
    "examining the ",
    "examining current",
    "examining existing",
    "inspecting the ",
    "inspecting current",
    "verifying the ",
    "verifying current",
    "reviewing the ",
    "reviewing current",
    "investigating the ",
    "investigating current",
    "exploring the ",
    "exploring current",
    "searching the ",
    "searching for the ",
    "scanning the ",
    "tracing the ",
    "tracking the ",
    "gathering the ",
    "fetching the ",
    "looking at the ",
    "looking at current",
    "looking at existing",
    "looking into the ",
    # Cleanup / destructive action verbs — 2026-06-04: model emitted
    # "Good catch. Let me clean up README.md and all the remaining
    # docs plus Rust files." after a 37-tool-call turn, then closed
    # without dispatching the cleanup. The verbs here are the action
    # shapes that follow a first wave of edits — clean / delete /
    # remove / refactor / reorganize / tidy / strip / wipe / purge.
    # Each carries the same precedence chain (`let me X` / `i'll X` /
    # `let's X` / `now X` / `i need to X` / pronounless `need to X` /
    # `i have to X` / `i must X` / `i should X`) so a forward-looking
    # cleanup announcement fires phantom regardless of pronoun shape.
    "let me clean up",
    "let me clean",
    "let me delete",
    "let me remove",
    "let me refactor",
    "let me reorganize",
    "let me tidy",
    "let me tidy up",
    "let me strip",
    "let me strip out",
    "let me wipe",
    "let me purge",
    "let me scrub",
    "let me erase",
    "let me dedupe",
    "let me deduplicate",
    "i'll clean up",
    "i'll clean",
    "i'll delete",
    "i'll remove",
    "i'll refactor",
    "i'll reorganize",
    "i'll tidy",
    "i'll tidy up",
    "i'll strip",
    "i'll strip out",
    "i'll wipe",
    "i'll purge",
    "i'll scrub",
    "i'll erase",
    "let's clean up",
    "let's clean",
    "let's delete",
    "let's remove",
    "let's refactor",
    "let's reorganize",
    "let's tidy",
    "let's tidy up",
    "let's strip",
    "let's strip out",
    "let's wipe",
    "let's purge",
    "let's scrub",
    "let's erase",
    "now clean up",
    # `"now clean"` bare is omitted — collides with adjectival "is
    # now clean and ready for the next release". Only the explicit
    # "clean up" form is safe as a substring.
    "now delete",
    "now remove",
    "now refactor",
    "now reorganize",
    "now strip",
    "now wipe",
    "now purge",
    "i need to clean up",
    "i need to clean",
    "i need to delete",
    "i need to remove",
    "i need to refactor",
    "i need to reorganize",
    "i need to tidy",
    "i need to strip",
    "i need to wipe",
    "i need to purge",
    "need to clean up",
    "need to clean",
    "need to delete",
    "need to refactor",
    "need to reorganize",
    "need to tidy",
    "need to strip",
    "need to wipe",
    "need to purge",
    "i have to clean up",
    "i have to delete",
    "i have to remove",
    "i have to refactor",
    "i must clean up",
    "i must delete",
    "i must remove",
    "i must refactor",
    "i should clean up",
    "i should delete",
    "i should remove",
    "i should refactor",
    "i should reorganize",
    # Strong forward-commitment phrases — 2026-06-12: mimo-v2.5-pro narrated
    # "I'm going to use write_file to create the new file" and called nothing.
    # The "let me X" / "I'll X" / "now X" families above missed the
    # "I'm going to <verb>" / "I am going to <verb>" / "I'm gonna" shape — the
    # single clearest "100% about to act" signal a model emits. Anchored to
    # action verbs (not bare "i'm going to", which can precede "explain").
    "i'm going to use",
    "i'm going to create",
    "i'm going to write",
    "i'm going to update",
    "i'm going to add",
    "i'm going to edit",
    "i'm going to modify",
    "i'm going to replace",
    "i'm going to delete",
    "i'm going to remove",
    "i'm going to run",
    "i'm going to check",
    "i'm going to read",
    "i'm going to commit",
    "i'm going to push",
    "i'm going to fix",
    "i'm going to build",
    "i'm going to deploy",
    "i'm going to install",
    "i'm going to start",
    "i'm going to do it",
    "i'm going to just",
    "i'm going to go ahead",
    "i am going to use",
    "i am going to create",
    "i am going to write",
    "i am going to update",
    "i am going to add",
    "i am going to edit",
    "i am going to modify",
    "i am going to delete",
    "i am going to run",
    "i am going to check",
    "i am going to commit",
    "i am going to fix",
    "i am going to start",
    "i'm gonna ",
    "i'll just ",
    "let me just ",
    "i'll go ahead and",
    "i will go ahead and",
    "let me go ahead and",
    "i'll now ",
    "i will now ",
]

action_verbs = [
    "pushed",
    "deployed",
    "merged",
    "migrated",
    "committed",
    "rebased",
    "tagged",
    "released",
    "published",
    "synced",
    "rolled back",
    "rolled out",
]

completion_claims = [
    "here's what changed",
    "here's what's changed",
    "here are the changes",
    "here's what i did",
    "here is what i did",
    "changes applied",
    "updated the file",
    "updated the code",
    "updated src/",
    "modified the file",
    "modified src/",
    "fixed the file",
    "fixed the bug",
    "fixed the issue",
    "fixed src/",
    "created the file",
    "wrote the file",
    "everything is updated",
    "i've made the changes",
    "i've completed",
    "i've finished",
    "i've updated",
    "i've written",
    "i've created",
    "i've saved",
    "i've modified",
    "i've fixed",
    "i've replaced",
    "i've amended",
    "i've committed",
    "i've bumped",
    "i've made all",
    "all changes have been",
    "all files have been",
    "the changes have been applied",
    "changes are now in place",
    "the file now contains",
    "the file has been",
    "file updated",
    "file created",
    "file saved",
    "changes saved",
    "amended.",
    "committed.",
    "amended the commit",
    "bumped the version",
    "version bumped",
]

# Regex patterns — all use (?im) for case-insensitive multiline matching.

line_start_re = "(?im)^[\\s\\-*•>]*(?:(?:ok|okay|sure|alright|right|hmm|well|actually|so)\\s*,?\\s+)?(?:now\\s+)?(?:let\\s+me|i['\u2019]ll|let['\u2019]s|i\\s+need\\s+to|i\\s+have\\s+to|i\\s+must|i\\s+should|i\\s+want\\s+to|i['\u2019]d\\s+need\\s+to)\\s+\\w"

# Brief present-continuous work announcement ending the turn with no tool
# call — "Running checks now.", "Checking the logs…", "Rebuilding now:".
# Requires a leading action gerund AND a trailing imminence marker (now / … /
# ... / :) so ordinary sentences that merely open with a gerund ("Reading the
# file is straightforward.") don't match.
work_announcement_re = "(?i)^[\\s\\-*•>]*(?:(?:ok|okay|sure|alright|right|got it|will do|on it)[,.!:]?\\s+)?(?:i['’]?m\\s+|i\\s+am\\s+|now\\s+|let\\s+me\\s+)?(?:re-?)?(?:running|checking|building|rebuilding|testing|fetching|pushing|pulling|committing|updating|fixing|installing|compiling|verifying|validating|searching|scanning|reading|writing|creating|generating|deleting|removing|applying|deploying|merging|rebasing|cloning|downloading|uploading|executing|launching|starting|investigating|inspecting|analy[sz]ing|gathering)\\b[^.!?:\\n]{0,60}?(?:\\s+(?:right\\s+)?now(?:[.!…,]+|\\s*$)|\\.{3}|…|:\\s*$)"

gerund_re = "(?im)(?:^|[.!?]\\s+)\\s*now\\s+(?:updating|fixing|committing|amending|pushing|cherry-picking|merging|rebasing|deploying|building|testing|checking|applying|restarting|creating|writing|editing|adding|removing|deleting|reading|running|starting|finishing|finalizing|installing|configuring|wiring)\\b"

trailing_colon_re = "(?im)(?:^|\\n)\\s*(?:let\\s+me|i'll|i\\s+will|now\\s+let\\s+me|now\\s+i'll)\\s+\\w[^:\\n]{0,80}:\\s*$"

now_imperative_re = "(?m)^[\\s\\-*]*(?:now\\s+(?:let\\s+me\\s+)?|let\\s+me\\s+)\\w"

numbered_steps_re = "(?m)^\\s*\\d+\\.\\s+(?:update|fix|modify|create|write|edit|add|change|remove|delete|check|read|run|bump|amend|verify|test|deploy|install)"

past_tense_standalone_re = "(?m)^[\\s\\-*]*(?:amended|updated|fixed|modified|created|written|saved|deleted|removed|replaced|bumped|deployed|committed)[.!]"

path_re = "(?:^|[\\s`(])(?:\\./)?[a-zA-Z_][\\w\\-]*/[\\w\\-/]*\\.\\w{1,6}(?:[\\s`),:;]|$)"

ext_re = "(?:^|[\\s`(])[\\w\\-]+\\.(?:rs|py|ts|tsx|js|jsx|go|sh|toml|yaml|yml|json|md)(?:[\\s`),:;]|$)"

backtick_code_re = "`[a-zA-Z_]\\w+`"