main_agent — Claude Code prompt: what it does and how to install
This Claude Code prompt delegates visual observation while leaving physical actions and task completion to the main agent. The main agent checks observation evidence before making a decision that depends on it.
MIT ★ 488 updated 2026-11-15
.claude/commands/main_agent.mdWhat main_agent does
The prompt assigns an observer one focused visual question, along with task context and a condition for stopping. The main agent passes along the observer instructions, then reads results through get_latest_insight or read_insight_updates and tracks which insights it has consumed.
Before acting on an observation, the main agent checks its snapshot version, freshness, findings and uncertainty. A snapshot from an unfinished action does not establish that the action has finished, and evidence captured before an action cannot confirm its effect. If evidence is missing or calibrated geometry is needed, the prompt calls for view_env_state or capture_scene. The observer does not control physical actions or decide when the task is complete.
What it helps with
- delegate a focused visual question to an observer
- check observation freshness before a dependent decision
- avoid treating a snapshot from an unfinished action as proof of completion
- keep physical control and the final task decision with the main agent
Example prompts for the agent
- Check the scene for a visible change in the object’s position and report whether it is clear.
- Compare the latest observation with the earlier one and describe the visible changes.
- Review the visual evidence before the next action; request a new snapshot if the evidence is unclear.
How to install main_agent
Manually: put the files in place
.claude/commands/main_agent.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about main_agent
How do I install main_agent in Claude Code?
Save the prompt as .claude/commands/main_agent.md.
What does main_agent do?
It sets out how to delegate a visual question and inspect the resulting evidence. The main agent remains responsible for physical actions and task completion.
What can the observer handle?
It can handle a specific visual question. Physical control, metric geometry derivation and the completion decision stay with the main agent.
Source text
main_agent.md · MIT
# Observation Sidecar The observation profile shares versioned snapshots and visual insights. The main agent retains responsibility for geometry, physical actions, recovery and the final task decision. When delegation is available and useful, assign one concrete visual question. Supply the task context, a distinct observer_id, an optional baseline observation_id, a visually decidable stopping condition and the injected observation_subagent_instructions block. Forward that block with the assignment; it describes the observer's role, not yours. Delegate observation only, without physical control, metric geometry derivation or finish. Read get_latest_insight or read_insight_updates, tracking the last consumed insight_seq per observer and advancing the returned cursor. Lifecycle messages do not replace an insight tied to observation_id and world_version. Continue independent work, then read relevant evidence before a dependent decision. Check the insight's source snapshot/state version, freshness, facts, changes, risks and uncertainty against the action being assessed. Published snapshots can come from completed primitives within an unfinished high-level action; in_flight does not prove that action has completed. A fresh tag alone does not prove the desired effect. Evidence from before an action cannot verify its effect. Use view_env_state or capture_scene when evidence is missing, ambiguous or too old, or calibrated geometry is needed. Avoid repeating a resolved visual check unless the scene changed. End the assignment once its question is resolved; the main agent retains the completion decision and calls finish.
© Open-RUA · MIT · Open-RUA/uni-robot-agent