Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
What awaiting actually does
card 2 of 6
A call that hands you a ticket, not a result
Calling an async function does not return its result. It returns an object that stands for the work: a **coroutine** (Python), a **future** (Rust) or a **promise** (JS/TS). `await` means: pause here until that work finishes, then give me its value or raise its error on this line. Without `await`, the line still looks like a normal call and runs without an error. Tests that never check the effect stay green, and the agent treats that green run as done.
Terms on this card
- coroutine
- In Python, the object returned by calling an `async def` function. Its body does not run until it is awaited or scheduled as a task.
- future
- In Rust, a value representing async work. It is lazy: nothing happens until something polls it.
- promise
- In JS/TS, an object for work already started that will later resolve with a value or reject with an error.
- await
- Keyword that pauses the current async function until the given work finishes, then returns its value or throws its error at that line.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
Lesson goal: Explain promises, futures and coroutines and what happens when one is never awaited. In Python the coroutine never runs. In Rust the future is lazy and does nothing. In JS/TS the work runs but its failure goes unobserved and ordering is lost. ·
the whole lesson