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 1 of 6
Green in a minute, but where is the key?
builds on: Agents optimise the signal they can see, What the agent sees: its context
Your billing integration test fails with `401 Unauthorized`. You ask the agent to get it passing. A minute later the test is green, and the summary says *"Fixed authentication config."* Earlier in the transcript, the agent ran `$ cat .env` to look around. Before you push, ask where the real key might be now: in the code, a test fixture, a log line, or the summary itself.
Terms on this card
- .env
- A local file of environment variables, often holding real secrets. It is meant to stay on one machine and out of git.
- 401 Unauthorized
- HTTP status meaning the request lacked valid credentials, such as a missing or wrong API key.
- test fixture
- Fixed data or setup that tests use, such as sample configs or recorded responses, usually committed with the code.
- transcript
- The visible record of an agent session: your messages, each action the agent took and each tool output it got back.
- fixture
- A fixed sample file or data set that tests use as input.
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