0x0pointer / 0x0pointer/agent-smith

session(action='resume', {choice:'ABORT'})` does not abort the scan

Open
#179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
129
Forks
10
Avg merge
8h 52m
Merged PRs (30d)
5

Description

What happens

Calling session(action="resume", options={"choice": "ABORT"}) records the choice and returns the scan to running. The scan does not terminate, and the same HIR re-fires.

The only thing that actually ended the scan was hitting the API directly:

POST http://localhost:7777/api/intervention/respond
Authorization: Bearer <logs/dashboard.token>
{"choice": "ABORT"}
Note

core/api_server/routes/scan_state_routes.py:153-168 already documents and fixes exactly this for the HTTP route — it explicitly consumes terminal choices because "resolve_intervention only RECORDS the choice and returns the scan to 'running' — so without this, ACCEPT_PARTIAL / ABORT just bounce the agent back into the same blockers and re-fire the HIR (the write-only-resolution loop)".

The MCP session(resume) path appears to lack the equivalent consumption step, so the fix exists on one caller but not the other.

Expected

ABORT / ACCEPT_PARTIAL / FORCE_COMPLETE / COMPLETE via the MCP tool terminate the scan the same way the HTTP route does.

Suggested fix

Factor the terminal-choice handling out of scan_state_routes.py and call it from both paths.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with core/api_server/routes/scan_state_routes.py:153-168 to understand how terminal choices are consumed, then locate the MCP session(action="resume") handler and compare its flow. Verify that ABORT, ACCEPT_PARTIAL, FORCE_COMPLETE, and COMPLETE through MCP terminate the scan rather than returning it to running or re-firing the HIR.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.