Skip to content

feat: pass plan metadata in question event for plugin access - #9864

Closed
backnotprop wants to merge 1 commit into
anomalyco:devfrom
backnotprop:feat/question-metadata-for-plugins
Closed

backnotprop wants to merge 1 commit into
anomalyco:devfrom
backnotprop:feat/question-metadata-for-plugins

Conversation

@backnotprop

@backnotprop backnotprop commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #9865

Summary

When plan_exit is called, plugins listening to the question.asked event now receive the plan content and path via a new metadata field. This enables plugins to intercept the plan approval dialog and show custom UI for plan review.

Changes

  • Add optional metadata field to QuestionRequest schema
  • Update Question.ask() to accept and pass through metadata
  • plan_exit tool includes planPath, planRelativePath, and planContent in metadata

Example Plugin Usage

event: async ({ event }) => {
  if (event.type !== "question.asked") return
  if (event.properties.questions?.[0]?.header !== "Build Agent") return

  const { planPath, planContent } = event.properties.metadata ?? {}
  if (planContent) {
    // Show custom plan review UI
  }
}

Breaking Changes

None - metadata is optional and existing code is unaffected.

When plan_exit is called, plugins listening to question.asked event now
receive plan content and path via a new metadata field. This enables
plugins to intercept the plan approval dialog and show custom UI.

- Add optional metadata field to QuestionRequest schema
- Update Question.ask() to accept and pass through metadata
- plan_exit tool includes planPath, planRelativePath, and planContent
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@backnotprop

Copy link
Copy Markdown
Contributor Author

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Here: #9865

@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Mar 23, 2026
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.

feat: expose plan metadata to plugins via question.asked event

1 participant