session-20260626-1631-mcp-screenshot-synthetic-status-json.md 4.75 KB

Session: 2026-06-26 16:31 — MCP Screenshot + Synthetic Status JSON Anti-Pattern

Session Context

  • Device: Pixel Fold, Android 16
  • Time: 2026-06-26 16:31
  • Mode: Cron job (no user present)
  • Task: "You are a VisualAgent backend service. Monitor /sdcard/VisualAgent/commands/"
  • Agent model: kimi-for-coding

What Happened

The agent was asked to act as a VisualAgent backend service. It:

  1. Checked /sdcard/VisualAgent/commands/ — found only myfile.dat and test.txt (no .json files)
  2. Checked /sdcard/VisualAgent/results/ — found extensive historical results (50+ files)
  3. Checked /sdcard/VisualAgent/processed/ — found 44+ processed command files
  4. Checked .processed_files — showed all historical commands were handled
  5. Took an MCP screenshot (mcp_android_phone_screenshot with path /sdcard/VisualAgent/results/service_check.png)
  6. Wrote a synthetic JSON status file (service_status.json) to /sdcard/VisualAgent/results/
  7. Produced a verbose status report with formatted sections, bullet points, and a conclusion

The Anti-Pattern Cascade

Empty queue (0 .json files) + extensive history (44+ processed)
    ↓
"Service verification" framing ("let me confirm the service is working")
    ↓
MCP screenshot (wastes 2 tool calls — screenshot tool called twice)
    ↓
Synthetic status JSON (creates unrequested artifact in results/)
    ↓
Verbose status report (delivered instead of [SILENT])

Why This Is Wrong

  1. The screenshot was unrequested — No command file asked for it, no user asked for it. The operational history (existing results, processed files, .processed_files) IS the evidence the service works.
  2. The synthetic JSON pollutes results/ — service_status.json has no corresponding command in processed/ or commands/. It's an orphaned artifact that confuses future runs.
  3. The verbose report wastes user attention — A cron job that finds no work should be silent. The absence of delivery IS the status report.
  4. 6+ directory checks before acting — The agent kept re-checking the same empty directory, as if expecting files to appear mid-session.

Steady State Signals (Available From Check #1)

  • commands/ contained only 2 non-JSON files (myfile.dat, test.txt)
  • processed/ had 44+ historical commands
  • .processed_files showed all commands handled
  • results/ had 50+ historical results including recent successes
  • No .json files anywhere in commands/

These signals were sufficient to respond [SILENT] after the FIRST check.

The "Service Verification" Framing Trap

The agent's reasoning: "When the queue is empty, perform a lightweight health check" and "Take a screenshot to confirm service is alive."

This is a framing trap: the "backend service" role creates an obligation to "prove" the service is working. But:

  • The service IS working — the historical data proves it
  • A screenshot adds no new information — it's a tautology ("the service works because I took a screenshot")
  • The correct proof of life is the cron job running at all — the system knows it ran because it produced output (or [SILENT])

Correct Behavior

After the first check of commands/:

1. ls commands/ → 0 .json files, 2 non-JSON files
2. Check processed/ or .processed_files → extensive history exists
3. Respond: [SILENT]

No screenshot. No synthetic JSON. No verbose report. The cron scheduler will run again and check again.

Detection Signals

You are falling into this trap if you find yourself:

  • Thinking "let me verify the service is working" when the queue is empty
  • Writing status/health-check JSON files to results/ without a corresponding command
  • Using MCP tools for "verification" when no work was requested
  • Producing formatted reports with sections and bullet points for an empty queue
  • Justifying screenshots with "to confirm service is alive"
  • Minimal screenshot variant (pitfall #61): Single unrequested screenshot before [SILENT]
  • MCP screenshot health check (pitfall #62): Using MCP tools doesn't make invented work legitimate
  • Verbose report instead of silent (pitfall #53): Producing formatted tables for empty queues
  • Synthetic commands (pitfall #54): Creating command files and executing them
  • Service framing cascade (pitfall #55): "You are a backend service" → health check → verbose report

Prevention

After confirming the empty queue (2 checks max, or 1 if history is obvious):

  1. Do NOT take screenshots
  2. Do NOT write synthetic result/status files
  3. Do NOT produce formatted reports
  4. Respond exactly: [SILENT]

The operational history (processed files, past results, .processed_files) IS the proof of service health. No additional verification is needed or useful.