Support listing and deleting recorded agent actions - #6571
Open
ayoubdiourin7 wants to merge 8 commits into
Open
Conversation
suhaibmujahid
requested changes
Aug 17, 2026
Comment on lines
+132
to
+135
| return [ | ||
| {**copy.deepcopy(action), "action_id": action_id} | ||
| for action_id, action in self._actions.items() | ||
| ] |
Member
There was a problem hiding this comment.
I would return MD table, with ID, Action (based on the tool name), and reasoning.
|
|
||
| self._actions.append(action) | ||
| self._actions[action_id] = action | ||
| self._last_action_id = action_id |
Member
There was a problem hiding this comment.
Using _last_action_id is a bit fragile, race conditions could miss up with that.
| ``attachments`` key yet. | ||
| """ | ||
| idx = len(self._actions) | ||
| sequence = self._next_action_sequence |
Member
There was a problem hiding this comment.
Also, sequential IDs would be easy for the agent to guess and might remove things by accident. We could use UUIDs, which would be harder to guess.
|
|
||
| def _confirm(recorder: ActionsRecorder, action_type: str) -> str: | ||
| return f"Recorded {action_type} (#{len(recorder.actions) - 1})." | ||
| return f"Recorded {action_type} as {recorder.last_action_id}." |
Member
There was a problem hiding this comment.
Suggested change
| return f"Recorded {action_type} as {recorder.last_action_id}." | |
| return f"Recorded {action_type} (ID: {recorder.last_action_id})." |
|
|
||
| def _confirm(recorder: ActionsRecorder, action_type: str) -> str: | ||
| return f"Recorded {action_type} (#{len(recorder.actions) - 1})." | ||
| return f"Recorded {action_type} as {recorder.last_action_id}." |
Member
There was a problem hiding this comment.
Comment on lines
+32
to
+33
| "Exact stable ID returned when the action was recorded or by " | ||
| "list_actions (for example, action-2)." |
Member
There was a problem hiding this comment.
I would simplify it. Also, we do not need an example; it makes it a bit confusing since it does not look like the action IDs that will be in real cases.
Comment on lines
+38
to
+42
| """Retract one proposed action from this agent run. | ||
|
|
||
| The removed action will not appear in the final run summary and cannot be | ||
| applied. This operation accepts exactly one action ID and has no cascade or | ||
| force mode. |
Comment on lines
+15
to
+21
| """List every action currently proposed by this agent run. | ||
|
|
||
| Returns each action's stable in-run ID and its complete recorded payload, | ||
| including parameters, reasoning, references, and attachment metadata. Use | ||
| this when earlier action details are no longer present in your context or | ||
| before deciding whether a proposal needs to be retracted. | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recorded_actionstools for the bug-fix and frontend-triage agents.Fixes #6513