habit · do it now
When someone walks in, put the task down
When someone enters the room while you're working — a colleague, a child, a partner — the instinct is to hold both: keep your eyes on the screen and half-listen. Try the other thing: fully stop, look up, and give them one complete minute. You'll get the task back. The moment is harder to retrieve.