FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add receive_timeout parameter to Connection class by birdg0 · Pull Request #84 · agentclientprotocol/python-sdk · GitHub

feat: add receive_timeout parameter to Connection class - #84

Merged
PsiACE merged 1 commit into
agentclientprotocol:mainfrom
birdg0:feat-add-receive-timeout
May 7, 2026
Merged

feat: add receive_timeout parameter to Connection class#84
PsiACE merged 1 commit into
agentclientprotocol:mainfrom
birdg0:feat-add-receive-timeout

Conversation

birdg0 commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds receive_timeout parameter to Connection class to prevent indefinite hangs when agents become unresponsive.

Related issues

None

Testing

Ran the following checks:

make check

Output:

  • ✓ Lock file consistency check passed
  • ✓ All pre-commit hooks passed (case conflicts, merge conflicts, toml, yaml, json, formatting, ruff check/format)
  • ✓ Static type checking passed (ty)
  • ✓ No dependency issues (deptry)
make test

Output:

  • ✓ 102 tests passed, 1 skipped in 1.39s
  • All existing tests continue to pass with the new optional parameter

Docs & screenshots

No documentation updates included in this PR. The parameter is optional and defaults to None, preserving existing behavior. Documentation can be added in a follow-up PR if needed.

Checklist

  • Conventional Commit title (e.g. feat:, fix:).
  • Tests cover the change or are not required (explain above).
  • Docs/examples updated when behaviour is user-facing.
  • Schema regenerations (make gen-all) are called out if applicable.

PsiACE commented May 7, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

- Add optional receive_timeout parameter to Connection.__init__
- Implement timeout handling in _receive_loop using asyncio.wait_for
- Raise RequestError.internal_error on timeout for graceful error handling

This allows users to configure a timeout for receiving messages from
agents, preventing indefinite hangs when an agent becomes unresponsive.
PsiACE force-pushed the feat-add-receive-timeout branch from af5eae4 to 3cfbcb9 Compare May 7, 2026 19:07

PsiACE commented May 7, 2026

Copy link
Copy Markdown
Member

lgtm, thanks

PsiACE merged commit c864d7d into agentclientprotocol:main May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL