Skip to content

chore(agent): drop the dead LOAD_SKILL_USE_ALLOWED_TOOLS constant - #3480

Merged
kwakayama merged 1 commit into
mainfrom
cleanup/dead-delegation-policy
Aug 8, 2026
Merged

chore(agent): drop the dead LOAD_SKILL_USE_ALLOWED_TOOLS constant#3480
kwakayama merged 1 commit into
mainfrom
cleanup/dead-delegation-policy

Conversation

@kwakayama

@kwakayama kwakayama commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Leftover from veryfront/veryfront-issue-inbox#406.

LOAD_SKILL_USE_ALLOWED_TOOLS read:

For multi-step or isolated work, call invoke_agent; otherwise keep working directly with the available tools.

That sentence was written when a skill's allowed-tools narrowed a run. #3464 removed the enforcement, and I reworded the string ("allowed tools" → "available tools") instead of deleting it. The rewording was the wrong call: with nothing narrowing the tool set, the sentence had no subject left.

Why this one and not its neighbours

Several constants in delegation-policy.ts look unreferenced if you grep for their names, because the code that ships them composes them inside the same file. This one is different:

LOAD_SKILL_USE_ALLOWED_TOOLS e.g. LOAD_SKILL_CONTINUATION_REMINDER
production callers 0 child-fork-execution-runner.ts:213-217
test references 0 2
composed by another constant in-file 0 4

LOAD_SKILL_CONTINUATION_REMINDER, SLASH_COMMAND_ARTIFACT_REMINDER, FIRST_TURN_STARTER_INTENT_ROOT_OWNERSHIP_REMINDER, NO_DELEGATION_NARRATION_UNLESS_ASKED, SYNTHESIZE_DELEGATED_FINDINGS_IN_ROOT_VOICE, and ROOT_OWNED_CHILD_RESULT_INSTRUCTION all reach production through addLoadSkillContinuationReminder, addSlashCommandArtifactReminder, buildInvokeAgentFollowupInstruction, or withRootOwnedChildResultHint. They stay.

Only LOAD_SKILL_USE_ALLOWED_TOOLS has no path to a model at all.

Scope

  • the constant in src/agent/conversation/delegation-policy.ts
  • its re-export from the veryfront/agent barrel (src/agent/index.ts)
  • regenerated docs/api-reference/veryfront/agent.md

This is a public API removal, consistent with #3464 and #3475, which removed exports in the same area.

Testing

  • src/skill/, src/agent/, src/internal-agents/ — 1195 passed, 2178 steps, 0 failed
  • deno task typecheck — 0 errors
  • deno lint, lint:test-typecheck, docs:api-reference:check — all OK

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated API reference links to reflect the current implementation locations.
    • Removed the retired delegation-policy constant from the documented API.
  • Refactor

    • Removed the retired delegation-policy constant and its associated instruction text from the public API.

Leftover from veryfront/veryfront-issue-inbox#406. The constant read "For
multi-step or isolated work, call invoke_agent; otherwise keep working
directly with the available tools" - copy written when a skill's
allowed-tools narrowed a run. That enforcement was removed in #3464, and
the string was reworded rather than deleted at the time.

Nothing consumes it: no production caller, no test, and no other constant
in delegation-policy.ts composes it. That distinguishes it from the
neighbouring constants, which look unreferenced by name but are folded
into reminders that ship - LOAD_SKILL_CONTINUATION_REMINDER, for one, is
injected on the child-fork path by child-fork-execution-runner.ts.

Removes the export from the veryfront/agent barrel and regenerates the
API reference.

Claude-Session: https://claude.ai/code/session_01Xo93b6StAu691YV9g8Fm53
@kwakayama
kwakayama requested a review from kojiwakayama as a code owner August 8, 2026 19:10
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8de692ca-be33-4c31-9113-8fefc2b6bac0

📥 Commits

Reviewing files that changed from the base of the PR and between 9c5c144 and a24488c.

📒 Files selected for processing (3)
  • docs/api-reference/veryfront/agent.md
  • src/agent/conversation/delegation-policy.ts
  • src/agent/index.ts
💤 Files with no reviewable changes (2)
  • src/agent/conversation/delegation-policy.ts
  • src/agent/index.ts

📝 Walkthrough

Walkthrough

The change removes LOAD_SKILL_USE_ALLOWED_TOOLS from the delegation-policy implementation and public exports. The API reference removes the entry, adds SLASH_COMMAND_ARTIFACT_REMINDER, and updates source links for related APIs.

Changes

Delegation policy API cleanup

Layer / File(s) Summary
Remove delegation-policy export
src/agent/conversation/delegation-policy.ts, src/agent/index.ts
Removes LOAD_SKILL_USE_ALLOWED_TOOLS, its instruction text, and its public export.
Synchronize API reference
docs/api-reference/veryfront/agent.md
Removes the deleted constant, adds SLASH_COMMAND_ARTIFACT_REMINDER, and updates source references for delegation-policy functions and public contracts.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: kojiwakayama

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the removal of the unused LOAD_SKILL_USE_ALLOWED_TOOLS constant, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup/dead-delegation-policy

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a24488c640

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agent/index.ts
Comment on lines 1261 to 1262
LOAD_SKILL_ROOT_OWNERSHIP,
LOAD_SKILL_USE_ALLOWED_TOOLS,
NO_DELEGATION_NARRATION_UNLESS_ASKED,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the published load-skill export

When a consumer imports LOAD_SKILL_USE_ALLOWED_TOOLS from veryfront/agent, removing this entry breaks that consumer on upgrade: deno.json maps the public ./agent export to this index, and the symbol was included in the generated API reference before this change. The absence of internal references does not make a published export safe to remove, so retain it, optionally as deprecated, unless this is an explicitly breaking release.

AGENTS.md reference: AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

@kwakayama

Copy link
Copy Markdown
Contributor Author

Thanks both.

CodeRabbit: no actionable comments.

Codex — "Preserve the published load-skill export" (P2): declining, with reasons

The finding is factually correct: LOAD_SKILL_USE_ALLOWED_TOOLS was reachable from veryfront/agent and appeared in the generated API reference, so a consumer importing it breaks on upgrade. I'm taking the break deliberately.

1. Keeping it is worse than breaking it. The constant's text is:

For multi-step or isolated work, call invoke_agent; otherwise keep working directly with the available tools.

That is prompt copy describing a run whose tool set a skill had narrowed. #3464 removed that behaviour. A consumer importing this string today gets policy for a feature that no longer exists — and because it is prompt copy, the likely use is injecting it into agent instructions, which propagates stale guidance into their prompts silently. A compile error tells them to stop; a preserved constant does not.

Its own history makes the point: when #3464 removed the enforcement I reworded this string ("allowed tools" → "available tools") instead of deleting it. Rewording bought a sentence that still had no subject. This PR finishes that job rather than repeating it.

2. Removing exports from this barrel is established practice here, including changes that are not mine:

Commit PR Exports removed from src/agent/index.ts
9e57b05cf #3473 RuntimeLoadedSkillResponseMessages, RUNTIME_LOAD_SKILL_CONTINUATION_NOTE, RuntimeLoadSkillToolMessages
8da2596be #3464 LOAD_SKILL_TOOL_INTERSECTION
0a9f224cd #3309 ModelCallContext, ModelCallRecorder
this PR LOAD_SKILL_USE_ALLOWED_TOOLS

Two of those were also in the generated API reference before removal. This PR removes one export — strictly less than #3473, which merged.

3. The removal is visible, not silent. docs:api-reference:check regenerates the published surface, so the constant's disappearance is recorded in docs/api-reference/veryfront/agent.md in this diff.

I'll add it back behind a @deprecated re-export if a maintainer would rather not take the break — but I don't think a string describing deleted behaviour is worth keeping compilable.

@kwakayama
kwakayama added this pull request to the merge queue Aug 8, 2026
Merged via the queue into main with commit 9d1d832 Aug 8, 2026
31 checks passed
@kwakayama
kwakayama deleted the cleanup/dead-delegation-policy branch August 8, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant