Skip to content

Scheduled workers: chat-first recurring tasks with memory, chief agent, and employee chat UI - #3

Open
15273 wants to merge 24 commits into
mainfrom
feature/recurring-tasks-chat
Open

15273 wants to merge 24 commits into
mainfrom
feature/recurring-tasks-chat

Conversation

@15273

@15273 15273 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rebuilds the recurring-tasks ("scheduled workers") experience end-to-end across the bridge and the extension, following the 16-task implementation plan.
  • Backend (dev_bridge): schedule-run records with question/answer tracking, per-task memory injection, autonomy policy and reporting contract in worker prompts, a chief agent that auto-answers routine worker questions, per-session chat-first schedule setup (draft meta/commit helpers, new routes + MCP tools).
  • Extension UI: schedules tab redesigned as an employee list with a per-task chat feed (ScheduleChatPanel), chat-first schedule creation with a live draft card replacing the modal wizard, human-readable timestamps, and removal of the old ScheduleDetailPanel.
  • Also raises the subprocess stream limit so image tool_results don't kill the reader.

Test plan

  • Backend: 634 pytest tests passing, 1 skipped (only failure is the pre-existing environment-dependent test_agents_scanner, which fails identically on a clean tree)
  • Extension: 144 vitest tests passing across 17 files
  • Extension npm run build passes

🤖 Generated with Claude Code

15273 and others added 24 commits August 21, 2026 17:40
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prevent infinite loop in _next_run_at when recurrence value is 0 or negative.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t the store has none.

Permission cards arrive on WS frames and are not in the JSONL transcript,
so a missed frame (closed socket, store rebuild) left the "Waiting for
your approval" banner with no card to answer. Recovery now re-runs from
the /sessions poll whenever `awaiting` is set with no unresolved local
card, and runs after SET_SESSIONS so it can't land before the session
exists in the store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-check settings.paused (freshly loaded) before each schedule-pass
slice in _loop's sub-loop, so a manual pause or the auto-pause quota
safety stops schedule-born dispatch within one slice instead of
waiting out the full tick interval. Extracted the decision into a
pure _should_run_schedule_pass(settings) helper for unit testing,
since driving _loop's while-True loop directly in a test is awkward.
… hung one.

mcp 2.0 removed `mcp.server.fastmcp`, silently killing every DevScope stdio
MCP server (browser-control included) — sessions fell back to a playwright
--extension server whose calls hang until the 900s watchdog kills the turn.
Pin the dep to match pyproject, and append fallback guidance to the system
prompt: on a failed/hung/blocked tool, switch tools (browser-control first,
then WebFetch/WebSearch) rather than retrying into the watchdog.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The plain python3 command resolved to Homebrew's interpreter, which lacks the
mcp package, so all seven devscope_bridge MCP servers died on import
(CONNECTION_CLOSED at registration). Point them at the venv interpreter that
has the pinned mcp<2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed runs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Also cap run-report/memory payload sizes and mark task memory as
untrusted data in worker prompts (security-review findings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the steward chat route so the user can talk to a recurring task,
replaces ScheduleDetailPanel with ScheduleChatPanel (run digests, inline
question answering, run-now/pause/delete, playbook drawer).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… card

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Manual E2E checklist (run with bridge restarted on this branch + extension reloaded):
1. '+ משימה חדשה' opens a setup chat; draft card fills in as the interview lands facts.
2. schedule_commit in chat -> card flips to success -> 'לצ'אט של המשימה' opens the feed.
3. 'הרץ עכשיו' -> run digest bubble appears within ~1 min; artifact chips clickable.
4. Worker task_ask_user -> amber question card -> inline answer resumes the run.
5. Composer message opens the sched-steward chat with task context.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ader

A single stream-json stdout line can carry an image tool_result (149KB-843KB
observed). asyncio's default 64 KiB readline limit makes 'async for raw in
proc.stdout' raise ValueError mid-turn; the reader dies silently, no further
frames reach the panel, the turn never registers as complete, and the
watchdog/idle-eviction kill the session — the user sees the agent 'start
working and disappear'. Spawn every claude subprocess with limit=16 MiB.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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