Skip to content

⚙️ FEATURE: Graduated autonomy levels replacing binary dangerous=True/False #41

Description

@FernandoCelmer

Problem

pycodeloop tools use a binary dangerous: bool flag. This forces an all-or-nothing choice: either all dangerous tools require human confirmation, or none do. There is no way to allow low-risk mutations autonomously while still requiring approval for high-risk ones.

Expected behavior

codeloop = CodeLoop(config=Config(
    autonomy="safe_execute",  # allow reads + low-risk writes, require approval for high-risk
))

Policy table:

Level read execute_low_risk execute_high_risk
manual allow require_approval deny
safe_execute allow allow require_approval
full_project_loop allow allow allow

Suggested implementation

  • Add AutonomyLevel enum in pycodeloop/core/autonomy.py
  • Add operation: str class attribute to tools: "read", "execute_low_risk", "execute_high_risk"
  • Replace tool.dangerousconfirm check in Agent._execute() with gate(level, tool.operation) -> GateDecision
  • Add autonomy: str = "safe_execute" to Config
  • Record gate decisions in JSONL trace

References

  • "Code as Agent Harness" — arXiv 2605.18747, Section 3.1 (Harness interface)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededin progressIssue being actively worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions