Skip to content

feat: add goal mode - #389

Open
yhw5231 wants to merge 2 commits into
Stack-Cairn:mainfrom
yhw5231:feature/goal-mode
Open

feat: add goal mode#389
yhw5231 wants to merge 2 commits into
Stack-Cairn:mainfrom
yhw5231:feature/goal-mode

Conversation

@yhw5231

@yhw5231 yhw5231 commented Aug 6, 2026

Copy link
Copy Markdown

Closes #390

Summary

Adds an optional per-conversation goal mode for long-running Agent tasks. Goals persist with conversation history and expose lifecycle controls, pause/resume behavior, token/time usage, TodoWrite progress, provider recovery, and automatic continuation while the goal is active.

The follow-up fix also prevents completed or paused goals from steering later ordinary prompts, preserves /goal status and /goal help feedback after persistence, and excludes failed tool results from the no-progress detector.

Change scope

  • Modules: agent-gui React runtime, chat history persistence, built-in goal tools, provider stream recovery
  • Key paths:
    • crates/agent-gui/src/lib/chat/goal.ts
    • crates/agent-gui/src/lib/chat/conversation/
    • crates/agent-gui/src/lib/tools/goalTools.ts
    • crates/agent-gui/src/pages/chat/
    • crates/agent-gui/src-tauri/src/commands/history/chat_history/

Screenshots / preview

Goal mode toggle in the chat composer

The preview shows the per-conversation goal-mode toggle in the chat composer.

Verification

  • pnpm exec node --test test/chat/goal.test.mjs: 20 passed
  • Goal runtime and queue regression tests: 16 passed
  • pnpm exec tsc --noEmit: passed
  • git diff --check: passed
  • Full frontend suite: 1,424 passed; 5 unrelated baseline failures remain in MentionComposer function-extraction tests and provider preset synchronization.
  • Rust tests were not run locally because cargo is not installed in the environment.

Pre-submit checklist

  • A requirement issue is linked.
  • Synced with the target branch; GitHub reports no merge conflicts.
  • The change is focused, with no unrelated modifications to the implementation.
  • No secrets, tokens, or personal data are included.
  • User-facing documentation is updated.

@StackCairn
StackCairn marked this pull request as draft August 6, 2026 09:06
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR governance checks passed. Awaiting human review.

@yhw5231
yhw5231 marked this pull request as ready for review August 6, 2026 10:59
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.

[Feature] Add persisted goal mode for long-running agent tasks

1 participant