Patches for pi-subagents to fix provider compatibility and timeout defaults.
Issue: Fireworks API rejects tool parameter schemas containing allOf with multiple if keys, returning:
Error: 400 {"error":{"type":"invalid_request_error","message":"Conflict in schema definitions for key 'if'. Previous: {'required': ['expand']}, New: {'required': ['collect']}"}}
Root cause: ChainItem in src/extension/schemas.ts uses allOf with 3 separate if conditionals — valid JSON Schema Draft 7, but Fireworks can't handle multiple if keys at the same level.
Fix: Replace allOf + multiple if with a single if/then/else.
- allOf: [
- { if: { required: ["expand"] }, then: { required: ["parallel", "collect"], ... } },
- { if: { required: ["collect"] }, then: { required: ["expand", "parallel"], ... } },
- { not: { required: ["expand"], properties: { parallel: { type: "array" } } } },
- ],
+ if: { required: ["expand"] },
+ then: { required: ["collect", "parallel"], properties: { parallel: { type: "object" } } },
+ else: { not: { required: ["collect"] } },Behavior preserved:
- expand present -> requires collect + parallel as object
- collect present without expand -> rejected
- Neither present -> parallel type unrestricted (array or object per field definition)
Issue: Async subagents running long silent processes (gh watch, CI watchers, etc.) hit needs_attention state after 60s of no activity. The control system emits a notification and the subagent appears to report back after 60s.
Root cause: DEFAULT_CONTROL_CONFIG.needsAttentionAfterMs in src/runs/shared/subagent-control.ts defaults to 60,000ms (60s).
Fix: Raise both needsAttentionAfterMs and activeNoticeAfterMs to 300,000ms (5 min).
- needsAttentionAfterMs: 60_000,
- activeNoticeAfterMs: 240_000,
+ needsAttentionAfterMs: 300_000,
+ activeNoticeAfterMs: 300_000,Can also override per call:
subagent({agent: 'watcher', task: '...', async: true, control: { needsAttentionAfterMs: 300_000 }})To disable control entirely:
subagent({agent: 'watcher', task: '...', async: true, control: { enabled: false }})