Skip to content

feat(coding-agent): persist plan criteria in task context - #249

Merged
Pepps233 merged 8 commits into
mainfrom
feat/better-task-context
Sep 28, 2026
Merged

Pepps233 merged 8 commits into
mainfrom
feat/better-task-context

Conversation

@Pepps233

@Pepps233 Pepps233 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Persist update_plan steps with stable IDs and optional success criteria while keeping the latest plan available in durable conversation history.

Return the complete resolved plan in successful tool results instead of appending a plan message to every model request, so ordinary requests can reuse the previous prompt prefix.

Reasoning

Appending an unsaved current-task message to each request moved that message when the next turn added conversation history, breaking prompt cache reuse.

Persisted tool results carry plan changes in the normal conversation.

Successful compaction summaries include the latest plan snapshot so the plan remains available after older tool results are compacted away.

The latest plan does not need to be the final message of every request.

Changes

  • Add stable step IDs, optional success criteria, and single-step updates by ID to update_plan.
  • Persist each resolved plan change and show IDs and criteria in the TUI.
  • Include the complete resolved plan in successful model-visible tool results while keeping details.plan unchanged; clearing still returns Plan cleared.
  • Remove the per-request plan message while preserving extension context transforms.
  • Add the latest plan snapshot to successful, persisted compaction summaries; represent cleared or absent plans as an empty plan.
  • Update the README and SDK documentation, with regression coverage for prefix reuse, resume, fork, compaction, and cancellation.

Testing

  • Reproduced the prompt prefix break through session.prompt() with the faux provider before the fix.
  • Focused Vitest run: 7 files, 110 tests passed.
  • npm run check

- Keeps step IDs and success criteria across updates, resume, and compaction
- Appends current plan state to every model request after tool execution
- Describes step IDs, criteria, single-step updates, and per-request plan context
@Pepps233 Pepps233 self-assigned this Sep 26, 2026
@Pepps233 Pepps233 added coding-agent enhancement New feature or request labels Sep 26, 2026
Pepps233 and others added 6 commits September 26, 2026 16:07
- Makes session cache reuse visible alongside context usage
- Fits the rate within narrow footer widths
- Prevents saved tool output from being remeasured on every keystroke
- Keeps typing responsive as session history grows
- Keep plan snapshots in persisted tool results and compaction summaries
- Let ordinary requests reuse prior model message prefixes
Updated guidelines to include optional success criteria for subtasks.
- Make the destination plan explicit when abandoned branches are summarized
- Persist the snapshot so restored sessions retain unambiguous plan context
- Keep the prompt assertion consistent with optional success criteria
@Pepps233
Pepps233 merged commit 4492ce0 into main Sep 28, 2026
2 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coding-agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant