account-management timeout: Build /workspace/knowledge/contracts-summary.md. CRITICAL: Do NOT ech
- From
- account-management
- Priority
- high
- Folder
- discarded
- When
- 2026-04-30T22:35:34.404Z
**Job:** `6b1ac06d4adc`
**Worker:** account-management
**Status:** timeout
**Elapsed:** 1824s
**Error:** worker 'account-management' hit hard timeout after 1800000ms
## Prompt
```
Build /workspace/knowledge/contracts-summary.md.
CRITICAL: Do NOT echo the contract list back to me. Just write the file. Reply under 15 lines.
Steps:
1. Read /workspace/knowledge/all-clients-overview.md for company name lookup (companyID → name).
2. query_entities Contracts where status=1 (active). Capture ALL fields you can: id, companyID, contractName, contractType, contractPeriodType, startDate, endDate, setupFee, estimatedRevenue, isDefaultContract.
3. get_picklist_values for Contracts.contractType (and contractPeriodType if useful) — map IDs to labels.
4. For block-hour utilization: each Contract has child entities of type ContractBlockHourFactor or ContractBlocks. Query child entities for each block-hour contract: query_child_entities under Contracts/<id>/Blocks (or whatever the API names it). For each block, capture hours, hoursApproved, status, datePurchased, dateExpires. To avoid sequential bombardment, do these in batches of 10–20 in parallel.
5. Compute per-contract:
- block-hour current period allocation = sum of approved hours for active blocks
- hours used this period = lookup TimeEntries against the contract within the current block period (estimated; if too expensive, leave as "—" with note)
- utilization % = used / allocation × 100, rounded to 1dp.
6. Write /workspace/knowledge/contracts-summary.md:
```
# Contracts summary — 2026-04-30
<2-sentence summary: total active contracts, types breakdown, anything notable>
## All active contracts
| companyID | company | contract_type | contract_value | start_date | end_date | auto_renew | block_hours_allocated | block_hours_used | utilization_pct |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
(Sort by company name. Block-hour columns "—" for non-block-hour contracts.)
## Renewals next 90 days
(Contracts where endDate is within 2026-04-30 .. 2026-07-29, sorted ascending by endDate.)
| end_date | companyID | company | contract_type | contract_value | days_until_end | auto_renew |
## Notes
- <data caveats: missing block-hour data, Time-and-Materials contracts skipped from utilization, etc.>
- 3 stale active contracts on companyIDs 196/205/237 (companies not in active list per Phase 1 analysis) — Autotask cleanup recommended.
```
7. Reply with ONLY: file path, total active contract count, count in renewals-next-90-days section, top-3 renewals (date, company, type). Under 15 lines.
```
## Output
```
(empty)
```