Clearing logic is implemented on Trap Receiver side. The agent task here is to send another SNMP trap for that purpose. The most commonly used scenario is linkDown/linkUp traps defined in RFC1157 and RFC1215:
linkDown TRAP-TYPE
ENTERPRISE snmp
VARIABLES { ifIndex }
DESCRIPTION
"A linkDown trap signifies that the sending
protocol entity recognizes a failure in one of
the communication links represented in the
agent's configuration."
::= 2
linkUp TRAP-TYPE
ENTERPRISE snmp
VARIABLES { ifIndex }
DESCRIPTION
"A linkUp trap signifies that the sending
protocol entity recognizes that one of the
communication links represented in the agent's
configuration has come up."
::= 3