Skip to content

Conversation

@xingdi-eric-yuan
Copy link
Collaborator

@xingdi-eric-yuan xingdi-eric-yuan commented Dec 19, 2025

This PR adds timeout handling to prevent agents from hanging:

  • Azure OpenAI timeout - Set 5-minute timeout on AOAI client to prevent CLOSE_WAIT connection hangs (now raises and will be retried)
  • Command timeout - Add configurable command_timeout (default: 300s) to all terminal implementations (Docker, Kubernetes, Local) to kill blocking commands like serve_forever() or infinite loops

E.g.,

terminal:
  type: docker
  command_timeout: 300  # 5 min per command

xingdi-eric-yuan and others added 4 commits December 19, 2025 12:45
Use shlex.quote() instead of Python repr for proper shell escaping when
wrapping commands with timeout. This fixes syntax errors when commands
contain special characters like parentheses (e.g., in git apply patches).

Also update test_eval_timeout to expect the new timeout message format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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