Fix browser agent stability: GPT-5 timeout guardrails and network capture cleanup#167
Merged
Merged
Conversation
added 3 commits
January 17, 2026 16:22
…system tools - Add debug logging to browser_task_tool.py to trace timeout issues: - Log agent configuration (max_failures, step_timeout, llm_timeout) before run - Log completion state (consecutive_failures, is_done, is_successful) after run - Warn when agent exits with 3+ consecutive failures - Remove duplicate file_read/file_write from browser_use_adapter.py: - Browser-use already provides built-in write_file, read_file, replace_file - Removed tempo-sec duplicates to avoid confusion - Shell tool can be used for Docker container file operations if needed
- Add _parse_env_int() helper with validation and warning for invalid values - Log when GPT-5 guardrails are applied for operational visibility - Document TEMPO_BROWSER_USE_* env vars in config.example.toml
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses browser agent stability issues, specifically GPT-5 model timeouts that were causing browser tasks to fail prematurely.
Changes
1. Remove broken
filter_typeparameter (745dd6f)filter_typeparameter fromget_network_requeststoolbrowser_base.txtprompt templatenetwork_capture.pyandbrowser_use_adapter.py2. Add GPT-5 timeout guardrails (7ec86d4)
TEMPO_BROWSER_USE_LLM_TIMEOUT: LLM response timeout (seconds)TEMPO_BROWSER_USE_MAX_FAILURES: Max consecutive failures before abortTEMPO_BROWSER_USE_MAX_HISTORY_ITEMS: Cap on conversation history itemsTEMPO_BROWSER_USE_MAX_COMPLETION_TOKENS: Max tokens for LLM response3. Add validation and documentation (1566156)
_parse_env_int()helper with input validation and clear warning messagesconfig.example.tomlTesting
Files Changed
tempo/agents/browser.py- Added stability settings with validationtempo/infra/browser_use_llm.py- Added max_completion_tokens supporttempo/tools/browser_task_tool.py- Removed debug loggingtempo/tools/network_capture.py- Removed filter_type parametertempo/tools/browser_use_adapter.py- Removed filter_type parametertempo/prompts/templates/browser_base.txt- Updated documentationconfig.example.toml- Documented new environment variables