Repository navigation
fix: make the flags and flow features the docs promised actually work (v2.16.0) - #243
Merged
Merged
Conversation
… (v2.16.0) The docs audit in #242 found commands that ignored their own flags or silently did something risky. Each was reproduced with the real CLI on main and confirmed fixed on this branch. - sync run: honour the profile's memory.embed, then defaults.embedOnSync. --embed was registered with a default of false, so "no flag" always meant "don't embed". The enrich phase now gets --embed/--no-embed too. - mem search --no-track and mem add --no-embed: read the property commander actually sets (track/embed), so both flags work. - mem search --deep: require hybrid search. When it can't run, fail and list what's missing (OpenAI key, pgvector) instead of quietly returning full-text results. - flow execute --mock: mock file-write steps too (report path and bytesWritten, write nothing). - Ctrl+C in flow execute/resume: really pause. The run stops before the next step, is saved as paused, and prints the resume command; a bash or code step the Ctrl+C interrupts re-runs on resume. A second Ctrl+C quits at once and still saves the run as paused. - onError fallback: run the fallbackStepId step when the step fails. The fallback must be a sibling and is skipped in normal order. The validator now checks fallbackStepId and rejects fallback in defaultOnError. - sync init: refuse to overwrite an existing profile unless --force (re-seed) or --config (merge). The drift hint now says --force and warns that it replaces the profile. - one --agent logout: needs --force, and clears only the config in effect unless --scope global|both. Docs (README, skill, flows reference, guide, help text) updated to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
The docs audit in #242 found commands that ignored their own flags, or quietly did something risky. #242 made the docs describe that behaviour; this PR fixes the code and puts the docs back.
Each bug below was reproduced with the real CLI built from
main, then confirmed fixed with the CLI built from this branch. Both ran offline in an isolatedHOME, with the One API and OpenAI faked atfetch, so no real config or memory store was touched.What changed
mainsync runignored the profile'smemory.embed(anddefaults.embedOnSync)embed: true: 2 records synced, 0 embedding calls--no-embedstill gives 0;defaults.embedOnSync: truealone gives 2mem search --no-trackdid nothingaccess_count3 → 4mem add --no-embeddid nothing (same root cause)mem search --deepdid nothingfts_only, exit 0searchMode: "unavailable",howlists every missing pieceflow execute --mockran file writes for realout/report.jsoncreated{ path, bytesWritten, _mock: true }completed); in a terminal the signal killed the code sandbox and the run was saved asfailedpaused, exit 130, prints the resume command; resume runs only the remaining steps; a second Ctrl+C quits at onceonError: fallbacknever ran the fallbacksync initoverwrote an existing profileconnection.tag,onInsertandmemorygonestatus: "exists", profile untouched;--configmerges,--forcere-seedsone --agent logoutdeleted both configs without askingconfirmation_requiredwithout--force; with--forceonly the config in effect;--scope global|bothto chooseDetails:
--embedwas registered with a default offalse, so commander always passedembed: false, which overrode the profile. A missingmemory.embedwas also coerced tofalse, sodefaults.embedOnSyncwas never read. The enrich phase now receives--embed/--no-embedtoo (it ignored both).--deep:--deepnow means "hybrid or nothing". The error names every missing piece at once (pgvector, OpenAI key) rather than one per attempt.FlowPauseSignal(likeFlowStopSignal) unwinds the run at the next step boundary. A step that fails while a pause is pending is treated as interrupted: no retry and noonError, and it re-runs on resume. Without that, a terminal Ctrl+C, which also signals bash and code child processes, would mark the run failed.flow resumegets the same Ctrl+C handling. Agent mode returns{"status": "paused", "pausedBefore", "resume"}.fallback: "<id>". If the fallback fails too, the flow fails. The validator now requiresfallbackStepId, checks it's a sibling and not the step itself, and rejectsfallbackindefaultOnError.sync init: the new--forcealso makes two existing hints valid: the runtime hint already suggested--force, and the drift warning suggested a baresync init, which would wipe the profile. The drift warning now says--forceand warns that it replaces the profile.one guideand--helpare updated to match.CLAUDE.md.Behaviour changes to note
one --agent logoutnow need--force.sync initon an existing profile now exits 1 instead of replacing it.mem search --deepnow exits 1 when semantic search can't run.Not in this PR
--mockstill runscode.modulesteps for real (they have full Node access).mem flush, themem sqlguard,mem doctorwithout pgvector) are untouched.Testing
mainbefore its fix).resolveConfiginsrc/lib/config.test.ts, which fails the same way onmainand isn't touched here.npm run typecheckpasses.--deepsuccess path (key plus pgvector giving hybrid results), because this machine's bundled Postgres has no pgvector.🤖 Generated with Claude Code