Repository navigation
fix: retry project detection when agent output has no JSON - #1305
Merged
Merged
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
edwinyjlim
approved these changes
Sep 22, 2026
gewenyu99
added a commit
that referenced
this pull request
Sep 23, 2026
Brings in the eight main fixes since beccc79 (#1275, #1280, #1284, #1294, #1295, #1301, #1302, #1305). One conflict: agentic detection keeps main's two-attempt retry loop from #1305 and adds A1's progress emitter to the agent it initializes. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
gewenyu99
added a commit
that referenced
this pull request
Sep 23, 2026
Brings the final Release A into B1: main through #1305, the per-request ask signal, host-owned terminal analytics with the flush guard, and A3's explicit failure status, fatal-path funnel events and linear run cancellation. Four conflicts, each resolved to A3's content at B1's program paths: - the agent README paragraph that names the adapter; - the import blocks of the adapter test and the project-scope test; - #1305's new detection retry test, which lands in the renamed src/programs/detection/__tests__ and imports @programs/detection/agentic. #1305's timeout entry lands in the renamed src/agent/error-map.ts. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
gewenyu99
added a commit
that referenced
this pull request
Sep 23, 2026
…book - Two agent entry comments said the bindings leave in B1. B1 deferred PROGRAM_BINDINGS to B2, so they say B2. - The shared README said claude-settings.ts and errors/agent-map.ts import agent leaf modules. Neither does any more. The one agent import left in shared is the type-only InstallSkillResult in errors/skill-map.ts. - The agentic detection runbook cited the removed AGENTIC_DETECTION_TIMEOUT_MS. Since #1305 the scan gets two attempts, 60s then 90s. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
gewenyu99
added a commit
that referenced
this pull request
Sep 23, 2026
Brings the final Release A, through the new B1, into the callable program
host. B2's structure stays; A's agent contract holds throughout:
- asks and task notices take { signal }, and cancelAsk, cancelTaskNotice
and cancelQuestion are gone;
- the linear sequence owns a run controller;
- the orchestrator's fatal path reports blocked tasks;
- the agent never sends terminal analytics.
The adapter calls wizardAbort with an explicit status: 'cancelled' only when
the host cancelled, 'error' otherwise. After a non-composed success it sends
'success' behind the flush guard.
main's fixes land where B2 moved the code:
- #1284's warehouse seed cap goes into posthog-integration/run.ts;
- #1280's scan step goes into B2's downloadSkill;
- #1305's two detection attempts share one inference-auth provider;
- the #1305 timer and B2's host-abort check sit side by side in
agent-interface.
B2's skill-cleanup test now expects an agent [ABORT] to end as failed, and
its host-abort test checks that an unmarked user skill survives.
Generated-By: PostHog Desktop
Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
gewenyu99
added a commit
that referenced
this pull request
Sep 23, 2026
Brings the final Release A, through B1 and B2, into B3. What landed in the renamed adapter, src/lib/runners/run-program-agent.ts (git followed the rename): - B2's runLegacyStep; - the explicit wizardAbort status; - 'success' sent behind the flush guard. Detection keeps #1305's two attempts, with one inference-auth provider, plus B3's host context. project-scope uses #1305's timeout handling through B3's host. B3-11 is also in this merge: the dead AgenticDetectOptions.inferenceAuth option is deleted, and a test checks that both attempts share the host's progress and provider. Seven conflicts, all resolved to both sides' intent. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Retry project detection once in a fresh Haiku session when the first scan finishes without usable JSON or times out. Keep
[ABORT]as a valid empty scan and preserve the existing error path for other agent failures.The first SDK run has a 60-second limit; the retry has a separate 90-second limit. Each deadline aborts its SDK query. The wizard waits for the retry result instead of discarding it at the old 60-second caller deadline.
Flow
sequenceDiagram participant caller as Wizard caller participant detect as Project detector participant agent as Haiku agent runner participant parse as JSON parser caller->>detect: Scan repository detect->>agent: Fresh session, 60-second limit agent-->>detect: Transcript, result, or timeout detect->>parse: Combined output when run completes parse-->>detect: Report or no JSON alt Valid project JSON parse-->>detect: Report detect-->>caller: Select recommended project else ABORT marker detect-->>caller: Empty report else Timeout or no JSON detect-->>caller: Retry progress detect->>agent: Fresh session, 90-second limit agent-->>detect: Retry transcript, result, or timeout detect->>parse: Combined retry output when run completes parse-->>detect: Report or no JSON alt Valid project JSON detect-->>caller: Select recommended project else ABORT marker detect-->>caller: Empty report else No JSON or retry timeout detect-->>caller: Error or timeout; keep install directory end endVerification
scrubHomePathsexport that blocked the build.git diff --check: passed.