co-mono/packages
Ahmed Kamal 1167e84453
Fix expired OAuth tokens in long-running agent loops (#223)
Add getApiKey hook to AgentLoopConfig that resolves API keys dynamically
before each LLM call. This allows short-lived OAuth tokens (e.g. GitHub
Copilot, Anthropic OAuth) to be refreshed between turns when tool
execution takes a long time.

Previously, the API key was resolved once when ProviderTransport.run()
was called and passed as a static string to the agent loop. If the loop
ran for longer than the token lifetime (e.g. 30 minutes for Copilot),
subsequent LLM calls would fail with expired token errors.

Changes:
- Add getApiKey hook to AgentLoopConfig (packages/ai)
- Call getApiKey before each LLM call in streamAssistantResponse
- Update ProviderTransport to pass getApiKey instead of static apiKey
- Update web-ui ProviderTransport with same pattern
2025-12-19 01:36:25 +01:00
..
agent Fix expired OAuth tokens in long-running agent loops (#223) 2025-12-19 01:36:25 +01:00
ai Fix expired OAuth tokens in long-running agent loops (#223) 2025-12-19 01:36:25 +01:00
coding-agent Merge kitty-protocol-support into main 2025-12-19 01:21:47 +01:00
mom Skills standard compliance 2025-12-19 00:11:39 +01:00
pods Release v0.23.4 2025-12-18 16:56:50 +01:00
proxy Release v0.23.4 2025-12-18 16:56:50 +01:00
tui Merge kitty-protocol-support into main 2025-12-19 01:21:47 +01:00
web-ui Fix expired OAuth tokens in long-running agent loops (#223) 2025-12-19 01:36:25 +01:00