Skip to content

feat(overseer): hub-owned conversational focus for anaphoric relay - #113

Open
heavygee wants to merge 14 commits into
fix/overseer-converse-brain-logfrom
feat/overseer-converse-focus
Open

feat(overseer): hub-owned conversational focus for anaphoric relay#113
heavygee wants to merge 14 commits into
fix/overseer-converse-brain-logfrom
feat/overseer-converse-focus

Conversation

@heavygee

@heavygee heavygee commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Hub-owned conversational focus is the write binder — not regex.

Removed (debt): RELAY_INTENT / DISPOSITION_INTENT / line-local session+item extraction as the converse write gate. That pattern-matching approach is why "tell it to go ahead" failed and is not a capability.

Shipped:

  • Structured focus (sessionId / itemId) persisted per namespace; updated from successful hub tool resolves (explain_priority, single-item inbox, session probes, ping/disposition) and optional client relatedSessionId
  • Write tools authorize against focus (or allowWrites) — natural-language follow-ups need no ids in the utterance
  • Multi-item tool dumps cannot retarget focus (injection surface stays tool-originated)
  • Focus directive injected into the converse system prompt
  • Write tools stay in the catalog so a mid-turn resolve can unlock ping in the same turn

Test plan

  • bun typecheck
  • bun run test:hub (611 pass)
  • Focus set → "tell it…" relays without ids; subject change; tool dump cannot retarget; mid-turn unlock after explain_priority
  • Soup remat + operator dogfood on :3006 (Meta)
  • Separately: inactive resume / allowFreshSpawn: false if wake still fails after focus binds

Follow-up (not blocking)

Inactive-but-resumable relay still uses executeSessionRelay with allowFreshSpawn: false.

Issues

Fixes #112

Persist a structured session/item subject across converse turns so write
authorization and the brain share one referent. "tell it to…" binds via
focus + write intent, not line-local ids. Tool-result dumps cannot retarget.

Fixes #112

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee

heavygee commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Peer handoff — ready for Meta remat / operator dogfood

PR: #113 (base fix/overseer-converse-brain-log / #111 tip)
Issue: Fixes #112
Worktree: ~/coding/hapi/worktrees/overseer-converse-focus @ feat/overseer-converse-focus

What shipped

Hub-owned conversational focus (session and/or inbox item) shared by brain system prompt + write gate. Anaphoric "tell it to…" authorizes against focus; multi-item tool dumps cannot retarget.

Gates

  • bun typecheck pass
  • bun run test:hub 610 pass
  • shared focus + converse focus tests pass
  • Hub-only change — peer Playwright not required; soup remat needed for :3006 dogfood

Meta / operator next

  1. Remat soup with this layer (and chore(overseer): structured log on soft brain-unavailable converse #111 tip if not already)
  2. Dogfood talk-to: establish subject (item 118 / W1.8) → "tell it to go ahead" without re-citing ids
  3. Separately report if inactive resume still fails (allowFreshSpawn: false) — follow-up, not this PR

I did not remat / stack-switch (per handoff).

@heavygee heavygee added enhancement New feature or request fleet-overseer Fleet attention-arbitration architecture mvp Part of the Overseer MVP acceptance bar (Steps 1-4) labels Aug 2, 2026
Write auth is focus and/or allowWrites only — no utterance regex for
intent or targets. Focus updates from tool resolves (and client session),
not operator-text id grepping. Mid-turn resolve unlocks ping.

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee

heavygee commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Course correction applied (operator lock)

Scrapped the first-pass design that layered focus on top of RELAY_INTENT.

  • Deleted converse write binding via RELAY_INTENT / DISPOSITION_INTENT / line-local id extraction
  • Write auth = hub focus and/or allowWrites only; targets bind to focus
  • Focus updates = successful tool resolves (+ optional client relatedSessionId) — not operator-prose grepping
  • Mid-turn: subject-resolving read establishes focus → ping unlocks in the same turn

PR body updated to match.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1ed760561

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts
Comment thread shared/src/overseerConverseFocus.ts Outdated
Comment thread hub/src/web/routes/overseer.ts
Comment thread shared/src/overseerConverseFocus.ts Outdated
Comment thread hub/src/web/routes/overseer.ts Outdated
Comment thread shared/src/overseerConverseFocus.ts Outdated
Comment thread hub/src/web/routes/overseer.ts
Comment thread hub/src/store/settingsStore.ts
heavygee and others added 2 commits August 2, 2026 22:05
Freeze write grants at turn start so mid-turn tool resolves cannot unlock
same-turn writes. Require non-null session probes, conditional focus
persist, client relatedSessionId replace, and merge/delete repoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94bc2f9ded

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread shared/src/overseerWriteIntent.ts
Comment thread hub/src/store/settingsStore.ts
Comment thread shared/src/overseerConverseFocus.ts
Comment thread shared/src/overseerConverseFocus.ts
… start

Keep setConverseFocusIfNewer able to reject older in-flight turns after
session delete, stamp focus updates with turnStartedAt (not tool-completion
wall clock), and promote singleton list_active_workers like query_inbox.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 783ef8f147

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/sync/sessionCache.ts Outdated
Comment thread shared/src/overseerConverseFocus.ts Outdated
Comment thread shared/src/overseerConverseFocus.ts
Comment thread hub/src/web/routes/overseer.ts Outdated
… fail

Route session deletes through Store.deleteSession so cache-bypass paths clear
focus; replace the whole session/item pair on subject-changing writes; promote
singleton query_open_loops; persist mid-turn focus when a later brain call fails.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ffcde90dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/store/settingsStore.ts Outdated
Comment thread shared/src/overseerConverseFocus.ts
Refuse equal updatedAt on persist (first writer wins), bump clears/repoints
above the durable version, and promote singleton list-mode query_dispositions.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89521cf38a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/web/routes/overseer.ts Outdated
Comment thread shared/src/overseerWriteIntent.ts
Comment thread shared/src/overseerConverseFocus.ts
Comment thread shared/src/overseerConverseFocus.ts Outdated
Persist relatedSessionId focus before awaiting the brain; accept unique
session-id prefixes; require all supplied write selectors to match focus;
promote singleton query_events; never adopt ungranted ping itemIds.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cae4a1b642

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts Outdated
When one turn successfully resolves more than one distinct session/item,
keep the turn-start focus instead of persisting whichever probe finished last.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f80eafc57

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts Outdated
Unchanged tool passthroughs (multi-item query_inbox) must not pollute the
per-turn subject set, or a later real retarget incorrectly restores turn-start.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d74d56734c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts Outdated
Comment thread shared/src/overseerWriteIntent.ts
Comment thread shared/src/overseerConverseFocus.ts
…ly ping

Count subjects from apply-from-null (not passthrough); resolve relatedSessionId
to a unique canonical id before write grants; keep itemId on item-only pings.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5479300771

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts Outdated
Comment thread hub/src/web/routes/overseer.ts Outdated
…ssion ids

Treat same-session or same-item resolutions as one referent; match and seed
session UUIDs case-insensitively so uppercase client ids resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 488612d20c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hub/src/overseer/converse.ts Outdated
Comment thread shared/src/overseerConverseFocus.ts Outdated
Comment thread hub/src/web/routes/overseer.ts Outdated
Comment thread hub/src/web/routes/overseer.ts Outdated
heavygee and others added 2 commits August 11, 2026 22:09
…osed

Conflicting itemIds on one session are multi-subject; disposition ignores
raw sessionId args; unresolved relatedSessionId clears turn write focus
instead of inheriting durable, and never seeds nonexistent UUIDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Meta: tip dbb5aac had CI green and 0 threads but no bot review of that
commit (last Codex pass was 488612d). Empty push to wake the reviewer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee

Copy link
Copy Markdown
Owner Author

@codex review

Retrigger: tip 5d8f79403 is CI-green with 0 unresolved threads; last Codex pass was on 488612d20 and never re-ran on later tips (push alone does not re-arm).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@heavygee

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fleet-overseer Fleet attention-arbitration architecture mvp Part of the Overseer MVP acceptance bar (Steps 1-4)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant