DX-3101: fix Pi, Goose and Aider custom harness examples - #256
Open
alitariksahin wants to merge 2 commits into
Open
alitariksahin wants to merge 2 commits into
alitariksahin wants to merge 2 commits into
Conversation
Pi: pin pi-coding-agent 0.99.2 and use ModelRuntime (getModel left the pi-ai root in 0.80, so the example crashed on import); load MCP servers through Pi's MCP extension (extensionUrls never existed); pass images natively; fail the run on model errors; fix tool result output. Goose: map toolRequest/toolResponse message parts to tool events (Goose has no top-level tool_call events); report cache tokens and cost; keep the startup banner out of the result; save image attachments. Aider: keep banners and token lines out of the result; fail the run on litellm errors (aider exits 0); sum token lines including cache hits; pass image attachments with --read; drop temperature for Claude models this aider release doesn't know. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eparately Pi called process.exit() right after writing done, which could cut off a large result on a pipe; emit now resolves once the event is written. Aider prints the cost on its own line when there are cache reads and writes; cost lines are now parsed and filtered independently of the token line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes found while running every custom harness example against a real box.
Pi (was broken: both turns returned an empty result)
getModelmoved off the@earendil-works/pi-airoot in 0.80, so the unpinned install crashed on import. Now pins@earendil-works/pi-coding-agent@0.99.2and resolves models withModelRuntimeextensionUrlsisn't acreateAgentSessionoption. Box's servers are now written to the session'smcp.json(npm and URL, with headers,directexposure) and loaded by Pi's MCP extension;PI_CODING_AGENT_DIRpoints the extension at the session dirprompt(text, { images })); other binary files are saved under.box-attachmentserrorevent; Pi reports them on the message instead of throwing[object Object]; now the text contentpi_agenttool event and the stack trace in error messagesGoose
toolRequest/toolResponsemessage parts, nottool_callevents__( O)> new session…) no longer lands in the resultcost_usd; result is the final answer, with a paragraph break between text before and after tool callsAider
--no-check-update --no-show-release-notes --no-analytics, the rest filtered;COLUMNSwidened so long lines don't wrap past the filter)litellm.*Errorwith no successful call now fails the run--readclaude-sonnet-5-5) reject thetemperatureit sends; for models missing from aider's bundledmodel-settings.ymlthe harness writes a settings entry withuse_temperature: falseTesting
Live against Box for all three: streaming with tool events, follow-up session, token counts, MCP (npm
server-everything+ context7 URL; not Aider, which has no MCP), text + two same-named images, pause/resume,configureModel()before a follow-up, invalid key fails the run. All pass, except that Aider emits no tool events (it doesn't call tools). Each example file also ran unchanged end to end.Not fixed here (box-backend): a harness that exits non-zero without a
done/errorevent is reported as a completed run with an empty result, which is why the broken Pi example looked like it worked.🤖 Generated with Claude Code