Skip to content

Let Agents Log Friction

Posted on:August 14, 2026 at 06:30 PM

I use Pi as my coding harness. As I’ve built many skills and a few tools, I wanted a way for agents to report friction they ran into while using them.

Where friction usually comes from

If such problems are left unattended, agents spend more time and tokens. Worse, they may not complete the task despite having the right skills.

Fix: Let agents log friction

A small retrospective prompt is enough

Time for retrospection.

You've invoked the following skills in this conversation:
- skill-name (/path/to/SKILL.md)

Did you face any trouble or friction comprehending the skills or scripts in those skills?

If yes, append your feedbacks in the corresponding FEEDBACKS.md file that's present at the root of every skill.

- Only add concrete feedback that would help improve future use of that skill.
- Do not praise skills.
- Do not edit SKILL.md or scripts.
- Do not overwrite the FEEDBACKS.md file.
- If you did not face meaningful friction, do nothing.

Mention sessionId and dateTime in every feedback entry:
- sessionId: ${sessionId}
- datetime: ${dateTime}

Roughly 150-200 tokens. sessionId and dateTime are injected dynamically.

Two ways to implement this

Approach 1: Fork the conversation, ask the agent to log friction

Fork the conversation after the agent turn ends and inject the retrospective prompt as a new user message.

Advantages

I’ve built a small Pi extension for this. GitHub Link

Notes:

Approach 2: Add a logFriction tool

Expose a dedicated tool that the main agent can call whenever it runs into a problem.

Advantages

Why I prefer Approach 1

Making use of collected feedback

Periodically, initially every week and then every month, review FEEDBACKS.md and make changes to the skill. Purge feedback entries that have been acted upon.

Why not edit SKILL.md directly?

A single failure isn’t enough evidence to modify instructions used by every future agent. The agent itself may have made a mistake. Log it first; repeated reports are a stronger signal.

Other uses

The same approach can be extended to collect feedback about tools, the system prompt, and AGENTS.md.

One caveat: if an agent finds a problem in a skill, it may over-index on the negative and start reporting problems in the other areas too. I’ve observed this in practice, so I’d use independent forks for each type of retrospection.