Skip to content

ENHANCEMENT: Add maxTurns safety limit to frontmatter #10

@ali5ter

Description

@ali5ter

Motivation

The agent has no maxTurns limit. An unbounded session could:

  • Run indefinitely without natural checkpoints
  • Accumulate a very large context window that degrades response quality
  • Consume significant tokens on a single session without the user noticing

The Claude Code subagent spec supports a maxTurns frontmatter field.

Proposed Change

Add a maxTurns value to coach.md frontmatter. A coaching session should be time-boxed — a reasonable limit might be:

maxTurns: 40

40 turns allows a substantive session (roughly 20 human + 20 agent turns) while creating a natural checkpoint. When the limit is reached the agent should (if possible) trigger session wrap-up behaviour (see #8).

Considerations

  • The right value depends on typical session length; 40 is a starting point for discussion
  • This could also help prevent accidental runaway sessions if the user leaves a session open
  • Should be documented in README as a session length guideline

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions