AI doesn't remember context

March 2025. Working on a feature. Yesterday discussed architecture, made decisions. Today new chat.

"What architecture did we choose yesterday?"

It doesn't know. Every chat from scratch.

Problem

Long chat - context overflows. New chat - context is empty. Project is big - doesn't fit in context.

Solution: logs

Added logging everywhere. Every request, every response, every error - to log.

logger.info('UserService.create', { email, role })
logger.error('UserService.create failed', { error })

When something doesn't work - share logs in chat. AI sees what happened.

Solution: state documents

CURRENT_STATE.md - what's done, what's in progress, what decisions were made.

Before new chat - update the document. At start of chat - share it.

Solution: small tasks

Not "make an auth module". But "write function validateToken". Done - next task.

Smaller tasks need less context from previous sessions.

← Back to blog