# Try to improve behavior when agent is stuck \(\#28169\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ac9e2f30bbb320edf1c654bc46fdf46b727c6256)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ac9e2f30bbb320edf1c654bc46fdf46b727c6256

Requested commit: ac9e2f30bbb320edf1c654bc46fdf46b727c6256

Commit: ac9e2f30bbb320edf1c654bc46fdf46b727c6256

Tree: dcc2c85d6dc8926257c5eb9a34bb3ea9c73d472f

Author: Richard Feldman

Committer: GitHub

## Message

```
Try to improve behavior when agent is stuck (#28169)

Currently, it's pretty common that when the agent gets stuck, it deletes
whatever it's stuck on and replaces it with a TODO comment, then
cheerfully reports that it has "simpified" the implementation. This is
worse than leaving the broken code, because at least a human could take
over and try to get it across the finish line.

This system prompt adjustment attempts to make the agent do something
more useful when in this situation: report that it's stuck, explain why
it's stuck, and ask the user what to do.

Release Notes:

- N/A
```

## Parents

- [a2fbe82c42601221482e8422d7f8db5fee649b8e](https://git.cafe/gitcafe/zed/commit/a2fbe82c42601221482e8422d7f8db5fee649b8e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ac9e2f30bbb320edf1c654bc46fdf46b727c6256?format=markdown)
