Outro names a report file the agent was told not to write
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, documentation
Research direction
Start by reading the conflicting instructions in src/agent/tools/handoff.ts and src/agent/agent-prompt.ts. Then examine the outro logic in src/agent/runner/sequence/linear.ts and src/ui/tui/screens/OutroScreen.tsx to see where the report file name is used. The fix involves aligning the instructions and conditionally displaying the file path only if the file exists. Run a test program to verify the behavior.
Written by the indexing model from the issue text.
Description
Problem
Main now has part of the "report goes through publish_handoff" change, and the outros point at files that do not exist.
#1141 (merged 2026-08-27) added this clause to the publish_handoff description: "do not write the report to a file yourself". It is at src/agent/tools/handoff.ts:30-33 on main (d8486dc1), and the pi tool uses the same text. The rest of the code still asks for the file or says it exists:
skillPromptstill says "write a brief markdown report to ./${reportFile}" (src/agent/agent-prompt.ts:54). Every program with askillIdgets this line.- The context-mill skills still say to write it.
context/skills/data-warehouse-source/description.md:99says "write the report file requested by the wizard".context/skills/audit/references/6-report.md:7and:52say toWriteposthog-audit-report.mdto disk. context-mill#306 moves these skills topublish_handoff. It is still a draft. - The outros show the file name and never check the file exists.
src/agent/runner/sequence/linear.ts:294-300passesrun.reportFilethrough.src/ui/tui/screens/OutroScreen.tsx:87-93prints "Check ./… for details", andsrc/ui/tui/exit-line.ts:91-92adds the same line on exit.src/ui/tui/screens/audit/AuditOutroScreen.tsx:64-76prints "Report saved to:". The audit success message atsrc/lib/programs/audit/index.ts:48, the ledger row label atsrc/lib/programs/audit/seed.ts:99-103and the "Write report" slide atsrc/ui/tui/screens/audit/slides/writeReport.tsx:25also name the file. - On main,
publish_handoffwrites a file only when the host setsPOSTHOG_HANDOFF_OUTPUT_PATH. The TUI does not set it, so nothing is written to the project. - The wizard-workbench warehouse grader also expects the file. Its "report written" check passes only when
result.reportFile.existsis true (PostHog/wizard-workbenchservices/wizard-ci/warehouse-checks.ts:813-820), so a run that follows the tool description fails it.
Evidence
Each run follows one instruction or the other. We saw this in a real-TUI sweep of all nine programs on the refactor stack head d938a43b (#1307), which has the same code for this path as main:
- warehouse (
revenue/stripe/stripe-saas-demo): the agent called onlypublish_handoffand marked "Write setup report" completed. The outro says "Check ./posthog-warehouse-report.md for details". No file was written. - audit (
audit/posthog-demo-3000): the agent resolvedwrite-reportas pass: "Final markdown report delivered through the wizard handoff." The outro says "Report saved to: /posthog-audit-report.md". No file was written. The Release A top (200961f8) did the same. - metrics (
express-todo, orchestrator flow): the report went only to a notebook. The orchestrator outro does not name a file, so it shows nothing false. - ai-observability wrote its file and also called
publish_handoff. On 200961f8, warehouse wrote its file too. The result depends on which instruction the model follows.
The stack carries the same lines at other positions (src/agent/agent-prompt.ts:54, src/agent/tools/handoff.ts:33, src/agent/runner/sequence/linear.ts:314, src/ui/tui/screens/OutroScreen.tsx:107, src/ui/tui/screens/audit/AuditOutroScreen.tsx:67, src/programs/resolve-run-definition.ts:56), so this is not a stack regression.
Prior work
#1047 (open draft, last updated 2026-07-31, conflicting) makes publish_handoff the only report channel. It changes skillPrompt, stops programs naming a .md file, and shows the file in the outro only when one was written. context-mill#306 is its skill-side pair. Both are stale, and #1047 predates #1141, so it does not describe the contradiction main has now. Its base is ce8b70d3, and the files have moved since: src/lib/agent is now src/agent, and src/lib/wizard-tools is now src/agent/tools.
#811 (open draft, stale since 2026-07-06) gates the linear-runner outro on the file existing. It is on old paths and does not cover the audit success message or screen.
Suggested fix
- Now: pick one instruction. Either drop "do not write the report to a file yourself" from
PUBLISH_HANDOFF_DESCRIPTIONuntil the rest moves, or changeskillPromptto order apublish_handoffcall and stop naming the file. - Until one channel remains, show a report path only when that file exists in
installDir. #811 did this for the linear runner. The same check needs to cover the audit outro screen, the audit success message and the exit line. - Longer term: land #1047 and context-mill#306 together, or close them and do the same change on the current paths. Update the workbench "report written" check to accept the published handoff when the program no longer names a file.
- Dominant language
- TypeScript
- Stars
- 204
- Forks
- 54
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PostHog/wizard
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
PostHog/wizard#1460 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Self-driving setup: checkbox labels and Confirm button overlap wrapped description textMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PostHog/wizard#986 · 4 comments ·
Maintainers usually reply within 1 day
-
Intro shows "(detected)" after a manual pick from the detection-failed pickerPossibly taken @ShobhanKarthish claimed this 72 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
nip98: validateEvent skips the payload check for a string or bytes bodyMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nbd-wtf/nostr-tools#599 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LemmyNet/lemmy-ui#4442 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Zettlr/Zettlr#6664 · 1 comment ·
Maintainers usually reply within 1 day
-
Microsoft Outlook add attachment reads the binary field from item 0Possibly taken @joshbarros claimed this today. Openstatus:in-linear
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
n8n-io/n8n#44021 · 2 comments ·
Maintainers usually reply within 1 day