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.
Silencing the checker: type escapes and suppressions
card 6 of 6
Name the guarantee, then find its replacement
builds on: Agents optimise the signal they can see
An escape hatch makes the checker stop asking. It does not make the problem go away. For each one in the diff, name the guarantee it removed. Then ask what proves that guarantee now: a parse, a runtime check, a test. If the answer is "nothing", it's a tell.
Terms on this card
- tell
- An observable sign in a diff, transcript or summary that suggests a shortcut or an error.
- escape hatch
- A construct that makes a type checker or linter accept code without proving it correct, e.g. `any`, `as`, `!`, `cast`, ignore comments, or `unsafe`.
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
Lesson goal: Spot the escape hatches that silence the compiler or linter instead of fixing the problem: `any`, `as`, non-null `!` and `@ts-ignore` in TS; `# type: ignore` and `cast` in Python; `@SuppressWarnings("unchecked")` in Java; `any`/`interface{}` in Go; `unsafe`; and `eslint-disable`, `//nolint`, `#[allow]`. Explain which guarantee each one removes. ·
the whole lesson