Skip to content

feat::Feature/add reminder of unfinshed todo#22060

Open
ahmedfe wants to merge 136 commits intoanomalyco:devfrom
ahmedfe:feature/add-reminder-of-unfinshed-todo
Open

feat::Feature/add reminder of unfinshed todo#22060
ahmedfe wants to merge 136 commits intoanomalyco:devfrom
ahmedfe:feature/add-reminder-of-unfinshed-todo

Conversation

@ahmedfe
Copy link
Copy Markdown

@ahmedfe ahmedfe commented Apr 11, 2026

ssue for this PR
Closes #22059

Type of change
[x] New feature

What does this PR do?
When an agent finishes a session while there are still pending or in-progress todos, the todo list gets left in a stale state — items stay marked as pending or in_progress even though the work was completed. This is confusing when reviewing past sessions.

This PR adds a pendingTodoReminder step to the session prompt loop. After the agent signals it's done and before the session actually ends, it checks the session's todo list for any items with pending or in_progress status. If unfinished todos exist, it injects a synthetic user message listing them and asks the agent to reconcile the list. This causes the loop to continue for one more turn so the agent can mark items as completed or cancelled.

To avoid infinite loops, the reminder is suppressed if the last user message is already a todo reminder (checked via a prefix match on the message text).

Changes are in packages/opencode/src/session/prompt.ts:

Import and wire up Todo.Service in the session prompt
Add pendingTodoReminder effect that checks for unfinished todos and injects a synthetic message
Call the reminder after the agent finishes but before breaking out of the prompt loop
Provide Todo.defaultLayer to the session prompt's dependency layer
How did you verify your code works?
Tested locally by running sessions with todo items and confirming that when the agent tries to finish with unfinished todos, it receives the synthetic reminder and updates the todo list before the session ends. Also ran bun typecheck in packages/opencode.

Screenshots / recordings
Not included.

Checklist
[x] I have tested my changes locally [x] I have not included unrelated changes in this PR

ariane-emory and others added 30 commits February 1, 2026 21:01
When users press Ctrl+C to clear the input field, the current prompt
is now saved to history before clearing. This allows users to navigate
back to cleared prompts using arrow keys, preventing loss of work.

Addresses anomalyco#11489
Adds a toggle command in the System category that allows users to enable
or disable saving cleared prompts to history. The feature is disabled by
default to preserve existing behavior.

When enabled via the command palette ("Include cleared prompts in history"),
pressing Ctrl+C will save the current prompt to history before clearing it,
allowing users to navigate back with arrow keys.

The setting persists in kv.json.
Add a toggleable auto-accept mode that automatically accepts all incoming
permission requests with a 'once' reply. This is useful for users who want
to streamline their workflow when they trust the agent's actions.

Changes:
- Add permission_auto_accept keybind (default: shift+tab) to config
- Remove default for agent_cycle_reverse (was shift+tab)
- Add auto-accept logic in sync.tsx to auto-reply when enabled
- Add command bar action to toggle auto-accept mode (copy: "Toggle autoaccept permissions")
- Add visual indicator showing 'auto-accept' when active
- Store auto-accept state in KV for persistence across sessions
…rtcut support

Rename 'Toggle autoaccept permissions' to 'Toggle permissions' for clarity
and move the command to the Agent category for better discoverability.
Add permission_auto_accept_toggle keybind to enable keyboard shortcut
toggling of auto-accept mode for permission requests.
…orkflow interruptions while still requiring confirmation for bash commands
…emory/opencode into feat/canceled-prompts-in-history
Avoid adding duplicate entries to prompt history when the same input
is appended multiple times (e.g., clearing with ctrl+c then restoring
via history navigation and clearing again).
# Conflicts:
#	packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx
Ryan Vogel and others added 23 commits April 8, 2026 18:23
Tighten the dictation UI and Whisper model settings, update the mobile package metadata, and remove the stale npm lockfile so Bun stays the source of truth for builds.
…ompts in the history, toggled by a KV-persisted command palette item (resolves anomalyco#11489)
…dering for prompt loop exit and message rendering
@ahmedfe ahmedfe requested a review from adamdotdevin as a code owner April 11, 2026 16:27
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title Feature/add reminder of unfinshed todo doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@ahmedfe ahmedfe changed the title Feature/add reminder of unfinshed todo feat::Feature/add reminder of unfinshed todo Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:Prompt for pending todo updates when a session is about to finish

10 participants