ConnectOnionConnectOnion

ulw

Ultra Light Work — autonomous mode where the agent keeps working turn after turn without approval prompts, until it reaches a checkpoint.

Tell the agent to "just do it" — no approval prompts, no interruptions. Agent works until done or until the turn limit.

Usage

main.py
1from connectonion import Agent 2from connectonion.useful_plugins import tool_approval, ulw 3 4# ulw requires tool_approval to work 5agent = Agent("worker", plugins=[tool_approval, ulw], model="co/claude-opus-4-5")

ULW mode works by setting a skip_tool_approval flag that tells the tool_approval plugin to skip all checks.

Triggering ULW Mode

From the web UI

In co ai, use the mode selector to switch to ULW mode. The frontend sends:

code
1{ "type": "mode_change", "mode": "ulw", "turns": 10 }

Programmatically

main.py
1from connectonion.useful_plugins.ulw import handle_ulw_mode_change 2 3handle_ulw_mode_change(agent, turns=10) 4agent.input("Refactor all Python files to use type annotations")

Turn Checkpoints

When the agent reaches ulw_turns, it pauses and the frontend receives:

code
1{ "type": "ulw_turns_reached", "turns_used": 10, "max_turns": 10 }

The user can respond with:

{ "action": "continue", "turns": 10 }

Extend by N more turns and keep going

{ "action": "switch_mode", "mode": "safe" }

Return to safe mode (approval prompts back on)

Updating goal mid-session

Send a prompt_update message to steer the agent while it works:

code
1{ "type": "prompt_update", "prompt": "Focus on the authentication module" }

Injected into the system prompt before each LLM call. The agent remembers the updated goal for all subsequent turns.

Events used

EventHandlerPurpose
on_completeulw_keep_workingStart next turn if turns remain
before_iterationpoll_prompt_updateCheck for goal updates from frontend
before_llminject_ulw_promptInject current goal into system prompt

Enjoying ConnectOnion?

⭐ Star us on GitHub = ☕ Coffee chat with our founder. We love meeting builders.