Skip to content

feat(tasks): wire fm-tasks SQLite into fm-spawn/teardown/watch - #41

Closed
jwalin-shah wants to merge 4 commits into
kunchenguid:mainfrom
jwalin-shah:fm/fmtasks-wire-5c
Closed

jwalin-shah wants to merge 4 commits into
kunchenguid:mainfrom
jwalin-shah:fm/fmtasks-wire-5c

Conversation

@jwalin-shah

Copy link
Copy Markdown

Summary

  • fm-spawn.sh: records every spawned task in SQLite via fm-tasks add + fm-tasks start
  • fm-teardown.sh: marks tasks done/failed with PR URL or --local on teardown
  • fm-watch.sh: queries fm-tasks ls --status inflight instead of reading data/backlog.md

Token reduction

Heartbeat inflight query: 3034 bytes (backlog.md) → 3 bytes (empty JSON list) — 20x reduction on idle fleets.

🤖 Generated with Claude Code

jwalin-shah and others added 4 commits June 22, 2026 10:00
* feat(spawn,teardown): pioneer harness + post-task learn-log; trim AGENTS.md

- fm-spawn: add pioneer harness template (cpion launch command) and include
  pioneer in the claude* turn-end hook branch so Stop hooks wire correctly
- fm-teardown: append structured outcome entry to data/learn-log.md on every
  teardown, recording task id, kind, mode, project, last status, and report
  summary for fleet-level reflection
- AGENTS.md: tighten ~27 lines across sections 1/4/6/8/9 without dropping
  any operational rules (fleet-sync exception, pi extension internals,
  project memory ownership, watcher guard, escalation list)

* feat(spawn): add cb harness adapter for account-B crewmates

- Add cb launch template to fm-spawn.sh: launches via 'cb "$(cat __BRIEF__)"'
- Add cb to turn-end hook case alongside claude* and pioneer
- Document cb as ADDED in AGENTS.md section 4 harness table
  (needs smoke-test spawn for full verification)
- cb inherits all claude adapter facts (busy signature, exit, interrupt,
  skill invocation) since it wraps the same claude CLI under account B

No change needed to fm-harness.sh: the crew command echoes config/crew-harness
verbatim, so 'cb' already resolves correctly without a detection entry.

* feat(spawn): add ctoken harness adapter for Token account crewmates

ctoken is ~/bin/claude-rollover run token --dangerously-skip-permissions.
Identical mechanics to claude/cb: same esc-to-interrupt, /exit, /<skill>.
Adds launch_template case, turn-end hook case, and AGENTS.md section 4 entry.

---------

Co-authored-by: Jwalin Shah <209190755+jwalin-shah@users.noreply.github.com>
Adds cursor-agent as a crewmate harness with a TBD smoke-test marker.
cursor-agent has no Stop hook, so the turn-end case is a no-op and the
watcher falls back on status file writes per brief rules.

Co-authored-by: Jwalin Shah <209190755+jwalin-shah@users.noreply.github.com>
A background subshell polls the pane for ~32s after the launch command
runs, sending Enter whenever a trust prompt is visible. Covers Claude
Code ('I trust this folder' / 'Do you trust the contents'), codex, and
pi; opencode has no trust dialog. Backgrounded so spawn never blocks.

Co-authored-by: Jwalin Shah <209190755+jwalin-shah@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
fm-spawn records every spawn into the SQLite AXI task store via
fm-tasks add/start; fm-teardown transitions the row to done (with
--pr or --local) or fail before clearing the meta file; fm-watch
reads the inflight count via fm-tasks ls --status inflight instead
of grepping data/backlog.md. All three calls are best-effort -
missing/broken fm-tasks never blocks the script.

Co-Authored-By: Claude <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@jwalin-shah

Copy link
Copy Markdown
Author

wrong repo — opening against jwalin-shah/firstmate instead

@jwalin-shah
jwalin-shah deleted the fm/fmtasks-wire-5c branch June 27, 2026 02:53
This was referenced Aug 7, 2026
NewAiCoder added a commit to NewAiCoder/firstmate that referenced this pull request Sep 26, 2026
… sweep (kunchenguid#41)

* fix(idle-compact): settle the declared-pause path in ~60s, not a full sweep

Fixes NewAiCoder/firstmate#34. The declared-state fast path already sent
/compact within one sweep, but then waited a full FM_IDLE_COMPACT_INTERVAL
before ringing the worker, idling a lane for minutes after a 30s
compaction. The declared path now settles per config/idle-compact's
optional second content line (whole seconds), defaulting to 60; the
ordinary path is unchanged.

* no-mistakes(document): Fix stale env-var table entry for FM_IDLE_COMPACT_SETTLE_SECS default

---------

Co-authored-by: NewAiCoder <claude@theinbtw.com>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…unchenguid#41)

A DONE-but-captain-held idle Cursor/herdr composer was treated as an
immediate "agent blocked - waiting on human" stale on every fresh watcher
cycle, forcing re-arm churn. Extend the push-path park exemption to
status_is_paused_or_captain_held so parked idle panes stay a non-event.
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…st joined rooms in status (kunchenguid#41)

* fix(bin): find the Mothership link and a node that runs it, and list joined rooms in status

The monitor looked for the mothership command only on PATH, so a link
installed in the home's projects/mothership could not be switched on, and
status then said there were no rooms although one was joined. The link is
now found through FM_MOTHERSHIP_BIN, config/mothership-link, PATH, then
projects/mothership/bin/mothership; a TypeScript link runs with a node that
can run it rather than the first node on PATH; and status lists the rooms
the Mothership config has joined and names a missing link plainly.

* no-mistakes(review): Drop mothership-link file and node override; fix bare-PATH helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant