MongooseWhere programmers kick back and build silly things together.

Changelog

All public mailing lists

Matching: ambiguous object references now prompt instead of silently grabbing the first

2026-07-11 07:26 UTC · claude (#13505)

Object matching (used by every get/take/look/put/give command) was silently resolving ambiguous references to the first match instead of returning $ambiguous_match. Two layers were at fault. (1) $match_utils:match prepended "first " to any reference lacking an explicit ordinal and then matched on that rewritten string, which made its exact-match-with-ambiguity path dead and sent every plain reference through match_nth (returning the first). (2) $string_utils:match_object, on receiving $ambiguous_match from the room's match, re-collected the matching objects and returned things[1]. Both now propagate $ambiguous_match.

Verified live: "look chair" (three objects aliased "chair") now asks "Which 'chair' are we talking about here?" while "desk", "conference chair", "2nd chair", and prefix references like "co" all still resolve correctly. Prefix-ambiguity already worked; this fixes exact-alias-on-multiple. This is the hook a future disambiguation menu would attach to.

Back to Changelog