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.
Endpoints that authenticate but don't authorize card 6 of 6

Every id needs a link to the caller

builds on: Trust boundaries and untrusted input, What the agent cannot see
A login check says who is calling, not which records they may touch. For every id that comes from the request, find the line that ties the record to the caller, using the caller's identity from the session. If that line lives outside the handler, confirm the agent's new route actually goes through it.
Terms on this card
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
handler
The function that receives an HTTP request and produces the response. It is where request data first enters your code.
caller
Any place in code that invokes a function or uses a name, sometimes called a call site.
Learn this step by step on Bytewise
Lesson goal: Spot new endpoints or queries that check who the caller is but not whether they may access this record (insecure direct object references). Explain why agents copying a nearby handler often miss ownership checks that are enforced elsewhere in the codebase. · the whole lesson