Skip to content

v10: self-schedule only when waiting on something concrete; drop auto-heartbeats#218

Open
MagMueller wants to merge 1 commit into
v9-new-topic-helperfrom
v10-self-schedule-only-when-needed
Open

v10: self-schedule only when waiting on something concrete; drop auto-heartbeats#218
MagMueller wants to merge 1 commit into
v9-new-topic-helperfrom
v10-self-schedule-only-when-needed

Conversation

@MagMueller
Copy link
Copy Markdown
Contributor

@MagMueller MagMueller commented May 15, 2026

Stacked on #217 (v9). Reverses the auto-heartbeat default.

The fix

You called it out: re-firing the same prompt every hour is noise, not work. "Send a message" → 3h later "send a message" = dumb. The agent should self-schedule only when there's something specific to come back to.

Changes

  • new-topic: --heartbeat default flipped to NONE (was +1h).

    • Opt-in only when the caller has a genuine fixed-cadence polling reason ("scan this inbox every 30 min").
    • Otherwise the agent inside the new topic decides — tg-schedule "+N min" "<concrete check" as a one-shot when needed.
  • /goal: removed the auto-queued tg-schedule --repeat in _start_agency_goal_from_command. The autopilot agent decides whether to come back later based on what it actually did.

  • System prompt: rewrote the heartbeat bullet.

    Before: "The bot fires a heartbeat into every goal topic every hour..."

    After: "Self-schedule only when you have something concrete to come back to — a reply you're waiting for, a CI run, a launch window, a draft that needs a re-pass. Don't queue recurring heartbeats that fire the same generic prompt over and over — that's noise, not work."

    Daily-summary section reframed as a self-queued one-shot, not a heartbeat side-effect.

What's preserved

tg-schedule --repeat still exists for cases where fixed-cadence polling is the right answer ("scan Slack for new threads every 30 min", "check the deploy every 5 min until green"). We just stopped applying it automatically.

Tests

  • 29 pass
  • Syntax checks
  • On a box: /goal X — verify no heartbeat queued in atq
  • new-topic "X" "Y" — verify no heartbeat queued
  • new-topic "X" --heartbeat "+30 minutes" "Y" — verify heartbeat queued

🤖 Generated with Claude Code


Summary by cubic

Stop auto-heartbeats. New topics and /goal threads no longer schedule periodic pings; the agent now self-schedules one-shots only when there’s something concrete to wait for.

  • Refactors

    • new-topic: --heartbeat default is none; opt-in with --heartbeat "+N" when real fixed-cadence polling is needed.
    • /goal: removed auto-queued tg-schedule --repeat; the autopilot agent schedules follow-ups only as needed.
    • Updated system prompt to emphasize self-scheduling on concrete events; reframed daily summary as a one-shot.
  • Migration

    • No change needed for most flows. Add --heartbeat "+N" for jobs that truly require polling (e.g., “scan Slack every 30 min”). tg-schedule --repeat remains available.

Written for commit e8535cb. Summary will update on new commits. Review in cubic

…-heartbeats

Magnus's correction: re-firing the same prompt on a fixed cadence is noise, not work. "Send a message → 3h later send it again" doesn't make sense. The agent should self-schedule only when there's something specific to come back to — a reply, CI, an event, a launch window.

Changes:
- new-topic: --heartbeat default flipped to NONE (was +1h). Opt-in only when the caller has a genuine reason for fixed-cadence polling. Docstring + parser updated.
- /goal: removed the auto-queued tg-schedule --repeat call in _start_agency_goal_from_command. The autopilot agent decides whether to schedule check-ins based on what it actually did.
- system-prompt.md: rewrote the heartbeat bullet to "Self-schedule only when you have something concrete to come back to". Pure 'exist + ping' jobs are explicitly called out as not-the-doctrine. Daily summary section reframed as a self-queued one-shot, not a heartbeat side-effect.

Infrastructure preserved: tg-schedule --repeat still works for cases where polling IS the right answer ("scan Slack every 30 min for new threads"). Just stopped applying it automatically.

Tests: 29 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

MagMueller added a commit that referenced this pull request May 15, 2026
…omposio for codex

Lands 16 stacked PRs reviewed by multiple sub-agents:

- v1 (#209)  /goal as primitive, per-topic autopilot vs copilot
- v2 (#210)  drop agency-mode gate, fold doctrine into CLAUDE.md, delete old Mini App UI
- v3 (#211)  CLAUDE.md → system-prompt.md (source of truth), agent identity = "agency"
- v4 (#212)  trim system prompt to 87 lines, mode emoji in topic title, extract bot/markdown.py
- v5 (#213)  heartbeat-by-default plumbing (later removed), copilot voice fix, autopilot security note
- v6 (#214)  steering semantics, new-topic spawning, 2-option cards, source-aware images
- v7 (#215)  /goal IS autopilot framing, drop topic emoji prefix, silence allowed, codex goals=true, `schedule` alias
- v8 (#216)  drop --spawn-topic, --importance, trim agency-report docstring
- v9 (#217)  new-topic helper — spawn fresh lane synchronously, queue heartbeat
- v10 (#218) self-schedule only when waiting on something concrete; drop auto-heartbeats
- v11 (#219) /goal is a verbatim CLI passthrough; bot is a dumb pipe
- v12 (#220) drop 30-min timeout, kill lingering heartbeat, prompt-injection defenses, seed goals.md
- v13 (#221) /goal stays copilot by default; autopilot only on explicit user opt-in
- v14 (#222) doctrine fixes from final multi-agent review
- v15 (#223) tighten autopilot triggers — drop the loose phrases
- v16 (#224) register composio MCP for codex too; simplify autopilot trigger paragraph

Tests: 22 pass.

Follow-ups (tracked, not in this merge):
- P0: install bootstrap.sh as /usr/local/sbin root:root (closes the trivial bux→root)
- P1: stuck-lane watchdog (no-stdout-for-30-min SIGTERM)
- P1: /invite is a dead command (remove from BotFather menu)
- P1: composio tool names wrong-case in system prompt
- P1: help text + COMMANDS still reference dropped autopilot trigger phrases
- P1: BUX_BOX_TOKEN provenance for OSS self-host installs
- P2: button-tap dispatches bypass _enqueue (lane race on rapid taps)
- P2: persisted per-topic autopilot flag in state (instead of LLM phrase detection)
- P2: agency_db ghost columns (importance, spawn_topic)
- P2: mini app teardown decision (1700 LOC for an unreferenced surface)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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