Skip to content

fix(agent): inject first_turn_note into LLM user message on first turn (#4528)#4550

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-4528
Apr 14, 2026
Merged

fix(agent): inject first_turn_note into LLM user message on first turn (#4528)#4550
mrveiss merged 1 commit intoDev_new_guifrom
issue-4528

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 14, 2026

Summary

  • Wires first_turn_note set by _analyze_events() into actual LLM context on the first iteration
  • Appends note to events_context["task_description"] with "\n\n" separator
  • Guards on config.first_turn_priming_enabled and non-empty note value
  • Pops the key after injection so it doesn't re-inject on subsequent turns

Test Plan

  • Verify first_turn_priming_enabled=True causes note to be appended to task_description on turn 1
  • Verify first_turn_priming_enabled=False skips injection
  • Verify note is absent from context on turn 2+

Closes #4528

🤖 Generated with Claude Code

#4528)

_analyze_events() set context["first_turn_note"] on iteration 1 but
nothing downstream consumed it (silent no-op since #4481).

In _execute_iteration_phases(), pop first_turn_note from events_context
immediately after _analyze_events() returns, append it to
task_description in the context dict under the guard
config.first_turn_priming_enabled, then clear it so subsequent turns
are unaffected.
@mrveiss mrveiss merged commit 4dd06d6 into Dev_new_gui Apr 14, 2026
3 of 4 checks passed
@mrveiss mrveiss deleted the issue-4528 branch April 14, 2026 16:28
@github-actions
Copy link
Copy Markdown

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

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