Skip to content

Firstmate burns through my credits too quickly because of excessive watcher events  #1692

Description

@gamedevcb

Summary

When running Firstmate through my chatGPT subscription (Sol= firstmate, Luna= crewmates), it rapidly burned through my weekly allowance. When I investigated where my credits went, it turned out that over 80% of them were used up by Sol, repeatedly resending the cache, thousands of times via watcher events triggering checking-in on crewmates. Not sure if this is a bug, but it is definitely undesirable.

Overview

With Pi as the primary harness, one actionable Firstmate watcher wake can expand into many model provider requests because the injected operational message contains only the event reason and an instruction to run bin/fm-wake-drain.sh.

The model then reconstructs current task state through multiple separate tool/result cycles. Each cycle is another provider request carrying the primary session context.

This is not a request to suppress genuine actionable wakes or weaken lifecycle safety. It is a request to provide one bounded, structured wake-context packet so the primary agent does not have to reconstruct routine operational state incrementally.

Environment

  • Firstmate commit: 99533c5d7d3702050e6084429dddff6ea4fe1aa0
  • Primary harness: Pi
  • Runtime backend: Herdr
  • Primary model: GPT-5.6 Sol
  • Platform: Linux
  • Firstmate home: dedicated profile

Measured evidence

After removing exact copied usage entries introduced by a parent-session clone/fork:

  • 1,605 unique Sol provider-activity records
  • 1,200 watcher-originated provider calls
  • 178,589,184 of 220,382,208 unique cached-input tokens were watcher-originated
  • watcher-originated activity therefore represented about 74.8% of calls and 81.0% of cached input

One inspected watcher:signal run expanded into 18 provider requests.

The sequence included:

  1. fm-wake-drain.sh
  2. read full report
  3. fm-crew-state.sh
  4. read status log
  5. Git/evidence/decision checks
  6. teardown
  7. drain another wake
  8. process and PID investigation
  9. creation and dispatch of a follow-up review task
  10. worker-state confirmation
  11. final user-facing response

Some of these actions were substantively necessary. The performance problem is that routine state acquisition and lifecycle reconciliation required many separate model continuations.

Current behavior

The Pi watcher injects a message equivalent to:

Run bin/fm-wake-drain.sh first and handle the queued wake.

The model must then decide which state files, reports, endpoint checks, decision holds and repository checks to query.

Expected behavior

The watcher/extension should preserve all current durable-queue and safety semantics while delivering one bounded structured packet containing enough deterministic state for the model to make its first substantive decision.

Proposed direction

Add a helper or extension-owned path such as:

  • bin/fm-wake-context.sh --json
  • schema fm-wake-context.v1

The helper should:

  1. Drain the durable wake queue exactly once under the existing authority and locking contract.
  2. Coalesce .status and .turn-ended records for the same task.
  3. Resolve fm-crew-state.sh once per affected task.
  4. Return bounded recent status-event history.
  5. Return endpoint/liveness state.
  6. Return report path, existence and size, but not full report content.
  7. Return decision-hold state where applicable.
  8. Return bounded repository state where lifecycle handling requires it.
  9. Return watcher-health and additional-pending-wake state.
  10. Preserve full evidence on disk and expose paths for targeted reads.

The Pi extension could run this deterministic helper before injecting the operational user message, so the first model request already contains the packet.

Safety requirements

  • Do not suppress terminal, failure, blocker, decision or genuinely stale events.
  • Do not embed full reports, logs or diffs.
  • Preserve queue-before-detector-state ordering.
  • Preserve lock-refusal behavior.
  • Preserve watcher-continuity and turn-end-guard behavior.
  • Keep existing fm-wake-drain.sh compatibility.
  • Treat ambiguous state as ambiguous rather than silently working or done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-prTriage: real bug or VISION-aligned feature, open for a PR

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions