Skip to content

fix: add missing run_context parameter to pre-hooks and post-hooks reference#520

Open
emanuel-braz wants to merge 1 commit intoagno-agi:mainfrom
emanuel-braz:fix/add-missing-run-context-to-hooks-reference
Open

fix: add missing run_context parameter to pre-hooks and post-hooks reference#520
emanuel-braz wants to merge 1 commit intoagno-agi:mainfrom
emanuel-braz:fix/add-missing-run-context-to-hooks-reference

Conversation

@emanuel-braz
Copy link

Description

The reference pages for pre-hooks and post-hooks listed session_state, dependencies, and metadata as directly injectable parameters, but the SDK never injects them. These values are only accessible via run_context.session_state, run_context.dependencies, and run_context.metadata.

Additionally, run_context (which is actually injected) was missing from both parameter tables.

This fix removes the three incorrect parameters and adds run_context with a link to the Run Context reference, aligning the reference pages with:

Verified against SDK v2.5.0 (commit ddd1292) and current main.

Files changed

  • reference/hooks/pre-hooks.mdx - Removed session_state, dependencies, metadata; added run_context
  • reference/hooks/post-hooks.mdx - Removed session_state, dependencies, metadata; added run_context

Type of Change

  • Bug fix (errors, broken links, outdated info)
  • New content
  • Content improvement
  • Other: ____

Related Issues/PRs (if applicable)

Checklist

  • Content is accurate and up-to-date
  • All links tested and working
  • Code examples verified (if applicable)
  • Spelling and grammar checked
  • Screenshots updated (if applicable)

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

Comments