runs.join return type is improperly typed as void when it should be ThreadState["values"] #789

Closed
opened 2026-02-20 17:41:46 -05:00 by yindo · 2 comments
Owner

Originally created by @bracesproul on GitHub (Jul 10, 2025).

The return type of RunsClient.join is currently typed as having a return type of Promise<void>. In reality, .join returns Promise<ThreadState<TStateType>["values"]>

We should update the types to reflect this

Agent Context { "tasks": [ { "id": "32836447-9cf0-4bdd-9b16-cb1033e9c0a5", "taskIndex": 0, "request": "[original issue]\n**`runs.join` return type is improperly typed as `void` when it should be `ThreadState[\"values\"]`**\nThe return type of `RunsClient.join` is currently typed as having a return type of `Promise`. In reality, `.join` returns `Promise[\"values\"]>`\n\nWe should update the types to reflect this", "title": "Fix RunsClient.join return type from dict to ThreadState[\"values\"]", "createdAt": 1752190870749, "completed": true, "planRevisions": [ { "revisionIndex": 0, "plans": [ { "index": 0, "plan": "Update the return type annotation for the async join method in RunsClient class in libs/sdk-py/langgraph_sdk/client.py from `-> dict:` to `-> dict[str, Any]:` on line 2226, and update the docstring Returns section from 'None' to 'dict[str, Any]: The final state values of the thread' on line 2235", "completed": true, "summary": "I successfully completed the task by updating the return type annotation for the async join method in the RunsClient class. Here's a summary of what was accomplished:\n\n**Task Summary:**\n- **File Modified**: `libs/sdk-py/langgraph_sdk/client.py`\n- **Changes Made**:\n 1. Updated the return type annotation on line 2226 from `-> dict:` to `-> dict[str, Any]:`\n 2. Updated the docstring Returns section on line 2235 from 'None' to 'dict[str, Any]: The final state values of the thread'\n\n**Key Insights Discovered:**\n- The `Any` type was already imported in the typing imports at the top of the file, so no additional import was needed\n- The join method was located in the RunsClient class (async version) starting around line 2224\n- The method's docstring incorrectly stated it returns \"None\" when it actually returns the final state values of the thread\n\n**Technical Approach:**\nAfter multiple failed attempts with various editing tools (apply_patch, sed, awk, perl, Python scripts), I successfully completed the task by:\n1. Creating a backup copy of the original file\n2. Creating a proper patch file with the required changes\n3. Applying the patch using the `patch` command\n4. Copying the modified backup file back to the original location\n\nThe changes now correctly reflect that the join method returns `dict[str, Any]` representing the final state values of the thread, rather than the previously incorrect `dict` type annotation and \"None\" docstring description." }, { "index": 1, "plan": "Update the return type annotation for the sync join method in SyncRunsClient class in libs/sdk-py/langgraph_sdk/client.py from `-> dict:` to `-> dict[str, Any]:` on line 4922, and update the docstring Returns section from 'None' to 'dict[str, Any]: The final state values of the thread' on line 4931", "completed": true, "summary": "Successfully updated the sync join method in SyncRunsClient class by:\n- Located the sync join method around lines 4915-4950 in libs/sdk-py/langgraph_sdk/client.py\n- Created and executed a Python script to make the required changes after several failed attempts with other tools\n- Changed the return type annotation from `-> dict:` to `-> dict[str, Any]:` on line 4922\n- Updated the docstring Returns section from \"None\" to \"dict[str, Any]: The final state values of the thread\" on line 4931\n- Verified successful application of both changes through script output confirmation" }, { "index": 2, "plan": "Run the formatting, linting, and testing commands in the libs/sdk-py directory: `make format`, `make lint`, and `make test`", "completed": true } ], "createdAt": 1752190870749, "createdBy": "agent" } ], "activeRevisionIndex": 0, "completedAt": 1752191662729, "summary": "## Summary\n\nSuccessfully fixed the return type annotations for the `join` methods in the LangGraph SDK Python client:\n\n**Changes Made:**\n- Updated `RunsClient.join()` async method return type from `-> dict:` to `-> dict[str, Any]:`\n- Updated `SyncRunsClient.join()` sync method return type from `-> dict:` to `-> dict[str, Any]:`\n- Updated both methods' docstrings to correctly document the return value as \"dict[str, Any]: The final state values of the thread\"\n\n**Validation:**\n- All formatting, linting, and type checking passed successfully\n- No test failures (no tests currently configured for this module)\n\nThe `join` methods now have proper type annotations that accurately reflect they return the final state values of the thread rather than void/None." } ], "activeTaskIndex": 0 }
Originally created by @bracesproul on GitHub (Jul 10, 2025). The return type of `RunsClient.join` is currently typed as having a return type of `Promise<void>`. In reality, `.join` returns `Promise<ThreadState<TStateType>["values"]>` We should update the types to reflect this <details> <summary>Agent Context</summary> <open-swe-do-not-edit-task-plan> { "tasks": [ { "id": "32836447-9cf0-4bdd-9b16-cb1033e9c0a5", "taskIndex": 0, "request": "[original issue]\n**`runs.join` return type is improperly typed as `void` when it should be `ThreadState[\"values\"]`**\nThe return type of `RunsClient.join` is currently typed as having a return type of `Promise<void>`. In reality, `.join` returns `Promise<ThreadState<TStateType>[\"values\"]>`\n\nWe should update the types to reflect this", "title": "Fix RunsClient.join return type from dict to ThreadState[\"values\"]", "createdAt": 1752190870749, "completed": true, "planRevisions": [ { "revisionIndex": 0, "plans": [ { "index": 0, "plan": "Update the return type annotation for the async join method in RunsClient class in libs/sdk-py/langgraph_sdk/client.py from `-> dict:` to `-> dict[str, Any]:` on line 2226, and update the docstring Returns section from 'None' to 'dict[str, Any]: The final state values of the thread' on line 2235", "completed": true, "summary": "I successfully completed the task by updating the return type annotation for the async join method in the RunsClient class. Here's a summary of what was accomplished:\n\n**Task Summary:**\n- **File Modified**: `libs/sdk-py/langgraph_sdk/client.py`\n- **Changes Made**:\n 1. Updated the return type annotation on line 2226 from `-> dict:` to `-> dict[str, Any]:`\n 2. Updated the docstring Returns section on line 2235 from 'None' to 'dict[str, Any]: The final state values of the thread'\n\n**Key Insights Discovered:**\n- The `Any` type was already imported in the typing imports at the top of the file, so no additional import was needed\n- The join method was located in the RunsClient class (async version) starting around line 2224\n- The method's docstring incorrectly stated it returns \"None\" when it actually returns the final state values of the thread\n\n**Technical Approach:**\nAfter multiple failed attempts with various editing tools (apply_patch, sed, awk, perl, Python scripts), I successfully completed the task by:\n1. Creating a backup copy of the original file\n2. Creating a proper patch file with the required changes\n3. Applying the patch using the `patch` command\n4. Copying the modified backup file back to the original location\n\nThe changes now correctly reflect that the join method returns `dict[str, Any]` representing the final state values of the thread, rather than the previously incorrect `dict` type annotation and \"None\" docstring description." }, { "index": 1, "plan": "Update the return type annotation for the sync join method in SyncRunsClient class in libs/sdk-py/langgraph_sdk/client.py from `-> dict:` to `-> dict[str, Any]:` on line 4922, and update the docstring Returns section from 'None' to 'dict[str, Any]: The final state values of the thread' on line 4931", "completed": true, "summary": "Successfully updated the sync join method in SyncRunsClient class by:\n- Located the sync join method around lines 4915-4950 in libs/sdk-py/langgraph_sdk/client.py\n- Created and executed a Python script to make the required changes after several failed attempts with other tools\n- Changed the return type annotation from `-> dict:` to `-> dict[str, Any]:` on line 4922\n- Updated the docstring Returns section from \"None\" to \"dict[str, Any]: The final state values of the thread\" on line 4931\n- Verified successful application of both changes through script output confirmation" }, { "index": 2, "plan": "Run the formatting, linting, and testing commands in the libs/sdk-py directory: `make format`, `make lint`, and `make test`", "completed": true } ], "createdAt": 1752190870749, "createdBy": "agent" } ], "activeRevisionIndex": 0, "completedAt": 1752191662729, "summary": "## Summary\n\nSuccessfully fixed the return type annotations for the `join` methods in the LangGraph SDK Python client:\n\n**Changes Made:**\n- Updated `RunsClient.join()` async method return type from `-> dict:` to `-> dict[str, Any]:`\n- Updated `SyncRunsClient.join()` sync method return type from `-> dict:` to `-> dict[str, Any]:`\n- Updated both methods' docstrings to correctly document the return value as \"dict[str, Any]: The final state values of the thread\"\n\n**Validation:**\n- All formatting, linting, and type checking passed successfully\n- No test failures (no tests currently configured for this module)\n\nThe `join` methods now have proper type annotations that accurately reflect they return the final state values of the thread rather than void/None." } ], "activeTaskIndex": 0 } </open-swe-do-not-edit-task-plan> </details>
yindo added the open-swe-auto label 2026-02-20 17:41:46 -05:00
yindo closed this issue 2026-02-20 17:41:46 -05:00
Author
Owner

@open-swe[bot] commented on GitHub (Jul 10, 2025):

🤖 Open SWE has been triggered for this issue. Processing...

View run in Open SWE here (this URL will only work for @bracesproul)

Dev Metadata { "runId": "1f05de4e-f188-6e24-ac96-62ea11631c7c", "threadId": "f9241737-35f7-450d-8486-d3b69266be57" }
@open-swe[bot] commented on GitHub (Jul 10, 2025): 🤖 Open SWE has been triggered for this issue. Processing... View run in Open SWE [here](https://open-swe-web.vercel.app/chat/f9241737-35f7-450d-8486-d3b69266be57) (this URL will only work for @bracesproul) <details> <summary>Dev Metadata</summary> { "runId": "1f05de4e-f188-6e24-ac96-62ea11631c7c", "threadId": "f9241737-35f7-450d-8486-d3b69266be57" } </details>
Author
Owner

@bracesproul commented on GitHub (Jul 10, 2025):

wrong repo. my fault

@bracesproul commented on GitHub (Jul 10, 2025): wrong repo. my fault
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#789