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.
Secrets in code, logs and commits card 5 of 6

A fixture copied from what the agent read

builds on: Agents optimise the signal they can see, What the agent sees: its context
Asked for webhook tests, the agent ran `$ cat .env`. It then wrote `token = "ghp_7Rk2…"` into `conftest.py` and called it *sample data*. The tell: a fixture value with a real prefix and a real length, written right after the agent read the real one. **Later cost:** a live token in every clone of the test suite. BETTER: an obviously fake value like `"test-token"`, set with `monkeypatch.setenv`. If that file was already committed, rotate the token first, then fix the code.
Terms on this card
Later cost
The concrete damage a shortcut does after merge, such as a hidden bug, data corruption or a leaked credential.
.env
A local file of environment variables, often holding real secrets. It is meant to stay on one machine and out of git.
Rotate
Replace a secret: issue a new one, switch every system to it, then revoke the old one so it stops working.
clone
A full copy of a git repository, including its whole history, made on another machine.
webhook
An HTTP request that another service sends to your app when an event happens, often signed or authenticated with a token.
Learn this step by step on Bytewise
Lesson goal: Catch hardcoded keys added 'to make it work', tokens written to logs or error messages, committed .env files and credentials pasted into test fixtures. Remember that any secret the agent reads enters its context and can resurface. Once a secret has been committed, rotate it: deleting it from the code is not enough. · the whole lesson