fix: restore watch defaults and align agent status, undo, cron fork, and completion budget behavior - #336
Conversation
…pletion budget behavior Watchers default back on, NotifyUser nudges respect the host update panel, permission mode changes publish agent.status.updated, undo drops its turn's interruption reminder, forks clear inherited cron tasks with a notice, and the completion token cap is only sent when configured.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: PyModel/pythinker-code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
…337) ## Requirement or Bug Make workspace trust transparent: a headless trust opt-out and a prompt that shows what trusting would activate. ## Bug Reproduction Steps N/A (features). ## Root Cause Headless runs had no way to pre-trust a workspace, and the trust prompt asked for a decision without showing what it would enable. Both addressed at the service layer. ## Code Changes - New `PYTHINKER_CODE_TRUST_WORKSPACE=1` env var trusts the current workspace for headless runs without answering the trust prompt; untrust reports the effective state. - The workspace trust prompt now lists the MCP servers, extra directories, and project instruction sources that trusting would activate, backed by a typed `WorkspaceTrustDisclosureService`. - SDK `getWorkspaceTrustInfo` gains `origin`, `gatedAdditionalDirs`, `additionalDirSources`, `warnings`, and `instructionSources`. - Docs: `env-vars.md`, `mcp.md` rows for the new variable and warning text. ## Impact Scope - `packages/agent-core-v2` (workspaceTrust domain, program wiring, trust prompt, mcpRegistry), `packages/agent-gateway` (env trust, untrust report), `packages/node-sdk` (trust info shape), CLI (`cli/v2` MCP warning), docs. - Tests: env-trust, disclosure, trust-prompt, gateway, and SDK suites; full suite green locally. ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [x] I have linked a related issue (external PRs: issue must have a maintainer's `/approve`). — No public issue; maintainer work. - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update. --------- Co-authored-by: Test User <test@example.test>
The #336 merge moved pnpm-lock.yaml without updating flake.nix, so every nix build on this branch fails the fixed-output hash check. Set the pnpmDeps hash to the value the CI build reported and verify nix build .#pythinker-code.pnpmDeps locally.
Requirement or Bug
Restore filesystem-watch defaults and land a batch of session-behavior fixes (agent status, undo, cron forks, completion budget).
Bug Reproduction Steps
N/A (behavior restore + fixes).
Root Cause
Watch was flipped off by default when it should not have been; permission-mode changes never reached agent status consumers; undo left a stale interruption reminder; forks inherited the source session's cron tasks; a default completion token cap silently truncated model output. Each fixed at the cause.
Code Changes
[watch] enabled = false/PYTHINKER_CODE_WATCH=0to disable).setModepublishes permission mode onAgentStatusUpdated.notifyUserAvailablehost gate).maxCompletionTokensin modelOverrides to cap output.usedContextTokensreads the tokenizer size.Impact Scope
packages/agent-core-v2(watch, nudge, permission mode, interruption reminder, cron runtime, usage/traits/requesters),apps/visevent types, docs (config-files.md).Checklist
/approve). — No public issue; maintainer work.gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.