Hooks: expose conversation/turn edited-file lists on stop; allow sessionEnd followup_message

Feature request for product/service

Cursor IDE

Describe the request

Please make it easier to run once-per-conversation follow-ups scoped to files the agent actually edited in this chat, without approximating via git diff HEAD or hand-rolled afterFileEdit bookkeeping.

Problem

  1. stop fires per agent turn, not when the whole conversation/task is done.
  2. stop stdin has conversation_id / generation_id, but no list of files edited this turn / this conversation.
  3. sessionEnd is fire-and-forget and cannot return followup_message, so we cannot prompt the agent at true conversation end.

Workarounds are fragile: dirty-tree git diffs mix in unrelated chats; afterFileEdit ledgers can miss batch edits.

Request

  1. Add edit-scope fields to stop (and ideally sessionEnd) input, e.g. edited_files_this_generation and edited_files_this_conversation.
  2. Allow sessionEnd (or a new conversationStop) to return followup_message while the chat can still continue.
  3. (Nice to have) Document once-per-conversation follow-ups vs per-turn stop + loop_limit.

Use case
Large monorepo with many design docs: after a feature is done, ask once to sync docs for files this conversation changed — not every turn, not every uncommitted file.

Related

Operating System (if it applies)

MacOS

Hey @okra!

This is something we’re tracking internally as a feature request. It has come up before, and right now the best workaround is one you’ve already identified (keeping a ledger).

Have you experienced this yourself? We’ve only had one report and have been unable to reproduce it ourselves.