Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Remove timeout requirement for strict mode and set default timeout to 20 minutes

Based on the problem statement, I have successfully completed:

  • Understand the current strict mode implementation
  • Remove timeout requirement from strict mode validation
  • Update strict mode validation function to skip timeout check
  • Update tests that verify timeout requirement in strict mode
  • Update documentation in docs/src/content/docs/reference/frontmatter.md to remove timeout requirement
  • Update documentation in docs/src/content/docs/guides/security.md to remove timeout requirement
  • Review workflow files - timeouts are kept for operational reasons (cost control)
  • Run tests to ensure changes work correctly
  • Run code review and address any issues
  • Run make agent-finish for final validation
  • Set default timeout to 20 minutes for agentic workflows
  • Move default timeout to constant in constants.go

Changes Made:

Code Changes:

  • Removed validateStrictTimeout() function call from validateStrictMode() in pkg/workflow/strict_mode.go
  • Removed the entire validateStrictTimeout() function implementation (lines 36-82)
  • Updated tests in pkg/workflow/strict_mode_test.go:
    • TestStrictModeTimeout: Now tests that timeout is NOT required and is still valid when specified
    • TestStrictModeFromFrontmatter: Updated to expect success without timeout
    • TestStrictModeIsolation: Updated to expect success for strict workflow without timeout
    • TestCLIStrictFlagTakesPrecedence: Updated to test write permission error instead of timeout error

Default Timeout Changes (per user request):

  • Added DefaultAgenticWorkflowTimeoutMinutes constant to pkg/constants/constants.go (value: 20)
  • Updated pkg/workflow/tools.go: Changed to use constant instead of hardcoded value
  • Updated pkg/workflow/claude_engine.go: Changed to use constant instead of hardcoded value
  • Updated pkg/workflow/copilot_engine.go: Changed to use constant instead of hardcoded value

Documentation Changes:

  • Updated docs/src/content/docs/reference/frontmatter.md:

    • Removed "Timeout Required" from the list of strict mode requirements (requirement rejig docs #1)
    • Renumbered remaining requirements (1-4 instead of 2-5)
    • Removed timeout_minutes: 10 from the example strict mode workflow
    • Removed "Cost-sensitive workflows where timeout enforcement is critical" from use cases
    • Updated default timeout from 15 to 20 minutes
  • Updated docs/src/content/docs/guides/security.md:

    • Removed "Timeout Required" from strict mode enforcement list
    • Removed timeout_minutes: 10 from example
    • Removed "Cost Control" bullet from benefits section
    • Removed reference to "and timeouts" in one sentence

Workflow Files:

  • Reviewed all 20 .github/workflows/*.md files with strict mode
  • Left timeout_minutes in place where specified, as they serve operational cost control purposes (not just for strict mode compliance)

Testing & Validation:

  • ✅ All strict mode tests pass (6 test functions with multiple subtests)
  • ✅ All unit tests pass (7.1s)
  • ✅ All integration tests pass
  • ✅ Code formatting validated (make fmt)
  • ✅ Linter passes with no issues (golangci-lint)
  • ✅ Build successful
  • ✅ Verified default timeout is 20 minutes when not specified
  • ✅ Verified constant is properly used across all files
  • ✅ No breaking changes to existing functionality

Summary:

  • timeout_minutes is now optional in strict mode workflows, though it can still be specified for operational cost control purposes
  • Default timeout increased from 5 minutes to 20 minutes for agentic workflows when not explicitly specified
  • Default timeout value is now centralized in a constant for easier maintenance
Original prompt

Remove timeout requirement for the scrict mode.
Review documentation that use timeout in frontmatter and remove it if not necessary.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove timeout requirement for strict mode Remove timeout requirement for strict mode Oct 10, 2025
Copilot AI requested a review from pelikhan October 10, 2025 01:09
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

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

@copilot set a default timeout of 20min for Agentic workflows

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 10, 2025

@copilot set a default timeout of 20min for Agentic workflows

Done! Updated the default timeout to 20 minutes for agentic workflows in commit 5c4e5dc.

The changes were made in three places:

  • pkg/workflow/tools.go - Sets the default when not specified in frontmatter
  • pkg/workflow/claude_engine.go - Step-level timeout for Claude engine
  • pkg/workflow/copilot_engine.go - Step-level timeout for Copilot engine

Documentation updated to reflect the new 20-minute default.

Copilot AI changed the title Remove timeout requirement for strict mode Remove timeout requirement for strict mode and set default timeout to 20 minutes Oct 10, 2025
Copilot AI requested a review from pelikhan October 10, 2025 03:19
@pelikhan
Copy link
Contributor

@copilot move default timeout to a constant in constants.go and use it instead of literal numbers in the .go compiler

@pelikhan pelikhan marked this pull request as ready for review October 10, 2025 03:29
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 10, 2025

@copilot move default timeout to a constant in constants.go and use it instead of literal numbers in the .go compiler

Done! Moved the default timeout to a constant in commit d8f9e3a.

Added DefaultAgenticWorkflowTimeoutMinutes = 20 to pkg/constants/constants.go and updated all three locations to use the constant:

  • pkg/workflow/tools.go
  • pkg/workflow/claude_engine.go
  • pkg/workflow/copilot_engine.go

@github-actions
Copy link
Contributor

Agentic Changeset Generator triggered by this pull request

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

Co-Authored-By: Claude <noreply@anthropic.com>
@pelikhan pelikhan merged commit a512f14 into main Oct 10, 2025
@pelikhan pelikhan deleted the copilot/remove-timeout-requirement branch October 10, 2025 03:33
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