Skip to content

fix(agent): reject repeated completed tool call ids - #888

Open
Sehlani042 wants to merge 1 commit into
SWE-agent:mainfrom
Sehlani042:codex/dedupe-completed-tool-results-872
Open

fix(agent): reject repeated completed tool call ids#888
Sehlani042 wants to merge 1 commit into
SWE-agent:mainfrom
Sehlani042:codex/dedupe-completed-tool-results-872

Conversation

@Sehlani042

Copy link
Copy Markdown

Summary

Fixes #872.

  • track completed chat-tool and Responses-API tool call output IDs in the agent message history
  • reject a model response that reuses an already-completed tool call ID before appending the assistant message or executing the shell action
  • add a regression proving the repeated ID is surfaced as a format error and the duplicate shell action is not executed

Verification

  • uv run pytest tests/agents/test_default.py::test_duplicate_completed_tool_call_id_is_not_executed_again tests/agents/test_default.py -q
  • uv run pytest tests/models/test_actions_toolcall.py tests/models/test_test_models.py::test_response_api_model_format_observation -q
  • uv run --extra dev ruff check src/minisweagent/agents/default.py tests/agents/test_default.py
  • uv run --extra dev ruff format --check src/minisweagent/agents/default.py tests/agents/test_default.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mini-swe-agent repeats completed shell tool results

1 participant