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.
Invented APIs, flags, config keys and packages card 4 of 6

fetch has no timeout option

builds on: Training cutoff and API drift
Standard `fetch` has no `timeout` key. The agent most likely borrowed it from axios or node-fetch v2. In plain JS the unknown key is ignored, so there is no error and no 5-second timeout. A stalled server keeps the request waiting as long as the runtime's own defaults allow, which is minutes in Node. TypeScript flags it only because the options are an inline object literal (excess property check). The real mechanism is an abort signal. `AbortSignal.timeout(5000)` (Node 18+, current browsers) rejects the call with a `TimeoutError`.
// JavaScript
// BAD
const res = await fetch(url, {
  method: "POST",
  timeout: 5000,
});
// BETTER
const res = await fetch(url, {
  method: "POST",
  signal: AbortSignal.timeout(5000),
});
Terms on this card
axios
A popular JavaScript HTTP client library. Its request options include a `timeout` key, unlike standard `fetch`.
node-fetch v2
An older npm package that brought fetch to Node. Version 2 had a non-standard `timeout` option that later versions and standard fetch lack.
excess property check
A TypeScript rule: an object literal written directly where a typed value is expected may not contain properties the type doesn't declare.
AbortSignal
A standard web/Node object that tells an operation like fetch to cancel. `AbortSignal.timeout(ms)` creates one that fires after the given time.
TimeoutError
The error name fetch rejects with when an `AbortSignal.timeout` signal fires.
Learn this step by step on Bytewise
Lesson goal: Recognise idiomatic-looking calls to methods, CLI flags, config options or packages that do not exist or belong to a different version: removed APIs, old import paths, options the installed version lacks. Check cheaply that each one exists, using the compiler, the docs, `--help` or the registry. · the whole lesson