Skip to content

Clear goal mode after any final answer - #247

Merged
MagMueller merged 1 commit into
mainfrom
fix-goal-final-answer-clears
May 19, 2026
Merged

Clear goal mode after any final answer#247
MagMueller merged 1 commit into
mainfrom
fix-goal-final-answer-clears

Conversation

@MagMueller

@MagMueller MagMueller commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat any final answer from a live Codex goal terminal as the end of that goal turn
  • Drain queued Telegram follow-ups first; if none remain, clear goal mode even when the final answer lacks explicit Time used text
  • Update regression coverage for short answers like count goals

Tests

  • /home/bux/.local/bin/ruff check agent/telegram_bot.py agent/test_telegram_bot.py
  • /opt/bux/venv/bin/python -m unittest agent/test_telegram_bot.py

Summary by cubic

End goal mode after any final answer from the Codex goal session. If there are queued Telegram follow-ups, send them first; otherwise close the session even if the answer doesn’t include “Time used” or “Goal complete”.

  • Bug Fixes
    • Always finish the goal after a final/final_answer event; removed brittle string matching.
    • Drain queued inputs before closing; otherwise clear goal mode immediately.
    • Updated tests for short final answers and proper state reset.

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@MagMueller
MagMueller merged commit 1cc8d92 into main May 19, 2026
7 checks passed
@MagMueller
MagMueller deleted the fix-goal-final-answer-clears branch May 19, 2026 00:38
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