Summary
AgentMail bot mode treats command names case-insensitively in its switch, but the shared flag/seen branch compares the original args[0] when deciding which operation to run.
As a result, FLAG INBOX 1 enters the correct case, but args[0] == "flag" is false and it executes MarkSeen instead of Flag.
Impact
Agents using uppercase command names can accidentally mark messages as seen instead of flagging them. That loses unread-state signal and does not perform the requested flag action.
Expected
FLAG, Flag, and flag should all set the flagged flag, matching the case-insensitive command dispatch behavior.
Summary
AgentMail bot mode treats command names case-insensitively in its switch, but the shared
flag/seenbranch compares the originalargs[0]when deciding which operation to run.As a result,
FLAG INBOX 1enters the correct case, butargs[0] == "flag"is false and it executesMarkSeeninstead ofFlag.Impact
Agents using uppercase command names can accidentally mark messages as seen instead of flagging them. That loses unread-state signal and does not perform the requested flag action.
Expected
FLAG,Flag, andflagshould all set the flagged flag, matching the case-insensitive command dispatch behavior.