Hmbown/CodeWhale · info
Initial prompt ready; complete setup to send it
Error message
Initial prompt ready; complete setup to send it
What it means
This is the human-readable status string stored in INITIAL_PROMPT_DEFERRED_STATUS, raised via anyhow::ensure! when a user submits a prompt while the redaction gate is active. The redaction gate means the TUI is still in initial setup (e.g. secrets/redaction consent not yet completed), so user input is accepted but deliberately not dispatched to the engine. The message tells the user their prompt is queued and will be sent once setup completes.
Solutions
- Complete the in-TUI setup/redaction consent flow; the queued prompt is then dispatched automatically.
- Check app.redaction_gate before submitting and wait for setup to finish before sending input.
- If the gate is stuck, restart the TUI and finish setup in a fresh interactive session.
- For unattended runs, use `codewhale exec "…"` which does not route through the gated TUI dispatch path.
Example fix
// before
let dispatch = prepare_user_dispatch(app, config, message)?;
// after
if app.redaction_gate {
// prompt stays queued; surface status instead of erroring
app.status_message = Some("Initial prompt ready; complete setup to send it".into());
return Ok(UserDispatchPrepare::deferred());
}
let dispatch = prepare_user_dispatch(app, config, message)?; Defensive patterns
Strategy: validation
Validate before calling
// call before dispatching a user message
fn can_dispatch(app: &App) -> bool {
!app.redaction_gate
} Prevention
- Check app.redaction_gate before submitting composer input in scripts or macros.
- Complete the setup/redaction flow immediately on first launch before typing.
- For unattended runs use `codewhale exec`, which bypasses the gated TUI dispatch.
- Treat the message as a deferral, not a failure: the prompt stays queued.
When it happens
Trigger: Calling prepare_user_dispatch (via dispatch_user_message_with_recovery or start_user_dispatch) while `app.redaction_gate == true` — i.e. submitting composer input or an initial prompt before completing the setup/redaction-consent flow.
Common situations: Launching the TUI with a CLI-supplied initial prompt (`codew "..."`) and typing before finishing first-run setup; automation or scripted keystrokes that send input immediately on launch; resuming a session that requires re-consent to redaction rules.
Related errors
- {INITIAL_PROMPT_DEFERRED_STATUS}
- a window change is already in progress
- Codewhale API key not found, so no request was sent. The…
- `codewhale --continue` resumes the interactive TUI. Use…
- `codewhale --resume ` resumes the interactive TUI. Use…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/4294d7bfbabf2583.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tui/ui/dispatch.rs:578
warning: Some(
"message_submit hook executor did not run; submission continued because no strict gate matched"
.to_string(),
),
}
} else {
crate::hooks::MessageSubmitOutcome::Blocked {
reason: "message_submit hook executor did not run; a strict gate blocked submission"
.to_string(),
}
}
}
pub(crate) fn prepare_user_dispatch(
app: &mut App,
config: &Config,
message: QueuedMessage,
) -> Result<UserDispatchPrepare> {
anyhow::ensure!(!app.redaction_gate, "{INITIAL_PROMPT_DEFERRED_STATUS}");
let _ = app.maybe_nudge_plugin_for_prompt(&message.display);
// Plan paused-command changes without touching App or the engine pause
// gate. Route selection can await and client preflight can fail; neither
// may resume or discard a paused command unless a turn is ready to send.
let paused_dispatch = plan_paused_command_message(app, &message.display);
let cwd = std::env::current_dir().ok();
// One cache for this submit: the references pass and the payload pass
// otherwise each shell out for `@git`/`@diff`, making git compute a large
// working-tree diff twice to attach it once (#4067 review follow-up).
let mut git_cache = crate::tui::git_mention::GitMentionCache::default();
let completion_index = app.composer.mention_discovery.fuzzy_candidates(
&app.workspace,
&app.composer.mention_cwd,
app.mention_walk_depth,
app.workspace_follow_symlinks,
);View on GitHub (pinned to 73e0f67d83)