Skip to content

feat: add opt-in completion nudge#729

Open
0xhis wants to merge 2 commits into
usestrix:mainfrom
0xhis:feat/completion-nudge
Open

feat: add opt-in completion nudge#729
0xhis wants to merge 2 commits into
usestrix:mainfrom
0xhis:feat/completion-nudge

Conversation

@0xhis

@0xhis 0xhis commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

--completion-nudge gives the root agent one more pass before it finalizes a scan.

Some models, especially OSS models like Hy3, can spot a promising lead and then finish the report before they really poke at it. With this flag, the first finish_scan becomes a draft. The same agent gets a single prompt to follow up on leads it found and check remaining untested areas. Its next valid report finishes the scan.

Details

  • Off by default.
  • Saved in run.json and preserved by --resume.
  • The coordinator records the nudge, so a resumed scan cannot receive it twice.
  • The first draft is not written as the final report.
  • The agent keeps its current session. It is not restarted or given a second user prompt.
  • The CLI and TUI show Completion nudged while the scan continues.

Tests

Added coverage for the flag, resume behavior, the one-time coordinator state, first and second finish_scan calls, invalid reports, active children, coordinator-less calls, and CLI/TUI rendering.

The focused feature and regression suite passed with 30 tests. Ruff and focused mypy/pyright checks also passed.

Live run

I ran it against OWASP Juice Shop with --completion-nudge.

The agent submitted its first report, got the nudge, and continued in the same session. It followed up on the leads it had left open, filed one more validated finding, then completed normally with 13 findings.

@0xhis
0xhis force-pushed the feat/completion-nudge branch from b6ee501 to 503a610 Compare July 10, 2026 22:05
@0xhis
0xhis marked this pull request as ready for review July 10, 2026 22:09
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds an opt-in completion nudge before accepting the final scan report. The main changes are:

  • New --completion-nudge CLI option and usage docs.
  • Run-record persistence and resume propagation for the option.
  • One-shot coordinator state for nudging only the root agent once.
  • Nonterminal finish_scan output that continues the same agent session.
  • CLI and TUI display states for the nudged draft report.
  • Tests for parsing, persistence, finish behavior, coordinator restore, and rendering.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The first valid root report stays nonterminal without writing final report state.
  • Resume and coordinator state preserve the one-shot nudge behavior.
  • The UI paths render the nudged state without exposing the draft as completed.

Important Files Changed

Filename Overview
strix/tools/finish/tool.py Adds validation reuse, one-shot completion-nudge handling, and the nonterminal finish result before normal finalization.
strix/core/agents.py Adds locked coordinator metadata for claiming the completion nudge once and snapshotting that state.
strix/core/runner.py Passes the persisted completion-nudge setting into the root agent context.
strix/interface/main.py Adds the CLI flag and persists or restores the option through run.json.
strix/interface/cli.py Propagates the option into headless scan config and prints a completion-nudged panel.
strix/interface/tui/app.py Propagates the option into interactive scan config.
strix/interface/tui/renderers/finish_renderer.py Separates pending, nudged, failed, and completed finish-render states so draft report text is not shown as final.
strix/report/state.py Persists the completion-nudge option and adds a callback hook for nudge notifications.

Reviews (1): Last reviewed commit: "docs: describe completion nudge" | Re-trigger Greptile

@0xhis
0xhis force-pushed the feat/completion-nudge branch 2 times, most recently from aa4b8ce to 99f7dc2 Compare July 10, 2026 22:18
@0xallam
0xallam force-pushed the main branch 3 times, most recently from 44e87ca to daf39a2 Compare July 13, 2026 23:50
@0xallam
0xallam force-pushed the feat/completion-nudge branch from 99f7dc2 to 6b97de2 Compare July 14, 2026 00:00
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.

1 participant