Commit Graph
46 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Opus 5.5 d557e42676 Q77: a session keeps the model and account it started with
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:03:11 -04:00
ZacharyZhang-NYandClaude Opus 5.5 8fcdd61bc5 Q76: runs call the agent's own model, or fail plainly where the provider cannot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:53:25 -04:00
ZacharyZhang-NYandClaude Opus 5.5 05e296bd5d Q71: rate limits seen on successful calls are recorded and park an exhausted provider
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:18:40 -04:00
ZacharyZhang-NYandClaude Opus 5.5 bb279ff85a Q70: provider cooldowns survive restarts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:07:17 -04:00
ZacharyZhang-NYandClaude Opus 5.5 c6a0460035 Q69: provider failures classify by status and code; cooldowns follow Retry-After or back off
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:03:37 -04:00
ZacharyZhang-NYandClaude Opus 5.5 4325dfa874 Q68: sessions are bounded in time, tool calls per turn and goal audits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:50:26 -04:00
ZacharyZhang-NYandClaude Opus 5.5 88463e4396 Q60: step limits end sessions as checkpoints; only sessions without progress spend the budget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:33:57 -04:00
ZacharyZhang-NYandClaude Opus 5.5 d72333a04c Q56: disconnecting a provider stops the sessions using it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:02:46 -04:00
ZacharyZhang-NYandClaude Opus 5.5 9e1f8da11c Q55: the operator can stop in-flight runs; pause stops them too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:59:03 -04:00
ZacharyZhang-NYandClaude Opus 5.5 e809cfefea Q54: later sessions see what earlier ones already did and where they failed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:35:27 -04:00
ZacharyZhang-NYandClaude Opus 5.5 69e991ff93 Q52: goal closures stop linked work, and running sessions hear goal changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:16:48 -04:00
ZacharyZhang-NYandClaude Opus 5.5 7659adbbdd Q49: a task that spends its run budget shows as stalled; edits start a fresh budget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:38:02 -04:00
ZacharyZhang-NYandClaude Opus 5.5 090c37abb8 Q48: each agent's heartbeat interval paces its queued work
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:25:06 -04:00
ZacharyZhang-NYandClaude Opus 5.5 b164677ea7 Q46: parents wait for their subtasks and cannot close while any are open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:13:35 -04:00
ZacharyZhang-NYandClaude Opus 5.5 8b521ef5d9 Q44: queued runs re-check their task and are superseded when it changed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:59:14 -04:00
ZacharyZhang-NYandClaude Opus 5.5 5698e61e5a Q43: manual runs refuse done tasks and tasks with a session in flight
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:47:17 -04:00
ZacharyZhang-NYandClaude Opus 5.5 7be072f8c5 Q40: tasks choose a writing mode; house style applies to conversational work only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:28:47 -04:00
ZacharyZhang-NYandClaude Opus 5.5 645ce686bb Q39: runs load only model-compatible skills and state each skill's contract
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:22:08 -04:00
ZacharyZhang-NYandClaude Opus 5.5 f7530ba65b Q38: the prompt names skill tools the run cannot call, not a fake allowlist
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:14:41 -04:00
ZacharyZhang-NYandClaude Opus 5.5 18128b5ad4 Q26: knowledge has scope, expiry, and supersession
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:47:03 -04:00
ZacharyZhang-NYandClaude Opus 5.5 8c70111c93 Q25: runs leave outcomes and failure causes as searchable memory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:34:17 -04:00
ZacharyZhang-NYandClaude Opus 5.5 12e2d9dcd5 Split task execution: run preparation, provider cooldowns, heartbeat
Pure move to keep task-execution-service under 500 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:27:14 -04:00
ZacharyZhang-NYandClaude Opus 5.5 95e607bea7 Q24: knowledge enters the run: search and record tools, relevant entries in prompts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:20:03 -04:00
ZacharyZhang-NYandClaude Opus 5.5 b32e784469 Q19: pack the skills most relevant to the task first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 04:48:44 -04:00
ZacharyZhang-NYandClaude Opus 5.5 f4d16eb46a Q17: budget every model request against the provider's context window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 04:40:02 -04:00
ZacharyZhang-NYandClaude Opus 5.5 469f2f2c35 Q15: show which messages each agent actually read
Runs record a context manifest once a model turn succeeds; the chat
marks each human message with the agents that read its current version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 04:21:57 -04:00
ZacharyZhang-NYandClaude Opus 5.5 31ab919334 Q10: wake tasks no longer carry a truncated copy of the message
Manual re-runs of a chat wake answer the same thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:36:22 -04:00
ZacharyZhang-NYandClaude Opus 5.5 2a7b17a47a Q8: one writing run per workspace directory
Write-granted runs whose directories overlap (same folder, symlink or
junction, or nested) wait for each other, at claim time and for manual
runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:25:39 -04:00
ZacharyZhang-NYandClaude Opus 5.5 72eb645067 Q7: an agent runs one session at a time
Claims skip agents that already have a running run, manual runs refuse a
busy agent, a run whose task was reassigned fails before executing, and
tasks with a run in progress cannot be deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:11:39 -04:00
ZacharyZhang-NYandClaude Opus 5.5 0fb4ca9ae6 Q6: feed messages that arrive mid-run into the next model turn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 02:58:54 -04:00
ZacharyZhang-NYandClaude Opus 5.5 46dd77ddda Q5: give chat wakes timed, attributed history apart from the new ask
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 02:48:15 -04:00
ZacharyZhang-NYandClaude Opus 5.5 6570492daa Q3: record a structured handoff on every delegated task
create_task now pins upstream files by content hash and carries the
source task, source thread, verified facts, open questions and
acceptance criteria into the assignee's prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 02:35:12 -04:00
ZacharyZhang-NYandClaude Opus 5.5 77505aab8d Q1: keep other work's chat mentions out of task prompts
Every mention already wakes the agent through its own chat-wake task, so
ordinary tasks no longer inject the org-wide mention inbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 02:19:48 -04:00
ZacharyZhang-NYandClaude Opus 5.5 56b0594f91 Move Composio, logo.dev and Antigravity keys into Settings
The three third-party keys were hardcoded or read from the environment.
Operators now enter them in Settings > Integrations; they are stored
encrypted in the app-wide integration_keys table (migration 058).
An agent holding connector grants fails loudly when no Composio key is
saved. The goal-review test no longer depends on absolute dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 01:34:14 -04:00
ZacharyZhang-NY 7de378b41c A chat-wake reply is delivered by the system, not by prompt compliance
A wake run whose model answered in plain final text (the coding-tuned
Kimi family does this instead of calling send_message) completed
'successfully', closed its vehicle task, and left the founder staring
at a silent conversation — the reply lived only in provider_requests.
deliverChatReplyIfMissing now runs before a chat-wake run may complete:
when the run never posted into the source thread (run-start watermark,
so a send_message it did make suppresses the fallback), its final text
is delivered as the agent's reply. A delivery failure fails the run
loudly instead of closing it on silence.
2026-07-16 11:46:53 -04:00
ZacharyZhang-NY 75c73ce6f0 The founder probes through provider cooldowns; a served request lifts the park
A single transient failure from a background run used to silence the whole
company — founder included — for the full ten-minute cooldown. The
interactive lane now claims one probe per park window: the founder's
message tries the provider immediately, a success lifts the cooldown for
everyone (a served request is proof of health), and a failed probe re-arms
the park with the probe spent, so a real outage is never hammered.
Autonomous work still waits cooldowns out unconditionally.
2026-07-14 21:19:14 -04:00
ZacharyZhang-NY c7eafb2836 Founder-CEO chat round trip proven end to end; agents see the founder
loadChatContext labels human senders "[Name (founder)]" so a woken agent
knows it answers its boss, not a teammate. New integration test drives
the whole loop — founder DM wakes the CEO, the prompt names the founder,
the reply lands in the same pinned conversation and thread, the wake
task closes — and a Playwright spec pins the UI contract: badged CEO row
first, selected by default, message queues the wake run, channel recency
never displaces the pin. AGENTS.md documents the feature contracts.
2026-07-14 00:23:49 -04:00
ZacharyZhang-NY 291816aa06 Give agents hands: workspace read/list/exec tools so engineers build instead of describing
Every "engineering" deliverable the company ever produced was a markdown
skeleton, because documentation was the ceiling of the toolset:
write_deliverable and create_document were the only artifact tools. An
engineer could not see the files that exist, read a line of code, or run a
single command — and create_task hardcoded requires_filesystem to false, so
the entire approval-gated read_write mount plumbing was dead code.

New workspace capability (agent-workspace-tools.ts):
- list_files / read_file: explore the bound workspace, traversal-guarded by
  the same resolveWorkspacePath used for writes, size- and count-capped.
- run_command: real shell execution with the workspace as cwd, 120s timeout,
  16k output cap. Gated on the task's approved filesystem grant — the same
  requires_filesystem flag that flips the mount to read_write and routes the
  task through operator approval (auto-approved only in AI-CEO mode, which
  is that mode's explicit contract).
- create_task now takes requires_filesystem, so the CEO and officers can
  delegate engineering work that is allowed to change code and run tests.
- Prompts brief every agent on the tools, and filesystem tasks state the
  bar directly: real output is code that builds and tests that pass — a
  document describing the work does not close an engineering task.

Tests: tool registry, dependency-folder-skipping listing, traversal refusal,
the run_command access gate plus exit-code reporting, and the create_task
approval path for filesystem work.
2026-07-09 19:23:28 -04:00
ZacharyZhang-NY 9c85b5ee3c A task is finished when it reaches done, not when a run ends
The two real goal tasks from July 9 each got exactly one session: the run
completed, the agent never moved the task off backlog, and the heartbeat's
"has a completed run" exclusion locked them out forever. The agents could
not have closed them anyway — update_task_status requires a task_id the
prompt never carried.

The progress contract, made explicit end to end:
- The task prompt now carries "Task id: ..." and tells the agent exactly how
  to end a session: done via update_task_status when the work is complete,
  in_progress with a note on what remains when it is not.
- The heartbeat re-enqueues any open task with no run in flight — a
  completed run that left its task open earns a follow-up session, with the
  prompt stating how many prior sessions were spent so the agent continues
  instead of redoing work. The retry budget (3 non-transient runs) still
  bounds every task; a task that spends it parks with one log line naming it.
- Scripted agents in the integration suites now close their tasks the way
  the contract expects real ones to.
2026-07-09 19:17:44 -04:00
ZacharyZhang-NY 2526633bfb Chat-wake tasks live and die with their reply run
Of the 202 tasks stranded in the backlog on July 9, 200 were "Reply to ..."
wake vehicles: every agent @mention creates a task plus a queued run, the
reply goes out, and nothing ever closed the task — a task with a completed
run is never enqueued again, so each one became a permanent zombie row. On
top of that, every message in an active thread minted a fresh wake even when
the target already had one queued, multiplying runs that would each read the
same conversation.

The lifecycle contract, made explicit:
- The reply run IS the wake task's deliverable. Completing a chat_mention
  run now closes its task (backlog/in_progress -> done, via the audited
  status path). Tasks an agent moved to review are left alone.
- One pending wake per (agent, thread): wakeFromMention returns the queued
  run instead of minting a duplicate — that run reads the thread's newest
  messages when it executes anyway.
- Migration 054 heals existing rows: wake tasks whose runs are all spent
  close as done; in-flight wakes keep working. This also stops Fix 1's
  retry-budget healing from resurrecting 31 stale replies on next launch.

The chat-governance loop test now completes each pending wake run between
posts, matching how the exchange actually interleaves in production.
2026-07-09 19:11:02 -04:00
ZacharyZhang-NY 927bdc91f2 Self-healing queue: transient provider failures park the provider, never burn retries
The July 9 run died at 07:22 when the GPT account hit its plan-side usage
limit: every later request failed with "The usage limit has been reached",
each failure counted against the 3-attempt retry budget, and 31 tasks were
abandoned for good while the worker kept hammering 12 doomed requests a
minute until the queue drained.

Root fix, three parts sharing one classifier:
- isTransientProviderFailure() in provider-runtime-domain recognises
  provider-side verdicts (usage limit, rate limit, 429, overloaded) plus the
  internal monthly-quota message; matching is against recorded
  task_runs.error_message rows, so historical damage heals retroactively.
- enqueueHeartbeatRuns computes the retry budget with that predicate instead
  of an exact match on the internal quota string alone.
- A transient failure parks the provider for a 10-minute cooldown: the
  heartbeat stops enqueuing its tasks and the worker leaves its queued runs
  unclaimed, then a single probe run re-arms or clears the park. Transitions
  are logged once each way.

Tests: predicate unit tests, budget-exemption regression on the raw provider
message, cooldown park/resume with an injected clock, claim exclusion.
2026-07-09 19:04:44 -04:00
ZacharyZhang-NY 349547a0de Resume parked work when a provider's monthly limit is raised
The heartbeat scheduler enqueued runs even while a provider's monthly
usage window was full, so every task burned its 3-attempt retry budget
on instant quota failures within seconds and stayed dead forever -
raising the limit (or restarting) never revived anything.

- Park tasks (skip enqueue) while their provider is at its
  monthly_request_limit instead of creating runs doomed to fail
- Exclude quota-blocked failures from the 3-attempt retry budget,
  retroactively reviving tasks abandoned by past filled windows
- Share the gate message as PROVIDER_MONTHLY_LIMIT_MESSAGE and log
  quota-block transitions once per state change for diagnosability
- Ignore landing/ (self-contained Next.js sub-project) and
  built-in skills/ (prompt content) in eslint so verify:ci lints only
  application code
2026-07-08 20:51:24 -04:00
ZacharyZhang-NY 155c08b16d Language picker on the onboarding welcome step; agents work in the app language 2026-07-07 15:59:16 -04:00
ZacharyZhang-NY a95859a9f7 Brief agents on their connectors, skills, and the CEO's grant authority; CEO predicate follows role_level 2026-07-07 14:19:08 -04:00
ZacharyZhang-NY defe8f12b1 Make the CEO the grant authority: implicit all-access, agent-tool grants, no manual assignment UI 2026-07-07 11:24:28 -04:00
ZacharyZhang-NY 07d0b4587d Promote AgentCompany-New to the repository root and retire the old app
The legacy application - its src, tests, landing site, promo assets, docs,
release tooling, CI workflows, and root configs - leaves the tree; it stays
reachable in history. Everything under AgentCompany-New moves up unchanged:
same package name, so the production userData/database path is untouched,
and e2e/build scripts already resolved paths relative to the project. The
developer cred.txt stays gitignored at its new location. Full verify:ci
passes from the new root.
2026-07-07 00:04:13 -04:00