Skip to content

refactor(agents): one helper names the tool that ends an agent's run - #1790

Closed
ian-at-strix wants to merge 1 commit into
feat/select-toolsfrom
refactor/lifecycle-table
Closed

ian-at-strix wants to merge 1 commit into
feat/select-toolsfrom
refactor/lifecycle-table

Conversation

@ian-at-strix

@ian-at-strix ian-at-strix commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1788. No behavior change. The wrap-up directives and the recovery nudge share finish_tool_name(context) (root or sub-agent); _append_tool_required_message loses its root_finish_tool parameter.

@arcanist

arcanist Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Ready to merge Re-run Arcanist review

PR summary

Wrap-up directives and recovery nudges previously chose the applicable finish tool in separate code. They now share one helper that preserves root and sub-agent tool selection, with no user-facing behavior change.

Review history (3)
  • Ready to merge
  • Ready to merge
  • Ready to merge (this review)
✅ Ruled out (2)
  • Could a sub-agent be told to finish with the root tool?
    No, a context with a parent selects the sub-agent finish tool before any coordinator lookup, preserving the existing selection.
  • Could recovery stop naming the configured root finish tool?
    No, the root runner stores the same coordinator in the context that recovery now reads, so the configured root finish tool still reaches the nudge.

@ian-at-strix
ian-at-strix added this pull request to stack #1789 November 19, 2026 16:19
@ian-at-strix ian-at-strix changed the title refactor(agents): look up root finish tools' completion keys in a table refactor(agents): finish-tool lookups Nov 19, 2026
@ian-at-strix
ian-at-strix force-pushed the refactor/lifecycle-table branch from 1f27aab to 80e2e49 Compare November 19, 2026 16:25
@ian-at-strix ian-at-strix changed the title refactor(agents): finish-tool lookups refactor(agents): one helper names the tool that ends an agent's run Nov 19, 2026
@ian-at-strix
ian-at-strix marked this pull request as ready for review November 19, 2026 16:37
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issues were found.

Summary

This refactor shares finish-tool naming between wrap-up warnings and recovery messages without changing the supported run paths.

  • One helper picks the tool name for agent wrap-up messages.

No actionable issues found.

Reviews (2) · Last reviewed commit: "refactor(agents): one helper names the t..." · Reviewed by Greptile

@ian-at-strix

Copy link
Copy Markdown
Contributor Author

Folded into #1787.

@ian-at-strix
ian-at-strix removed this pull request from stack #1789 November 19, 2026 17:11
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