Skip to content

docs(extensions): say when an error keeps its class - #994

Merged
ParidelPooya merged 1 commit into
mainfrom
docs/agentcore-session-error-class
Nov 25, 2026
Merged

ParidelPooya merged 1 commit into
mainfrom
docs/agentcore-session-error-class

Conversation

@ParidelPooya

Copy link
Copy Markdown
Contributor

What

The extensions README now says exactly when an agentcore_session error keeps its AgentCore class.

Why

  1. session.invoke can run in a child context that the handler created.
  2. The agentcore_session docstring says that an AgentCore error that crosses such a child context reaches the caller as ChildContextError, with its message but not its class.
  3. The README said that an AgentCore error that leaves the handler keeps its class. That is true only when the handler raises the error itself.

So the README and the docstring disagreed.

Change

One sentence in the agentcore_session section of packages/aws-durable-execution-sdk-python-extensions/README.md becomes two:

  1. An AgentCore error that the handler raises itself reaches the caller with its own class.
  2. An AgentCore error that crosses a child context that the handler created reaches the caller as ChildContextError, with its message but not its class.

No code change.

Testing

  1. Docs only. No test applies.
  2. Checked the wording against the agentcore_session docstring in compute/agentcore/session.py.
  3. .github/scripts/lintcommit.py --range origin/main..HEAD passes: 1 commit.

Closes #993
Part of #954

Twin item: aws/aws-durable-execution-sdk-js#1290

The README said that an AgentCore error that leaves the
agentcore_session handler keeps its class. That is true only when the
handler raises the error itself. An AgentCore error that crosses a
child context that the handler created reaches the caller as
ChildContextError, with its message but not its class.

So the README now states both cases, as the docstring does.
@ParidelPooya
ParidelPooya marked this pull request as ready for review November 25, 2026 18:13
@ParidelPooya
ParidelPooya deployed to ai-pr-review-runtime November 25, 2026 18:13 — with GitHub Actions Active
@ParidelPooya
ParidelPooya merged commit e4c302a into main Nov 25, 2026
33 checks passed
@ParidelPooya
ParidelPooya deleted the docs/agentcore-session-error-class branch November 25, 2026 18:13

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — dff0da25 Deployed Nov 25, 2026 by ParidelPooya via notify / Generate notification summary #506
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.

[AgentCore session] Say when a job error keeps its class

2 participants