Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions libs/code/deepagents_code/_cli_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class CLIContextSchema:

model_context_limit: int | None = None

approval_mode: str = "manual"

auto_approve: bool = False

approval_mode_key: str | None = None
Expand Down Expand Up @@ -73,14 +75,11 @@ class CLIContext(TypedDict, total=False):
model_context_limit: int | None
"""Effective context-window limit for profile-aware middleware."""

auto_approve: bool
"""Whether gated tool calls should skip the human-approval interrupt.
approval_mode: str
"""`manual`, classifier-backed `auto`, or unrestricted `yolo`."""

Sourced from the client session (not graph state) so the model cannot
self-approve by writing state. The `interrupt_on` `when` predicate reads
this to suppress interrupts at the source when "approve always" is on,
avoiding the interrupt-then-auto-resolve round-trip.
"""
auto_approve: bool
"""Compatibility snapshot for clients predating the typed mode field."""

approval_mode_key: str | None
"""Store key for the live approval-mode control record.
Expand Down
Loading