Skip to content

feat(config): expose max_session_seconds in workflow YAML#31

Merged
jrob5756 merged 1 commit intomainfrom
feature/expose-max-session-seconds-in-yaml
Mar 9, 2026
Merged

feat(config): expose max_session_seconds in workflow YAML#31
jrob5756 merged 1 commit intomainfrom
feature/expose-max-session-seconds-in-yaml

Conversation

@jrob5756
Copy link
Copy Markdown
Collaborator

@jrob5756 jrob5756 commented Mar 9, 2026

Summary

  • Add max_session_seconds field to RuntimeConfig (workflow-level default) and AgentDef (per-agent override) with ge=1.0 validation
  • Plumb through factory.pyIdleRecoveryConfig and registry.pycreate_provider()
  • Per-agent override resolves at call time in _execute_sdk_call()_send_and_wait()_wait_with_idle_detection(), same pattern as agent.model
  • Script agents reject max_session_seconds (validation error)
  • 14 new tests across test_schema.py, test_factory.py, and test_idle_recovery.py

Closes #28

Test plan

  • TestRuntimeConfigMaxSessionSeconds — default None, valid values, boundary (ge=1.0), serialization
  • TestAgentDefMaxSessionSeconds — default None, valid values, boundary, rejected on script agents
  • TestMaxSessionSeconds (factory) — flows to IdleRecoveryConfig, default preserved, other fields unchanged
  • TestPerAgentMaxSessionSeconds — override uses shorter timeout, None falls back to config, idle detection unaffected
  • Updated TestConfigPassing in test_registry.py for new kwarg
  • Full suite: 1663 passed, 0 failed
  • make check (ruff lint + format + ty typecheck) all pass

🤖 Generated with Claude Code

Allow workflow authors to tune the Copilot SDK session wall-clock
timeout per-workflow (runtime.max_session_seconds) and per-agent
(agent.max_session_seconds), instead of being locked to the hardcoded
1800s default. Per-agent values override the workflow-level default
at call time, following the same pattern as agent.model.

Closes #28

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jrob5756 jrob5756 merged commit 665fe39 into main Mar 9, 2026
7 checks passed
@jrob5756 jrob5756 deleted the feature/expose-max-session-seconds-in-yaml branch March 9, 2026 14:02
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.

Expose max_session_seconds in workflow YAML and add permission-denied fast-fail

1 participant