Skip to content

Window Companion: persistent Tool Approval cards with direct decisions #1178

Closed

Description

@DoodleBears

Parent

Specification #1135. Human explicitly extends the original navigate-only attention surface with direct, owner-qualified Tool Approval controls.

What to build

When a selected Bot has a live Tool Approval request addressed to the Human, show a persistent request card by that companion across Harness pages. Let the Human inspect the operation and decide directly without opening or selecting the Bot's DM. Reuse the canonical approval owner, existing decision/audit semantics and native controls; do not interpret ordinary message text or attention counts as actionable requests.

Acceptance criteria

  • A real owned Tool Approval request appears with Bot/source, operation, role/Workspace and enough actual input/details to understand the decision. Pending request discovery reads current authoritative state, including on first pin or Client reconnect, without replaying ordinary historical speech.
  • The pending request never auto-expires under decorative card timers or disappears through ordinary message retention/stack layering. It stays discoverable when Activity/DM/group playback is disabled; multiple requests form a stable, scrollable pending section with explicit overflow/pagination rather than silently dropping requests.
  • Allow once/reject and existing rule-saving actions preserve their current explicit choice and confirmation semantics. Closing/collapsing/hiding a presentation never grants/rejects/cancels the request.
  • A request addressed to a particular Bot/Channel/Session/call is submitted through a qualified request target even when an unrelated Channel is open. Adapt view-context guards deliberately; do not remove existing ownership/authorization checks globally.
  • The owner validates current pending status and authority at submission. Duplicate clicks or a competing decision from chat/another client cannot apply twice. Success, refusal, cancellation, timeout, archive/deletion and revocation reconcile both views and release the persistent card.
  • Stale/offline requests cannot be submitted until current ownership/status is revalidated. Host restart must not resurrect an expired process-local request from old Channel history; Companion Visibility never grants decision authority.
  • Shared pending-card lifecycle is complete for approvals in this slice and reusable by the question slice; no new Agent prompts/tools, generic bubble input or microphone UI.
  • Record the accepted attention-surface extension in an ADR and integrate living architecture in the same implementation PR, without silently rewriting the original spec.
  • Cover real approval -> companion decision -> native execution/audit, competing outcomes and cross-page/keyboard behavior; attach real screenshots and video in one PR.

Blocked by

None (can start immediately). Existing approval ownership/decision paths are available. No dependency on #1173 or improved geometric anchors.

Activity

  1. added this to the v1.2 milestone on Oct 8, 2026
  2. added
    ready-for-agentFully specified, ready for an AFK agent
    feature:avatarPersonaBot avatar media and activity frame
    area:fullstackEnd-to-end Host and Client implementation
    on Oct 8, 2026
  3. DoodleBears commented on Oct 8, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Codex
    • Task: codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269 (not a DSH Session)
    • Issue scope: persistent, owner-qualified Tool Approval cards and direct decisions across Harness pages; current pending discovery, lifecycle reconciliation, regression coverage and runtime evidence.
    • Branch: codex/1178-companion-approvals
    • Started: 2026-10-08 08:49 UTC
    • State: active
  4. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 8, 2026
  5. DoodleBears commented on Oct 8, 2026

    @DoodleBears
    ContributorAuthor

    Draft PR #1185 has full CI passing and independent Standards/Spec review with no implementation findings.

    Additional real isolated DSH API qualification (on #1179 with this prerequisite unchanged): actual native approval → Companion SSE despite decorative source switches being disabled; competing rejection accepted once, one canonical decision, request removed and actual Bot denial continuation. One-time allow also accepted and resumed, but native Shell provisioning refused the harmless echo before execution with the documented RC1 Windows ACL Win32 5 error. No protection was changed and no successful command execution is claimed.

    All four PR Lens SVG attachments were confirmed loaded in the GitHub page. Actual DSH companion screenshots/video and keyboard/theme inspection remain outstanding because Chrome navigation reports ERR_BLOCKED_BY_CLIENT and the IAB blocks loopback; this PR stays draft and the claim remains active.

  6. 6 remaining items

  7. DoodleBears commented on Oct 8, 2026

    @DoodleBears
    ContributorAuthor

    Agent work progress — actual Host restart recovery

    Task: codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269; existing active claim for #1178, branch codex/1178-companion-approvals, draft PR #1185. No merge or completion claimed.

    Integrated pinned latest main 5efae378 at runtime 3afc8f0a, using formal pixel-avatar0.7.0. A real native permission remains pending over an unrelated selected Channel. Stopping/restarting only the task-owned Host gives actual live→stale→live in the same browser document: controls disable during downtime, the expired old request disappears automatically, no historical speech is replayed, and a new canonical Bot DM arrives without reload. A stale decision is refused with invalid-input and no canonical decision is committed. The pending operation was never granted/executed.

    Evidence-only b593540f adds five real screenshots and one continuous official MCP WebM, remux only. The published PR now renders all19screenshots and links all4recordings. Full runtime CI 37849126603 and exact media-head CI 37850094508 both pass. Local typecheck,148files/1,058tests,lint/format/ledgers/build pass. Independent Standards and Spec reviews find no code defect/material smell.

    This is Host restart/new-generation recovery; it does not certify short same-Host interruption with a still-live owner. Actual concurrent Sessions/overflow and broad-rule persistence remain unqualified. Captures retain55expected connection refused/reset errors and native retry warnings during intentional downtime, with no other console error; this is not described as a clean-console run. All owned browser pages and verification browser are closed. Claim remains active.

  8. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    Actual same-Host Companion stream recovery

    Task codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269; existing active claim; draft PR #1185, evidence head 2b14c79fc546e15b4deafde94b45dd3eb2dcc83c, runtime source 3afc8f0a, formal pixel-avatar0.7.0.

    Added five actual1559×865 DSH screenshots and a continuous35second silent recording. Destroying the established shared Companion SSE and refusing four reconnect attempts produces stale state while other Host routes remain live. All45stale observations retain the current request with all four actions disabled. Restoring the stream revalidates the live owner in the same document/Host generation; native mouse rejection commits exactly one decision and resumes the original Bot to reply. A late duplicate is refused and the canonical decision count remains one. The unrelated conversation remains selected from setup baseline through settlement; a final explicit visit captures the owner DM reply. Native keyboard scrolling makes the action fully visible before interruption and after recovery.

    The first separate attempt's native MCP click timeout is retained and excluded; canonical cleanup is not described as native UI success. The successful run uses a distinct real request, actual native scrolling and measured action visibility, with no product code change.

    Both Standards and Spec reviews against latest fetched main 66d2767a report zero new implementation/evidence defects. The new commit's missing Issue trailer was corrected without changing its tree. Real simultaneous pending Sessions/overflow and actual saved broad rules remain partial; successful Shell execution remains unqualified after the earlier Windows ACL refusal. Prior native original-file execution remains independently audited. This is foreground Companion stream recovery, not full-network/background or overall issue acceptance. Browsers and the forwarding fixture are closed. The claim remains active; no merge or completion is claimed.

    Current-head CI: run37873845257, initially in progress; earlier successful CI is not attributed to this head. Corrected published media rendering is checked separately.

  9. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    Real simultaneous approvals and rule-save qualification

    Task codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269; existing active claim, PR #1185, evidence head b4748ae42889b85a95186eed49d29bc6dadedeac. Runtime source remains 3afc8f0a, formal pixel-avatar0.7.0.

    One new isolated QA Bot produces three simultaneous actual native approvals across three Sessions: two Assignments use a new empty QA Workspace Grant and native pwsh, while the Orchestrator uses native bash. All commands are harmless echoes and all three are rejected without execution. The pending list retains all three items at409px client/1458px scroll height; native Control+Home/End traverses0→1049px. Exact-request native keyboard rejection reduces pending3→2→1→0 while other owners stay pending. Each request has one canonical decision, with a duplicate refused and total still three. Original Orchestrator and Assignment continuations report the real denials; the Grant is revoked afterward.

    A separate actual study saves both exact-call and scope-wide all-opaque rules through companion controls. Opening/cancelling scope confirmation creates neither rule nor decision; explicit confirmation subsequently saves the rule. Each save produces the matching canonical rule and once-only decision, releases the card, and resumes the original Bot to report actual Tool outcome. A real Client reload changes document timeOrigin and the same canonical rule remains. Both temporary rules are revoked after qualification, leaving zero active rules. These authorized echoes are not successful Shell execution proof.

    Ten new screenshots and continuous40.567s/85.433s silent recordings are linked in the PR. Both studies have zero console errors and closed owned browsers. Some pre-action stills clip lower controls; native focus scrolls the selected control fully into view before Enter, with geometry asserted and the limitation disclosed. Real render verification checks all34screenshots and7recording links.

    Mandatory parallel Standards/Spec review against latest fetched main66d2767a reports zero new code/evidence defects or material smells. The two previously named bounded concurrent-list and saved-rule evidence gaps are closed; no arbitrary-load/background/future-rule-match/Host cold-start or overall Goal acceptance is claimed. Source did not change. JSON format/diff checks pass. Prior head2b14c79f full CI37873845257 passes; new head's CI37875229255 is initially in progress and reported separately. Claim remains active and no merge is claimed.

  10. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    Ready for review

    Task: codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269. PR #1185, head b4748ae, now passes its own complete CI37875229255: lint, format, typecheck, full tests and build/docs. Mandatory Standards/Spec review against latest fetched main66d2767a found no new implementation/evidence defects or material smells.

    The bounded simultaneous-Session/overflow and actual rule-save gaps are now qualified by real DSH. All34screenshots and7continuous recording links were verified on the published PR page; owned browsers are closed, temporary Grant/rules revoked, zero active QA rules remain. The verification helper initially searched for obsolete unqualified-state text; those failed reports remain preserved, and corrected checks confirm the actual remaining-limits disclosure. No product code changed.

    The PR is ready for Human review; no merge or issue completion is claimed. Successful native original-file execution is independently audited; the existing Windows Shell refusal and background/arbitrary-load/future-rule-match limits are still disclosed. This task's active claim remains until merge or handoff.

  11. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome — merged

    • Task: codex/local/01a11734-bb09-7f01-9d45-adc0f5df6269; state: completed for this implementation/merge scope.
    • Existing claim. Human explicitly authorized merge after conflict resolution. PR #1185 merged as 7a4f99316467ab401043b39495816b5591fe3e83.
    • Integrated latest main652410b5 while preserving transformed Avatar anchors and main's approved-but-waiting-for-Assignment-capacity status polling in the shared approval card. The retained regression fails before the polling port and passes after it.
    • Runtime1b00b0a5/formal pixel-avatar0.8.0 qualifies actual stream interruption/recovery, disabled stale actions, native mouse rejection, one canonical decision, original Bot continuation and late-duplicate refusal in one unchanged document over an unrelated Channel. Five actual screenshots and a continuous36.567s silent recording are embedded/linked in the PR; GitHub rendering is verified, owned browser/proxy closed. Historical media retain exact revision attribution.
    • Client/selected Host149files1085tests, typecheck/lint/format/ledgers/build pass. Independent Standards/Spec review reports zero unresolved source/evidence findings. Exact final-head full CI passes.
    • Limitations remain explicit: successful Shell execution is not claimed under the previously observed Windows workspace restriction; this new recording covers foreground Orchestrator recovery, not background or Assignment-capacity runtime. Historical dedicated rule-saving, concurrent Session and lifecycle captures remain separately attributed. Separate mouth publication/feedback and Window Companion: measure frame and heap costs and agree performance budgets #1167 performance work are not declared complete.

    No other active task claim was found for this issue scope. The implementation is merged; this comment does not retroactively expand the claims of older evidence.

  12. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 9, 2026
  13. DoodleBears commented on Oct 13, 2026

    @DoodleBears
    ContributorAuthor

    Closing as completed per the owner's request. #1185 merged (7a4f993) and is on latest main (7bc0319): packages/client/src/client/companion-requests-view.tsx and companion-requests.ts, the approval feed in packages/core/src/companions/feed.ts, and coverage in packages/core/test/human-inbox-tool-approval.test.ts. Real DSH qualification covers simultaneous approvals and overflow, rule saving, Host restart and same-Host stream recovery, and competing decisions, all in the merge comment above. The disclosed limits (Windows Shell ACL, background) are environment or #1167 items.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationfeature:avatarPersonaBot avatar media and activity frameready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions