Skip to content

Conversation

ak684
Copy link
Contributor

@ak684 ak684 commented Sep 26, 2025

Currently our SaaS resume conversation flow does not work for conversations with repositories. Logs show that we are populating ProviderTokens with empty values and eventually that leads to pods receiving empty provider dictionaries and raising errors because they cannot access repos. This is a potential code fix to:

  • Add Depends(get_provider_tokens) to /conversations/{id}/start endpoint
  • Override empty tokens with real provider tokens
  • Fix 'Unable to access repo' error on conversation resume

It'd also be nice to clear out the empty provider token code that is not doing anything in this flow and add logs to alert on. For clarity, I'm leaving that out of this draft pr until the approach is reviewed and given a thumbs up to proceed.

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions.


Link of any specific issues this addresses:


To run this PR locally, use the following command:

GUI with Docker:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:8e3078a-nikolaik   --name openhands-app-8e3078a   docker.all-hands.dev/all-hands-ai/openhands:8e3078a

CLI with uvx:

uvx --python 3.12 --from git+https://github.com/All-Hands-AI/OpenHands@alona/fix-resume-provider-tokens openhands

- Add Depends(get_provider_tokens) to /conversations/{id}/start endpoint
- Override empty tokens with real provider tokens
- Fixes 'Unable to access repo' error on conversation resume
Copy link

openhands-ai bot commented Sep 26, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Python Tests

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #11155 at branch `alona/fix-resume-provider-tokens`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Comment on lines +509 to +510
if provider_tokens:
conversation_init_data.git_provider_tokens = provider_tokens
Copy link
Contributor

@malhotra5 malhotra5 Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to param providers_set if we already have the actual provider tokens?

I think they should always exists in saas?

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