agency-report: rename "Why" → "Context" (default block title + emoji)#111
Merged
MagMueller merged 1 commit intomainfrom May 9, 2026
Merged
agency-report: rename "Why" → "Context" (default block title + emoji)#111MagMueller merged 1 commit intomainfrom
MagMueller merged 1 commit intomainfrom
Conversation
The second expandable's default title was "Why" (with the 💭 emoji), but the user's intent for that block has always been: provenance, related threads, anything that supports the decision but isn't the action itself. "Context" reads as that exactly; "Why" reads as a justification, which forces an explanatory framing that doesn't fit most cards. Renamed in agency-report defaults: --reasoning-title default: "Why" → "Context" --reasoning-emoji default: "💭" → "📎" Help text on --reasoning updated to describe it as the context block, not the why-now block. Docstring snippet "becomes 💭 Why" → "becomes 📎 Context". Backward compat: --reasoning-title / --reasoning-emoji can still be set explicitly to override (e.g. older callers can keep "Why" if they want). The flag name --reasoning is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
MagMueller
added a commit
that referenced
this pull request
May 9, 2026
The kind=refine flow used to write the original card's title + description + prompt to /var/lib/bux/agency-refine-context/<thread>.txt on Edit-tap, then `run_task` would read + delete that file on the user's first reply to seed the worker agent with the original context. Two redundant surfaces — the data was always already in the suggestion row (title, description, prompt). The file was a duplicate-state cache that needed its own ownership/permissions handling on /var/lib/bux. Replaces with a DB lookup: agency_db.pop_refine_context_for_thread(db, thread_id) -> str | None Atomic SELECT + UPDATE: returns the assembled context AND flips a new `refine_context_injected` column from 0 → 1 in one call. So the context is injected exactly once, on the user's first reply in the worker topic. Subsequent replies in the same thread are normal lane runs. Schema migration via ALTER TABLE with duplicate-column swallow, mirroring how spawn_topic was added in #107. Pre-existing rows get refine_context_injected = 0 by default. `run_task` swaps the file pop for the DB call. The kind=refine handler stops calling `_agency_write_refine_context` (the function + its sibling `_agency_pop_refine_context` + the `_AGENCY_REFINE_CTX_DIR` constant + `_agency_build_refine_context_plain` are removed — agency_db owns the plain-text assembly now). The visible HTML context message in the new topic still renders via `_agency_build_refine_context`, just with the new "📎 Context" emoji + title (from #111). Net: one fewer state surface, one fewer ownership/permissions race, the same UX for the user (Edit → context shown → "what would you change?" → user replies → agent re-drafts with original in scope). Co-authored-by: bux <bux@browser-use.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second expandable's default title was "Why" with the 💭 emoji, but it's been used as the context slot since day one — provenance, related threads, why-now framing, anything supporting the decision but not the action itself. "Why" reads as a justification, which forces a framing that doesn't fit most cards.
Renamed defaults:
`--reasoning` flag itself is unchanged. Help text and docstring snippet updated to describe it as the context block.
Backward compat: callers can still set `--reasoning-title` / `--reasoning-emoji` explicitly to override.
Test plan
Summary by cubic
Renamed the default second block from "Why" (💭) to "Context" (📎) in
agent/agency-reportto better match its purpose. Updated help text and inline docs;--reasoningis unchanged and callers can still override--reasoning-title/--reasoning-emoji.Written for commit 5428d26. Summary will update on new commits.