Short version:I tried to get my Claude Cowork agents to self-report their status to a dashboard. They wouldn't. The fix was using Cowork's hook system to monitor them at the infrastructure level, bypassing agent judgment entirely.
Happy to answer questions about the setup. I'm still unsure about the right task counter threshold for restarting sessions. Also, I'm trying to find a way to get the agents to indicate on my dashboard when they're "stuck" and waiting for something like access approval. The Claude Desktop app clearly knows when this happens (indicates it with a blue circle) but I haven't found a way to get the information into my dashboard.
sarkarsh•1h ago
Your phases mirror almost exactly what I went through. The core realization is right: you can't treat status reporting as an instruction because the agent will always deprioritize process in favor of its assigned persona.
What worked for me was making state updates part of the tool interface, not the prompt. Instead of 'report your status to this file,' the agent reads and writes to structured blocks (task tables, key-value state stores, append-only logs) through MCP as part of doing its actual work. The state update IS the work - when the agent completes a task, the tool call that marks it done also captures what it did, what it assumed, and what it skipped. The human sees a live dashboard without the agent needing to 'report' separately.
I've been using ctlsurf for this - each agent gets a task table it queries and updates through MCP tool calls. The key shift was: agents don't report status, they work inside a system that inherently tracks status.
On your task counter threshold question - I track session token usage in a state block and restart when the agent crosses ~80% of the context window. More reliable than counting tasks since some tasks eat way more context than others.
kaylamathisen•56m ago
Using this approach, it sounds like you'd be able to tell when an agent gets stuck because it needs approval or times out. Is that right? And I assume you're using Claude Code? I'm wondering if I can make this approach work for Cowork (I don't think we can create custom MCP tools yet) or if I have to finally abandon it.
_wire_•45m ago
But who monitors the monitor?!
kaylamathisen•16m ago
Unfortunately, me. Let me know if you think of an alternative, would love to outsource keeping my eyes open.
kaylamathisen•2h ago
Happy to answer questions about the setup. I'm still unsure about the right task counter threshold for restarting sessions. Also, I'm trying to find a way to get the agents to indicate on my dashboard when they're "stuck" and waiting for something like access approval. The Claude Desktop app clearly knows when this happens (indicates it with a blue circle) but I haven't found a way to get the information into my dashboard.
sarkarsh•1h ago
What worked for me was making state updates part of the tool interface, not the prompt. Instead of 'report your status to this file,' the agent reads and writes to structured blocks (task tables, key-value state stores, append-only logs) through MCP as part of doing its actual work. The state update IS the work - when the agent completes a task, the tool call that marks it done also captures what it did, what it assumed, and what it skipped. The human sees a live dashboard without the agent needing to 'report' separately.
I've been using ctlsurf for this - each agent gets a task table it queries and updates through MCP tool calls. The key shift was: agents don't report status, they work inside a system that inherently tracks status.
On your task counter threshold question - I track session token usage in a state block and restart when the agent crosses ~80% of the context window. More reliable than counting tasks since some tasks eat way more context than others.
kaylamathisen•56m ago